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

228 lines
1.5 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[134,5,6,7,8,13,16,20],{"+NIl":function(j,Y,M){(function(D){D(M("VrN/"))})(function(D){"use strict";D.defineMode("stex",function(m,S){"use strict";function P(h,v){h.cmdState.push(v)}function d(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function f(h){var v=h.cmdState.pop();v&&v.closeBracket()}function _(h){for(var v=h.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 c(h,v,g){return function(){this.name=h,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 o={};o.importmodule=c("importmodule","tag",["string","builtin"]),o.documentclass=c("documentclass","tag",["","atom"]),o.usepackage=c("usepackage","tag",["atom"]),o.begin=c("begin","tag",["atom"]),o.end=c("end","tag",["atom"]),o.label=c("label","tag",["atom"]),o.ref=c("ref","tag",["atom"]),o.eqref=c("eqref","tag",["atom"]),o.cite=c("cite","tag",["atom"]),o.bibitem=c("bibitem","tag",["atom"]),o.Bibitem=c("Bibitem","tag",["atom"]),o.RBibitem=c("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function i(h,v){h.f=v}function n(h,v){var g;if(h.match(/^\\[a-zA-Z@]+/)){var E=h.current().slice(1);return g=o.hasOwnProperty(E)?o[E]:o.DEFAULT,g=new g,P(v,g),i(v,p),g.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return i(v,function(l,t){return u(l,t,"\\]")}),"keyword";if(h.match("\\("))return i(v,function(l,t){return u(l,t,"\\)")}),"keyword";if(h.match("$$"))return i(v,function(l,t){return u(l,t,"$$")}),"keyword";if(h.match("$"))return i(v,function(l,t){return u(l,t,"$")}),"keyword";var a=h.next();if(a=="%")return h.skipToEnd(),"comment";if(a=="}"||a=="]"){if(g=d(v),g)g.closeBracket(a),i(v,p);else return"error";return"bracket"}else return a=="{"||a=="["?(g=o.DEFAULT,g=new g,P(v,g),"bracket"):/\d/.test(a)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),g=_(v),g.name=="begin"&&(g.argument=h.current()),g.styleIdentifier())}function u(h,v,g){if(h.eatSpace())return null;if(g&&h.match(g))return i(v,n),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var E=h.next();return E=="{"||E=="}"||E=="["||E=="]"||E=="("||E==")"?"bracket":E=="%"?(h.skipToEnd(),"comment"):"error"}function p(h,v){var g=h.peek(),E;return g=="{"||g=="["?(E=d(v),E.openBracket(g),h.eat(g),i(v,n),"bracket"):/[ \t\r]/.test(g)?(h.eat(g),null):(i(v,n),f(v),n(h,v))}return{startState:function(){var h=S.inMathMode?function(v,g){return u(v,g)}:n;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,v){return v.f(h,v)},blankLine:function(h){h.f=n,h.cmdState.length=0},lineComment:"%"}}),D.defineMIME("text/x-stex","stex"),D.defineMIME("text/x-latex","stex")})},"+ua5":function(j,Y,M){},"19Vz":function(j,Y,M){(function(D){D(M("VrN/"))})(function(D){D.defineOption("placeholder","",function(c,o,i){var n=i&&i!=D.Init;if(o&&!n)c.on("blur",d),c.on("change",f),c.on("swapDoc",f),D.on(c.getInputField(),"compositionupdate",c.state.placeholderCompose=function(){P(c)}),f(c);else if(!o&&n){c.off("blur",d),c.off("change",f),c.off("swapDoc",f),D.off(c.getInputField(),"compositionupdate",c.state.placeholderCompose),m(c);var u=c.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}o&&!c.hasFocus()&&d(c)});function m(c){c.state.placeholder&&(c.state.placeholder.parentNode.removeChild(c.state.placeholder),c.state.placeholder=null)}function S(c){m(c);var o=c.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=c.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var i=c.getOption("placeholder");typeof i=="string"&&(i=document.createTextNode(i)),o.appendChild(i),c.display.lineSpace.insertBefore(o,c.display.lineSpace.firstChild)}function P(c){setTimeout(function(){var o=!1,i=c.getInputField();i.nodeName=="TEXTAREA"?o=!i.value:c.lineCount()==1&&(o=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),o?S(c):m(c)},20)}function d(c){_(c)&&S(c)}function f(c){var o=c.getWrapperElement(),i=_(c);o.className=o.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?S(c):m(c)}function _(c){return c.lineCount()===1&&c.getLine(0)===""}})},"1ZF9":function(j,Y,M){j.exports=M.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Y,M){(function(D){D(M("VrN/"))})(function(D){"use strict";var m={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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};D.defineMode("xml",function(P,d){var f=P.indentUnit,_={},c=d.htmlMode?m:S;for(var o in c)_[o]=c[o];for(var o in d)_[o]=d[o];var i,n;function u(T,k){function N(K){return k.tokenize=K,K(T,k)}var I=T.next();if(I=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?N(v("atom","]]>")):null:T.match("--")?N(v("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),N(g(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),k.tokenize=v("meta","?>"),"meta"):(i=T.eat("/")?"closeTag":"openTag",k.tokenize=p,"tag bracket");if(I=="&"){var W;return T.eat("#")?T.eat("x")?W=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):W=T.eatWhile(/[\d]/)&&T.eat(";"):W=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),W?"atom":"error"}else return T.eatWhile(/[^&<]/),null}u.isInText=!0;function p(T,k){var N=T.next();if(N==">"||N=="/"&&T.eat(">"))return k.tokenize=u,i=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return i="equals",null;if(N=="<"){k.tokenize=u,k.state=t,k.tagName=k.tagStart=null;var I=k.tokenize(T,k);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(k.tokenize=h(N),k.stringStartCol=T.column(),k.tokenize(T,k)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(T){var k=function(N,I){for(;!N.eol();)if(N.next()==T){I.tokenize=p;break}return"string"};return k.isInAttribute=!0,k}function v(T,k){return function(N,I){for(;!N.eol();){if(N.match(k)){I.tokenize=u;break}N.next()}return T}}function g(T){return function(k,N){for(var I;(I=k.next())!=null;){if(I=="<")return N.tokenize=g(T+1),N.tokenize(k,N);if(I==">")if(T==1){N.tokenize=u;break}else return N.tokenize=g(T-1),N.tokenize(k,N)}return"meta"}}function E(T,k,N){this.prev=T.context,this.tagName=k,this.indent=T.indented,this.startOfLine=N,(_.doNotIndent.hasOwnProperty(k)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function a(T){T.context&&(T.context=T.context.prev)}function l(T,k){for(var N;;){if(!T.context)return;if(N=T.context.tagName,!_.contextGrabbers.hasOwnProperty(N)||!_.contextGrabbers[N].hasOwnProperty(k))return;a(T)}}function t(T,k,N){return T=="openTag"?(N.tagStart=k.column(),C):T=="closeTag"?w:t}function C(T,k,N){return T=="word"?(N.tagName=k.current(),n="tag",O):_.allowMissingTagName&&T=="endTag"?(n="tag bracket",O(T,k,N)):(n="error",C)}function w(T,k,N){if(T=="word"){var I=k.current();return N.context&&N.context.tagName!=I&&_.implicitlyClosed.hasOwnProperty(N.context.tagName)&&a(N),N.context&&N.context.tagName==I||_.matchClosing===!1?(n="tag",s):(n="tag error",L)}else return _.allowMissingTagName&&T=="endTag"?(n="tag bracket",s(T,k,N)):(n="error",L)}function s(T,k,N){return T!="endTag"?(n="error",s):(a(N),t)}function L(T,k,N){return n="error",s(T,k,N)}function O(T,k,N){if(T=="word")return n="attribute",x;if(T=="endTag"||T=="selfcloseTag"){var I=N.tagName,W=N.tagStart;return N.tagName=N.tagStart=null,T=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(I)?l(N,I):(l(N,I),N.context=new E(N,I,W==N.indented)),t}return n="error",O}function x(T,k,N){return T=="equals"?b:(_.allowMissing||(n="error"),O(T,k,N))}function b(T,k,N){return T=="string"?y:T=="word"&&_.allowUnquoted?(n="string",O):(n="error",O(T,k,N))}function y(T,k,N){return T=="string"?y:O(T,k,N)}return{startState:function(T){var k={tokenize:u,state:t,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(k.baseIndent=T),k},token:function(T,k){if(!k.tagName&&T.sol()&&(k.indented=T.indentation()),T.eatSpace())return null;i=null;var N=k.tokenize(T,k);return(N||i)&&N!="comment"&&(n=null,k.state=k.state(i||N,T,k),n&&(N=n=="error"?N+" error":n)),N},indent:function(T,k,N){var I=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+f;if(I&&I.noIndent)return D.Pass;if(T.tokenize!=p&&T.tokenize!=u)return N?N.match(/^(\s*)/)[0].length:0;if(T.tagName)return _.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+f*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/<!\[CDATA\[/.test(k))return 0;var W=k&&/^<(\/)?([\w_:\.-]*)/.exec(k);if(W&&W[1])for(;I;)if(I.tagName==W[2]){I=I.prev;break}else if(_.implicitlyClosed.hasOwnProperty(I.tagName))I=I.prev;else break;else if(W)for(;I;){var K=_.contextGrabbers[I.tagName];if(K&&K.hasOwnProperty(W[2]))I=I.prev;else break}for(;I&&I.prev&&!I.startOfLine;)I=I.prev;return I?I.indent+f:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_.htmlMode?"html":"xml",helperType:_.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 k=[],N=T.context;N;N=N.prev)N.tagName&&k.push(N.tagName);return k.reverse()}}}),D.defineMIME("text/xml","xml"),D.defineMIME("application/xml","xml"),D.mimeModes.hasOwnProperty("text/html")||D.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("MlIO"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Hasher,d=m.x64,f=d.Word,_=d.WordArray,c=m.algo;function o(){return f.create.apply(f,arguments)}var i=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],n=[];(function(){for(var p=0;p<80;p++)n[p]=o()})();var u=c.SHA512=P.extend({_doReset:function(){this._hash=new _.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(p,h){for(var v=this._hash.words,g=v[0],E=v[1],a=v[2],l=v[3],t=v[4],C=v[5],w=v[6],s=v[7],L=g.high,O=g.low,x=E.high,b=E.low,y=a.high,T=a.low,k=l.high,N=l.low,I=t.high,W=t.low,K=C.high,U=C.low,z=w.high,B=w.low,H=s.high,G=s.low,ee=L,ie=O,ue=x,xe=b,Te=y,se=T,ve=k,de=N,ne=I,ae=W,Z=K,le=U,Q=z,q=B,be=H,te=G,J=0;J<80;J++){var X,$,ge=n[J];if(J<16)$=ge.high=p[h+J*2]|0,X=ge.low=p[h+J*2+1]|0;else{var fe=n[J-15],_e=fe.high,He=fe.low,$e=(_e>>>1|He<<31)^(_e>>>8|He<<24)^_e>>>7,Ve=(He>>>1|_e<<31)^(He>>>8|_e<<24)^(He>>>7|_e<<25),et=n[J-2],at=et.high,st=et.low,Me=(at>>>19|st<<13)^(at<<3|st>>>29)^at>>>6,Se=(st>>>19|at<<13)^(st<<3|at>>>29)^(st>>>6|at<<26),Ye=n[J-7],it=Ye.high,Ke=Ye.low,qe=n[J-16],ke=qe.high,Oe=qe.low;X=Ve+Ke,$=$e+it+(X>>>0<Ve>>>0?1:0),X=X+Se,$=$+Me+(X>>>0<Se>>>0?1:0),X=X+Oe,$=$+ke+(X>>>0<Oe>>>0?1:0),ge.high=$,ge.low=X}var Re=ne&Z^~ne&Q,pe=ae&le^~ae&q,Ee=ee&ue^ee&Te^ue&Te,we=ie&xe^ie&se^xe&se,De=(ee>>>28|ie<<4)^(ee<<30|ie>>>2)^(ee<<25|ie>>>7),Ge=(ie>>>28|ee<<4)^(ie<<30|ee>>>2)^(ie<<25|ee>>>7),nt=(ne>>>14|ae<<18)^(ne>>>18|ae<<14)^(ne<<23|ae>>>9),lt=(ae>>>14|ne<<18)^(ae>>>18|ne<<14)^(ae<<23|ne>>>9),ut=i[J],Rt=ut.high,tt=ut.low,nr=te+lt,Wt=be+nt+(nr>>>0<te>>>0?1:0),nr=nr+pe,Wt=Wt+Re+(nr>>>0<pe>>>0?1:0),nr=nr+tt,Wt=Wt+Rt+(nr>>>0<tt>>>0?1:0),nr=nr+X,Wt=Wt+$+(nr>>>0<X>>>0?1:0),pt=Ge+we,Rr=De+Ee+(pt>>>0<Ge>>>0?1:0);be=Q,te=q,Q=Z,q=le,Z=ne,le=ae,ae=de+nr|0,ne=ve+Wt+(ae>>>0<de>>>0?1:0)|0,ve=Te,de=se,Te=ue,se=xe,ue=ee,xe=ie,ie=nr+pt|0,ee=Wt+Rr+(ie>>>0<nr>>>0?1:0)|0}O=g.low=O+ie,g.high=L+ee+(O>>>0<ie>>>0?1:0),b=E.low=b+xe,E.high=x+ue+(b>>>0<xe>>>0?1:0),T=a.low=T+se,a.high=y+Te+(T>>>0<se>>>0?1:0),N=l.low=N+de,l.high=k+ve+(N>>>0<de>>>0?1:0),W=t.low=W+ae,t.high=I+ne+(W>>>0<ae>>>0?1:0),U=C.low=U+le,C.high=K+Z+(U>>>0<le>>>0?1:0),B=w.low=B+q,w.high=z+Q+(B>>>0<q>>>0?1:0),G=s.low=G+te,s.high=H+be+(G>>>0<te>>>0?1:0)},_doFinalize:function(){var p=this._data,h=p.words,v=this._nDataBytes*8,g=p.sigBytes*8;h[g>>>5]|=128<<24-g%32,h[(g+128>>>10<<5)+30]=Math.floor(v/4294967296),h[(g+128>>>10<<5)+31]=v,p.sigBytes=h.length*4,this._process();var E=this._hash.toX32();return E},clone:function(){var p=P.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});m.SHA512=P._createHelper(u),m.HmacSHA512=P._createHmacHelper(u)}(),D.SHA512})},"3y9D":function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=S.Hasher,f=m.algo,_=[],c=f.SHA1=d.extend({_doReset:function(){this._hash=new P.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,i){for(var n=this._hash.words,u=n[0],p=n[1],h=n[2],v=n[3],g=n[4],E=0;E<80;E++){if(E<16)_[E]=o[i+E]|0;else{var a=_[E-3]^_[E-8]^_[E-14]^_[E-16];_[E]=a<<1|a>>>31}var l=(u<<5|u>>>27)+g+_[E];E<20?l+=(p&h|~p&v)+1518500249:E<40?l+=(p^h^v)+1859775393:E<60?l+=(p&h|p&v|h&v)-1894007588:l+=(p^h^v)-899497514,g=v,v=h,h=p<<30|p>>>2,p=u,u=l}n[0]=n[0]+u|0,n[1]=n[1]+p|0,n[2]=n[2]+h|0,n[3]=n[3]+v|0,n[4]=n[4]+g|0},_doFinalize:function(){var o=this._data,i=o.words,n=this._nDataBytes*8,u=o.sigBytes*8;return i[u>>>5]|=128<<24-u%32,i[(u+64>>>9<<4)+14]=Math.floor(n/4294967296),i[(u+64>>>9<<4)+15]=n,o.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var o=d.clone.call(this);return o._hash=this._hash.clone(),o}});m.SHA1=d._createHelper(c),m.HmacSHA1=d._createHmacHelper(c)}(),D.SHA1})},4:function(j,Y){},"55Ip":function(j,Y,M){"use strict";M.d(Y,"a",function(){return l});var D=M("Ty5D"),m=M("dI71"),S=M("cDcd"),P=M.n(S),d=M("YS25"),f=M("17x9"),_=M.n(f),c=M("wx14"),o=M("zLVn"),i=M("9R94"),n=function(b){Object(m.a)(y,b);function y(){for(var k,N=arguments.length,I=new Array(N),W=0;W<N;W++)I[W]=arguments[W];return k=b.call.apply(b,[this].concat(I))||this,k.history=Object(d.a)(k.props),k}var T=y.prototype;return T.render=function(){return P.a.createElement(D.c,{history:this.history,children:this.props.children})},y}(P.a.Component),u=function(b){Object(m.a)(y,b);function y(){for(var k,N=arguments.length,I=new Array(N),W=0;W<N;W++)I[W]=arguments[W];return k=b.call.apply(b,[this].concat(I))||this,k.history=Object(d.b)(k.props),k}var T=y.prototype;return T.render=function(){return P.a.createElement(D.c,{history:this.history,children:this.props.children})},y}(P.a.Component),p=function(y,T){return typeof y=="function"?y(T):y},h=function(y,T){return typeof y=="string"?Object(d.c)(y,null,null,T):y},v=function(y){return y},g=P.a.forwardRef;typeof g=="undefined"&&(g=v);function E(b){return!!(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}var a=g(function(b,y){var T=b.innerRef,k=b.navigate,N=b.onClick,I=Object(o.a)(b,["innerRef","navigate","onClick"]),W=I.target,K=Object(c.a)({},I,{onClick:function(z){try{N&&N(z)}catch(B){throw z.preventDefault(),B}!z.defaultPrevented&&z.button===0&&(!W||W==="_self")&&!E(z)&&(z.preventDefault(),k())}});return v!==g?K.ref=y||T:K.ref=T,P.a.createElement("a",K)}),l=g(function(b,y){var T=b.component,k=T===void 0?a:T,N=b.replace,I=b.to,W=b.innerRef,K=Object(o.a)(b,["component","replace","to","innerRef"]);return P.a.createElement(D.e.Consumer,null,function(U){U||Object(i.a)(!1);var z=U.history,B=h(p(I,U.location),U.location),H=B?z.createHref(B):"",G=Object(c.a)({},K,{href:H,navigate:function(){var ie=p(I,U.location),ue=N?z.replace:z.push;ue(ie)}});return v!==g?G.ref=y||W:G.innerRef=W,P.a.createElement(k,G)})});if(!1)var t,C;var w=function(y){return y},s=P.a.forwardRef;typeof s=="undefined"&&(s=w);function L(){for(var b=arguments.length,y=new Array(b),T=0;T<b;T++)y[T]=arguments[T];return y.filter(function(k){return k}).join(" ")}var O=s(function(b,y){var T=b["aria-current"],k=T===void 0?"page":T,N=b.activeClassName,I=N===void 0?"active":N,W=b.activeStyle,K=b.className,U=b.exact,z=b.isActive,B=b.location,H=b.sensitive,G=b.strict,ee=b.style,ie=b.to,ue=b.innerRef,xe=Object(o.a)(b,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return P.a.createElement(D.e.Consumer,null,function(Te){Te||Object(i.a)(!1);var se=B||Te.location,ve=h(p(ie,se),se),de=ve.pathname,ne=de&&de.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ae=ne?Object(D.f)(se.pathname,{path:ne,exact:U,sensitive:H,strict:G}):null,Z=!!(z?z(ae,se):ae),le=Z?L(K,I):K,Q=Z?Object(c.a)({},ee,{},W):ee,q=Object(c.a)({"aria-current":Z&&k||null,className:le,style:Q,to:ve},xe);return w!==s?q.ref=y||ue:q.innerRef=ue,P.a.createElement(l,q)})});if(!1)var x},"5hvy":function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("MlIO"))})(this,function(D){return function(m){var S=D,P=S.lib,d=P.WordArray,f=P.Hasher,_=S.x64,c=_.Word,o=S.algo,i=[],n=[],u=[];(function(){for(var v=1,g=0,E=0;E<24;E++){i[v+5*g]=(E+1)*(E+2)/2%64;var a=g%5,l=(2*v+3*g)%5;v=a,g=l}for(var v=0;v<5;v++)for(var g=0;g<5;g++)n[v+5*g]=g+(2*v+3*g)%5*5;for(var t=1,C=0;C<24;C++){for(var w=0,s=0,L=0;L<7;L++){if(t&1){var O=(1<<L)-1;O<32?s^=1<<O:w^=1<<O-32}t&128?t=t<<1^113:t<<=1}u[C]=c.create(w,s)}})();var p=[];(function(){for(var v=0;v<25;v++)p[v]=c.create()})();var h=o.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],g=0;g<25;g++)v[g]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,g){for(var E=this._state,a=this.blockSize/2,l=0;l<a;l++){var t=v[g+2*l],C=v[g+2*l+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360;var w=E[l];w.high^=C,w.low^=t}for(var s=0;s<24;s++){for(var L=0;L<5;L++){for(var O=0,x=0,b=0;b<5;b++){var w=E[L+5*b];O^=w.high,x^=w.low}var y=p[L];y.high=O,y.low=x}for(var L=0;L<5;L++)for(var T=p[(L+4)%5],k=p[(L+1)%5],N=k.high,I=k.low,O=T.high^(N<<1|I>>>31),x=T.low^(I<<1|N>>>31),b=0;b<5;b++){var w=E[L+5*b];w.high^=O,w.low^=x}for(var W=1;W<25;W++){var O,x,w=E[W],K=w.high,U=w.low,z=i[W];z<32?(O=K<<z|U>>>32-z,x=U<<z|K>>>32-z):(O=U<<z-32|K>>>64-z,x=K<<z-32|U>>>64-z);var B=p[n[W]];B.high=O,B.low=x}var H=p[0],G=E[0];H.high=G.high,H.low=G.low;for(var L=0;L<5;L++)for(var b=0;b<5;b++){var W=L+5*b,w=E[W],ee=p[W],ie=p[(L+1)%5+5*b],ue=p[(L+2)%5+5*b];w.high=ee.high^~ie.high&ue.high,w.low=ee.low^~ie.low&ue.low}var w=E[0],xe=u[s];w.high^=xe.high,w.low^=xe.low}},_doFinalize:function(){var v=this._data,g=v.words,E=this._nDataBytes*8,a=v.sigBytes*8,l=this.blockSize*32;g[a>>>5]|=1<<24-a%32,g[(m.ceil((a+1)/l)*l>>>5)-1]|=128,v.sigBytes=g.length*4,this._process();for(var t=this._state,C=this.cfg.outputLength/8,w=C/8,s=[],L=0;L<w;L++){var O=t[L],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,s.push(b),s.push(x)}return new d.init(s,C)},clone:function(){for(var v=f.clone.call(this),g=v._state=this._state.slice(0),E=0;E<25;E++)g[E]=g[E].clone();return v}});S.SHA3=f._createHelper(h),S.HmacSHA3=f._createHmacHelper(h)}(Math),D.SHA3})},"6+eU":function(j,Y,M){"use strict";M.d(Y,"a",function(){return s});var D=M("wx14"),m=M("rePB"),S=M("VTBJ"),P=M("1OyB"),d=M("vuIU"),f=M("Ji7U"),_=M("LK+K"),c=M("cDcd"),o=M.n(c),i=M("TSYQ"),n=M.n(i),u=function(O){var x,b="".concat(O.rootPrefixCls,"-item"),y=n()(b,"".concat(b,"-").concat(O.page),(x={},Object(m.a)(x,"".concat(b,"-active"),O.active),Object(m.a)(x,O.className,!!O.className),Object(m.a)(x,"".concat(b,"-disabled"),!O.page),x)),T=function(){O.onClick(O.page)},k=function(I){O.onKeyPress(I,O.onClick,O.page)};return o.a.createElement("li",{title:O.showTitle?O.page:null,className:y,onClick:T,onKeyPress:k,tabIndex:"0"},O.itemRender(O.page,"page",o.a.createElement("a",{rel:"nofollow"},O.page)))},p=u,h={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},v=function(L){Object(f.a)(x,L);var O=Object(_.a)(x);function x(){var b;Object(P.a)(this,x);for(var y=arguments.length,T=new Array(y),k=0;k<y;k++)T[k]=arguments[k];return b=O.call.apply(O,[this].concat(T)),b.state={goInputText:""},b.buildOptionText=function(N){return"".concat(N," ").concat(b.props.locale.items_per_page)},b.changeSize=function(N){b.props.changeSize(Number(N))},b.handleChange=function(N){b.setState({goInputText:N.target.value})},b.handleBlur=function(N){var I=b.props,W=I.goButton,K=I.quickGo,U=I.rootPrefixCls,z=b.state.goInputText;if(W||z==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(U,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(U,"-next"))>=0))return;b.setState({goInputText:""}),K(b.getValidValue())},b.go=function(N){var I=b.state.goInputText;if(I==="")return;(N.keyCode===h.ENTER||N.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(d.a)(x,[{key:"getValidValue",value:function(){var y=this.state,T=y.goInputText,k=y.current;return!T||isNaN(T)?k:Number(T)}},{key:"getPageSizeOptions",value:function(){var y=this.props,T=y.pageSize,k=y.pageSizeOptions;return k.some(function(N){return N.toString()===T.toString()})?k:k.concat([T.toString()]).sort(function(N,I){var W=isNaN(Number(N))?0:Number(N),K=isNaN(Number(I))?0:Number(I);return W-K})}},{key:"render",value:function(){var y=this,T=this.props,k=T.pageSize,N=T.locale,I=T.rootPrefixCls,W=T.changeSize,K=T.quickGo,U=T.goButton,z=T.selectComponentClass,B=T.buildOptionText,H=T.selectPrefixCls,G=T.disabled,ee=this.state.goInputText,ie="".concat(I,"-options"),ue=z,xe=null,Te=null,se=null;if(!W&&!K)return null;var ve=this.getPageSizeOptions();if(W&&ue){var de=ve.map(function(ne,ae){return o.a.createElement(ue.Option,{key:ae,value:ne.toString()},(B||y.buildOptionText)(ne))});xe=o.a.createElement(ue,{disabled:G,prefixCls:H,showSearch:!1,className:"".concat(ie,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||ve[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},de)}return K&&(U&&(se=typeof U=="boolean"?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(ie,"-quick-jumper-button")},N.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},U)),Te=o.a.createElement("div",{className:"".concat(ie,"-quick-jumper")},N.jump_to,o.a.createElement("input",{disabled:G,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,se)),o.a.createElement("li",{className:"".concat(ie)},xe,Te)}}]),x}(o.a.Component);v.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=v,E=M("N2Kk");function a(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function t(L,O,x){return x}function C(L,O,x){var b=typeof L=="undefined"?O.pageSize:L;return Math.floor((x.total-1)/b)+1}var w=function(L){Object(f.a)(x,L);var O=Object(_.a)(x);function x(b){var y;Object(P.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(C(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(W,K){var U=y.props.prefixCls,z=W||o.a.createElement("button",{type:"button","aria-label":K,className:"".concat(U,"-item-link")});return typeof W=="function"&&(z=o.a.createElement(W,Object(S.a)({},y.props))),z},y.savePaginationNode=function(W){y.paginationNode=W},y.isValid=function(W){return l(W)&&W!==y.state.current},y.shouldDisplayQuickJumper=function(){var W=y.props,K=W.showQuickJumper,U=W.pageSize,z=W.total;return z<=U?!1:K},y.handleKeyDown=function(W){(W.keyCode===h.ARROW_UP||W.keyCode===h.ARROW_DOWN)&&W.preventDefault()},y.handleKeyUp=function(W){var K=y.getValidValue(W),U=y.state.currentInputValue;K!==U&&y.setState({currentInputValue:K}),W.keyCode===h.ENTER?y.handleChange(K):W.keyCode===h.ARROW_UP?y.handleChange(K-1):W.keyCode===h.ARROW_DOWN&&y.handleChange(K+1)},y.changePageSize=function(W){var K=y.state.current,U=C(W,y.state,y.props);K=K>U?U:K,U===0&&(K=y.state.current),typeof W=="number"&&("pageSize"in y.props||y.setState({pageSize:W}),"current"in y.props||y.setState({current:K,currentInputValue:K})),y.props.onShowSizeChange(K,W),"onChange"in y.props&&y.props.onChange&&y.props.onChange(K,W)},y.handleChange=function(W){var K=y.props.disabled,U=W;if(y.isValid(U)&&!K){var z=C(void 0,y.state,y.props);U>z?U=z:U<1&&(U=1),"current"in y.props||y.setState({current:U,currentInputValue:U});var B=y.state.pageSize;return y.props.onChange(U,B),U}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<C(void 0,y.state,y.props)},y.runIfEnter=function(W,K){if(W.key==="Enter"||W.charCode===13){for(var U=arguments.length,z=new Array(U>2?U-2:0),B=2;B<U;B++)z[B-2]=arguments[B];K.apply(void 0,z)}},y.runIfEnterPrev=function(W){y.runIfEnter(W,y.prev)},y.runIfEnterNext=function(W){y.runIfEnter(W,y.next)},y.runIfEnterJumpPrev=function(W){y.runIfEnter(W,y.jumpPrev)},y.runIfEnterJumpNext=function(W){y.runIfEnter(W,y.jumpNext)},y.handleGoTO=function(W){(W.keyCode===h.ENTER||W.type==="click")&&y.handleChange(y.state.currentInputValue)};var T=b.onChange!==a,k="current"in b;k&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var N=b.defaultCurrent;"current"in b&&(N=b.current);var I=b.defaultPageSize;return"pageSize"in b&&(I=b.pageSize),N=Math.min(N,C(I,void 0,b)),y.state={current:N,currentInputValue:N,pageSize:I},y}return Object(d.a)(x,[{key:"componentDidUpdate",value:function(y,T){var k=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(k,"-item-").concat(T.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(y){var T=y.target.value,k=C(void 0,this.state,this.props),N=this.state.currentInputValue,I;return T===""?I=T:isNaN(Number(T))?I=N:T>=k?I=k:I=Number(T),I}},{key:"getShowSizeChanger",value:function(){var y=this.props,T=y.showSizeChanger,k=y.total,N=y.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:k>N}},{key:"renderPrev",value:function(y){var T=this.props,k=T.prevIcon,N=T.itemRender,I=N(y,"prev",this.getItemIcon(k,"prev page")),W=!this.hasPrev();return Object(c.isValidElement)(I)?Object(c.cloneElement)(I,{disabled:W}):I}},{key:"renderNext",value:function(y){var T=this.props,k=T.nextIcon,N=T.itemRender,I=N(y,"next",this.getItemIcon(k,"next page")),W=!this.hasNext();return Object(c.isValidElement)(I)?Object(c.cloneElement)(I,{disabled:W}):I}},{key:"render",value:function(){var y=this,T=this.props,k=T.prefixCls,N=T.className,I=T.style,W=T.disabled,K=T.hideOnSinglePage,U=T.total,z=T.locale,B=T.showQuickJumper,H=T.showLessItems,G=T.showTitle,ee=T.showTotal,ie=T.simple,ue=T.itemRender,xe=T.showPrevNextJumpers,Te=T.jumpPrevIcon,se=T.jumpNextIcon,ve=T.selectComponentClass,de=T.selectPrefixCls,ne=T.pageSizeOptions,ae=this.state,Z=ae.current,le=ae.pageSize,Q=ae.currentInputValue;if(K===!0&&U<=le)return null;var q=C(void 0,this.state,this.props),be=[],te=null,J=null,X=null,$=null,ge=null,fe=B&&B.goButton,_e=H?1:2,He=Z-1>0?Z-1:0,$e=Z+1<q?Z+1:q,Ve=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 fe&&(typeof fe=="boolean"?ge=o.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):ge=o.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe),ge=o.a.createElement("li",{title:G?"".concat(z.jump_to).concat(Z,"/").concat(q):null,className:"".concat(k,"-simple-pager")},ge)),o.a.createElement("ul",Object(D.a)({className:n()(k,"".concat(k,"-simple"),Object(m.a)({},"".concat(k,"-disabled"),W),N),style:I,ref:this.savePaginationNode},Ve),o.a.createElement("li",{title:G?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(m.a)({},"".concat(k,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(He)),o.a.createElement("li",{title:G?"".concat(Z,"/").concat(q):null,className:"".concat(k,"-simple-pager")},o.a.createElement("input",{type:"text",value:Q,disabled:W,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),o.a.createElement("span",{className:"".concat(k,"-slash")},"/"),q),o.a.createElement("li",{title:G?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(m.a)({},"".concat(k,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext($e)),ge);if(q<=3+_e*2){var et={locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:ue};q||be.push(o.a.createElement(p,Object(D.a)({},et,{key:"noPager",page:q,className:"".concat(k,"-disabled")})));for(var at=1;at<=q;at+=1){var st=Z===at;be.push(o.a.createElement(p,Object(D.a)({},et,{key:at,page:at,active:st})))}}else{var Me=H?z.prev_3:z.prev_5,Se=H?z.next_3:z.next_5;xe&&(te=o.a.createElement("li",{title:G?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(k,"-jump-prev"),Object(m.a)({},"".concat(k,"-jump-prev-custom-icon"),!!Te))},ue(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Te,"prev page"))),J=o.a.createElement("li",{title:G?Se:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(k,"-jump-next"),Object(m.a)({},"".concat(k,"-jump-next-custom-icon"),!!se))},ue(this.getJumpNextPage(),"jump-next",this.getItemIcon(se,"next page")))),$=o.a.createElement(p,{locale:z,last:!0,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:q,page:q,active:!1,showTitle:G,itemRender:ue}),X=o.a.createElement(p,{locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:ue});var Ye=Math.max(1,Z-_e),it=Math.min(Z+_e,q);Z-1<=_e&&(it=1+_e*2),q-Z<=_e&&(Ye=q-_e*2);for(var Ke=Ye;Ke<=it;Ke+=1){var qe=Z===Ke;be.push(o.a.createElement(p,{locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ke,page:Ke,active:qe,showTitle:G,itemRender:ue}))}Z-1>=_e*2&&Z!==1+2&&(be[0]=Object(c.cloneElement)(be[0],{className:"".concat(k,"-item-after-jump-prev")}),be.unshift(te)),q-Z>=_e*2&&Z!==q-2&&(be[be.length-1]=Object(c.cloneElement)(be[be.length-1],{className:"".concat(k,"-item-before-jump-next")}),be.push(J)),Ye!==1&&be.unshift(X),it!==q&&be.push($)}var ke=null;ee&&(ke=o.a.createElement("li",{className:"".concat(k,"-total-text")},ee(U,[U===0?0:(Z-1)*le+1,Z*le>U?U:Z*le])));var Oe=!this.hasPrev()||!q,Re=!this.hasNext()||!q;return o.a.createElement("ul",Object(D.a)({className:n()(k,N,Object(m.a)({},"".concat(k,"-disabled"),W)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},Ve),ke,o.a.createElement("li",{title:G?z.prev_page:null,onClick:this.prev,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(m.a)({},"".concat(k,"-disabled"),Oe)),"aria-disabled":Oe},this.renderPrev(He)),be,o.a.createElement("li",{title:G?z.next_page:null,onClick:this.next,tabIndex:Re?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(m.a)({},"".concat(k,"-disabled"),Re)),"aria-disabled":Re},this.renderNext($e)),o.a.createElement(g,{disabled:W,locale:z,rootPrefixCls:k,selectComponentClass:ve,selectPrefixCls:de,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Z,pageSize:le,pageSizeOptions:ne,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{key:"getDerivedStateFromProps",value:function(y,T){var k={};if("current"in y&&(k.current=y.current,y.current!==T.current&&(k.currentInputValue=k.current)),"pageSize"in y&&y.pageSize!==T.pageSize){var N=T.current,I=C(y.pageSize,T,y);N=N>I?I:N,"current"in y||(k.current=N,k.currentInputValue=N),k.pageSize=y.pageSize}return k}}]),x}(o.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:E.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var s=w},"6RRn":function(j,Y,M){"use strict";var D=M("wCXF"),m=M("n6Qo");M.d(Y,"b",function(){return m.a});var S=M("IBYe"),P=M("6eGT"),d=M("hW8S");M.d(Y,"a",function(){return d.a}),Y.c=D.b},"6eGT":function(j,Y,M){"use strict";function D(m){return null}Y.a=D},"7Cbv":function(j,Y,M){"use strict";var D=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function S(){if(!D)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return D(m)}var P=/^(?:[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 d(p){return typeof p=="string"&&P.test(p)}for(var f=d,_=[],c=0;c<256;++c)_.push((c+256).toString(16).substr(1));function o(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,v=(_[p[h+0]]+_[p[h+1]]+_[p[h+2]]+_[p[h+3]]+"-"+_[p[h+4]]+_[p[h+5]]+"-"+_[p[h+6]]+_[p[h+7]]+"-"+_[p[h+8]]+_[p[h+9]]+"-"+_[p[h+10]]+_[p[h+11]]+_[p[h+12]]+_[p[h+13]]+_[p[h+14]]+_[p[h+15]]).toLowerCase();if(!f(v))throw TypeError("Stringified UUID is invalid");return v}var i=o;function n(p,h,v){p=p||{};var g=p.random||(p.rng||S)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,h){v=v||0;for(var E=0;E<16;++E)h[v+E]=g[E];return h}return i(g)}var u=Y.a=n},"7ahc":function(j,Y,M){"use strict";M.d(Y,"a",function(){return C});var D=M("k1fw"),m=M("0Owb"),S=M("+L6B"),P=M("2/Rp"),d=M("y8nQ"),f=M("Vl3Y"),_=M("tJVT"),c=M("OaEy"),o=M("2fM7"),i=M("cDcd"),n=M.n(i),u=M("VrN/"),p=M.n(u),h=M("p77/"),v=M.n(h),g=M("c5Ni"),E=M.n(g),a=o.a.Option,l={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"]};Y.b=function(w){var s=w.callback,L=w.onCancel,O=Object(i.useState)("python"),x=Object(_.a)(O,2),b=x[0],y=x[1];function T(N){y(t[N][1])}function k(N){s(N)}return n.a.createElement(f.a,Object(m.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),n.a.createElement(f.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(o.a,{onChange:T},Object.keys(t).map(function(N){return n.a.createElement(a,{key:N,value:N},t[N][0])}))),n.a.createElement(f.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(C,{mode:b})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(P.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function C(w){var s=w.value,L=w.onChange,O=w.mode,x=w.options,b=x===void 0?{}:x,y=Object(i.useRef)(),T=Object(i.useState)(),k=Object(_.a)(T,2),N=k[0],I=k[1];return Object(i.useEffect)(function(){if(N){function W(K){var U=K.getValue();L&&L(U)}return N.on("change",W),function(){N.off("change",W)}}},[N,L]),Object(i.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(i.useEffect)(function(){N&&((s!==N.getValue()||s==="")&&setTimeout(function(){N.setValue(s||" ")},300))},[N,s]),Object(i.useEffect)(function(){if(y.current&&!N){var W=p.a.fromTextArea(y.current,Object(D.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));I(W)}},[y.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:y}))}},"815F":function(j,Y,M){"use strict";M.d(Y,"e",function(){return _}),M.d(Y,"c",function(){return o}),M.d(Y,"d",function(){return i}),M.d(Y,"a",function(){return u}),M.d(Y,"f",function(){return p}),M.d(Y,"b",function(){return h});var D=M("KQm4"),m=M("VTBJ"),S=M("Ff2n"),P=M("Zm9Q"),d=M("Kwbf"),f=M("OZM5");function _(v,g){return v!=null?v:g}function c(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function E(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var C=t.key,w=t.children;Object(d.a)(C!=null,"Tree node must have a certain key: [".concat(l).concat(C,"]"));var s=String(C);Object(d.a)(!g.has(s)||C===null||C===void 0,"Same 'key' exist in the Tree: ".concat(s)),g.set(s,!0),E(w,"".concat(l).concat(s," > "))})}E(v)}function o(v){function g(E){var a=Object(P.a)(E);return a.map(function(l){if(!Object(f.i)(l))return Object(d.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var t=l.key,C=l.props,w=C.children,s=Object(S.a)(C,["children"]),L=Object(m.a)({key:t},s),O=g(w);return O.length&&(L.children=O),L}).filter(function(l){return l})}return g(v)}function i(){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),a=[];function l(t){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(w,s){var L=Object(f.h)(C?C.pos:"0",s),O=_(w.key,L),x=Object(m.a)(Object(m.a)({},w),{},{parent:C,pos:L,children:null,data:w,isStart:[].concat(Object(D.a)(C?C.isStart:[]),[s===0]),isEnd:[].concat(Object(D.a)(C?C.isEnd:[]),[s===t.length-1])});return a.push(x),g===!0||E.has(O)?x.children=l(w.children||[],x):x.children=[],x})}return l(v),a}function n(v,g,E){var a;E?typeof E=="string"?a=function(C){return C[E]}:typeof E=="function"&&(a=function(C){return E(C)}):a=function(C,w){return _(C.key,w)};function l(t,C,w){var s=t?t.children:v,L=t?Object(f.h)(w.pos,C):"0";if(t){var O=a(t,L),x={node:t,index:C,pos:L,key:O,parentPos:w.node?w.pos:null,level:w.level+1};g(x)}s&&s.forEach(function(b,y){l(b,y,{node:t,pos:L,level:w?w.level+1:-1})})}l(null)}function u(v){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=g.initWrapper,a=g.processEntity,l=g.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,C={},w={},s={posEntities:C,keyEntities:w};return E&&(s=E(s)||s),n(v,function(L){var O=L.node,x=L.index,b=L.pos,y=L.key,T=L.parentPos,k=L.level,N={node:O,index:x,key:y,pos:b,level:k},I=_(y,b);C[b]=N,w[I]=N,N.parent=C[T],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),a&&a(N,s)},t),l&&l(s),s}function p(v,g){var E=g.expandedKeys,a=g.selectedKeys,l=g.loadedKeys,t=g.loadingKeys,C=g.checkedKeys,w=g.halfCheckedKeys,s=g.dragOverNodeKey,L=g.dropPosition,O=g.keyEntities,x=O[v],b={eventKey:v,expanded:E.indexOf(v)!==-1,selected:a.indexOf(v)!==-1,loaded:l.indexOf(v)!==-1,loading:t.indexOf(v)!==-1,checked:C.indexOf(v)!==-1,halfChecked:w.indexOf(v)!==-1,pos:String(x?x.pos:""),dragOver:s===v&&L===0,dragOverGapTop:s===v&&L===-1,dragOverGapBottom:s===v&&L===1};return b}function h(v){var g=v.data,E=v.expanded,a=v.selected,l=v.checked,t=v.loaded,C=v.loading,w=v.halfChecked,s=v.dragOver,L=v.dragOverGapTop,O=v.dragOverGapBottom,x=v.pos,b=v.active,y=Object(m.a)(Object(m.a)({},g),{},{expanded:E,selected:a,checked:l,loaded:t,loading:C,halfChecked:w,dragOver:s,dragOverGapTop:L,dragOverGapBottom:O,pos:x,active:b});return"props"in y||Object.defineProperty(y,"props",{get:function(){return Object(d.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,Y,M){(function(D){D(M("VrN/"))})(function(D){"use strict";D.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 m=0;m<D.modeInfo.length;m++){var S=D.modeInfo[m];S.mimes&&(S.mime=S.mimes[0])}D.findModeByMIME=function(P){P=P.toLowerCase();for(var d=0;d<D.modeInfo.length;d++){var f=D.modeInfo[d];if(f.mime==P)return f;if(f.mimes){for(var _=0;_<f.mimes.length;_++)if(f.mimes[_]==P)return f}}if(/\+xml$/.test(P))return D.findModeByMIME("application/xml");if(/\+json$/.test(P))return D.findModeByMIME("application/json")},D.findModeByExtension=function(P){P=P.toLowerCase();for(var d=0;d<D.modeInfo.length;d++){var f=D.modeInfo[d];if(f.ext){for(var _=0;_<f.ext.length;_++)if(f.ext[_]==P)return f}}},D.findModeByFileName=function(P){for(var d=0;d<D.modeInfo.length;d++){var f=D.modeInfo[d];if(f.file&&f.file.test(P))return f}var _=P.lastIndexOf("."),c=_>-1&&P.substring(_+1,P.length);if(c)return D.findModeByExtension(c)},D.findModeByName=function(P){P=P.toLowerCase();for(var d=0;d<D.modeInfo.length;d++){var f=D.modeInfo[d];if(f.name.toLowerCase()==P)return f;if(f.alias){for(var _=0;_<f.alias.length;_++)if(f.alias[_].toLowerCase()==P)return f}}}})},"8hTe":function(j,Y,M){j.exports={button:"button___1wy9m"}},"9Bee":function(j,Y,M){"use strict";var D=M("DYRE"),m=M("zeV3"),S=M("+L6B"),P=M("2/Rp"),d=M("k1fw"),f=M("tJVT"),_=M("cDcd"),c=M.n(_),o=M("vg9a"),i=M("DlQD"),n=M.n(i),u=M("rUJ1");function p(se,ve){var de=se.match(/^(\s+)(?:```)/);if(de===null)return ve;var ne=de[1];return ve.split(`
`).map(function(ae){var Z=ae.match(/^\s+/);if(Z===null)return ae;var le=Object(f.a)(Z,1),Q=le[0];return Q.length>=ne.length?ae.slice(ne.length):ae}).join(`
`)}var h=[],v=["<ul>"],g=new n.a.Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function a(){h.length=0,v=["<ul>"]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function t(se,ve,de,ne){if(ve>=se.length||se[ve].level<=de)return ve;var ae=se[ve];ne.push("<li><a href='#"+ae.anchor+"'>"+ae.text+"</a>"),ve++;var Z=[];return ve=t(se,ve,ae.level,Z),Z.length>0&&(ne.push("<ul>"),Z.forEach(function(le){ne.push(le)}),ne.push("</ul>")),ne.push("</li>"),ve=t(se,ve,de,ne),ve}function C(){return t(h,0,0,v),v.push("</ul>"),v.join("")}var w={heading:function(ve){var de=E.exec(ve);if(de)return{type:"heading",raw:de[0],depth:de[1].length,text:de[2]}},fences:function(ve){var de=this.rules.block.fences.exec(ve);if(de){var ne=de[0],ae=p(ne,de[3]||""),Z=de[2]?de[2].trim():de[2];if(["latex","katex","math"].indexOf(Z)>=0){var le=O(),Q=ae;ae=le,x[le]={type:"block",expression:Q}}return{type:"code",raw:ne,lang:Z,text:ae}}}},s=/(?:\${2})([^\n`]+?)(?:\${2})/gi,L=0,O=function(){return"__special_katext_id_".concat(L++,"__")},x={};function b(){return x}function y(){L=0,x={}}function T(se){return se=se.replace(s,function(ve,de){var ne=O();return x[ne]={type:"inline",expression:de},ne}),se}var k=g.listitem;g.listitem=function(se){return k(T(se))};var N=g.paragraph;g.paragraph=function(se){return N(T(se))};var I=g.tablecell;g.tablecell=function(se,ve){return I(T(se),ve)},g.code=function(se,ve,de){var ne=(ve||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"<p class='editormd-tex'>".concat(se,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ve,'">').concat(de?se:Object(u.escape)(se,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(de?se:Object(u.escape)(se,!0))+"</code></pre>"},g.heading=function(se,ve,de){var ne=this.options.headerPrefix+de.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:ne,level:ve,text:se}),"<h"+ve+' id="'+ne+'">'+se+"</h"+ve+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:w,renderer:g});var W=n.a,K=M("SJMd"),U=M("ulZh"),z=M.n(U),B=M("m3rI"),H=M("Oy/b"),G=M("p5ED"),ee=M("8hTe"),ie=M.n(ee),ue=/<pre[^>]*>/g;function xe(se){var ve=document.createElement("div");return ve.innerHTML=se,ve.childNodes.length===0?"":ve.childNodes[0].nodeValue}var Te=Y.a=function(se){var ve=se.value,de=ve===void 0?"":ve,ne=se.edit,ae=ne===void 0?!1:ne,Z=se.className,le=se.showTextOnly,Q=se.showLines,q=se.replaces,be=se.zoomImg,te=se.hasMask,J=se.style,X=J===void 0?{}:J,$=se.stylesPrev,ge=$===void 0?{}:$,fe=String(de),_e=Object(_.useRef)(),He=Object(_.useRef)(),$e=Object(_.useState)(""),Ve=Object(f.a)($e,2),et=Ve[0],at=Ve[1],st=Object(_.useState)("office"),Me=Object(f.a)(st,2),Se=Me[0],Ye=Me[1],it=Object(_.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;fe=fe.replace(Re,"("+B.a.API_SERVER+"/api/attachments/").replace(pe,'"'+B.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+B.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(nt){}var we=W(fe),De=b();if(fe.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",C()),a()),we=we.replace(/(__special_katext_id_\d+__)/g,function(nt,lt){var ut=De[lt],Rt=ut.type,tt=ut.expression;return Object(H.renderToString)(xe(tt)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),y(),le){var Ge=document.createElement("div");return Ge.innerHTML=we,Ge.innerText}return setTimeout(function(){return ke()},500),we},[fe]),Ke=Object(_.useRef)();l.WebkitLineClamp=Q,Q&&(X=Object(d.a)(Object(d.a)({},X),l));function qe(Re){var pe=Re.target;if(pe.tagName.toUpperCase()==="IMG"){if(be){var Ee=pe.getAttribute("src");at(Ee),Ye("image")}}else if(pe.tagName.toUpperCase()==="A"){var we=pe.getAttribute("href");if(we.indexOf("office")>-1)Re.preventDefault(),at(we),Ye("office");else if(we.indexOf("application/pdf")>-1)Re.preventDefault(),at(we),Ye("pdf");else if(we.indexOf("text/html")>-1)Re.preventDefault(),at(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=Ke.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(z.a.isSupported()){var De=new z.a;De.loadSource(we.src),De.attachMedia(we)}}})};Object(_.useEffect)(function(){if(Ke.current&&it&&(it.match(ue)&&window.PR.prettyPrint()),Ke.current)return Ke.current.addEventListener("click",qe),function(){Ke.current.removeEventListener("click",qe),y(),a()}},[it,Ke.current,qe]);var Oe=function(pe){if(!ae)return;pe.target.nodeName==="IMG"?(_e.current.style.display="flex",_e.current.style.width=pe.target.clientWidth+"px",_e.current.style.height=pe.target.clientHeight+"px",_e.current.style.top=pe.target.offsetTop+"px",_e.current.style.left=pe.target.offsetLeft+"px",He.current.src=pe.target.getAttribute("src")):_e.current.style.display="none"};return c.a.createElement("div",{style:{position:"relative"}},c.a.createElement("div",{ref:Ke,style:Object(d.a)({},X),className:"".concat(Z||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:Oe,dangerouslySetInnerHTML:{__html:it}}),c.a.createElement("div",{ref:_e,className:ie.a.button},c.a.createElement(m.a,null,c.a.createElement(P.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),c.a.createElement(P.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),c.a.createElement("img",{ref:He,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),c.a.createElement(G.a,{close:!0,data:et,type:et!=null&&et.length?Se:"",style:Object(d.a)({},ge),onClose:function(){return at("")}}))}},"9OqN":function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.CTR=function(){var m=D.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(P,d){var f=this._cipher,_=f.blockSize,c=this._iv,o=this._counter;c&&(o=this._counter=c.slice(0),this._iv=void 0);var i=o.slice(0);f.encryptBlock(i,0),o[_-1]=o[_-1]+1|0;for(var n=0;n<_;n++)P[d+n]^=i[n]}});return m.Decryptor=S,m}(),D.mode.CTR})},"9VGf":function(j,Y,M){"use strict";M.d(Y,"a",function(){return S});var D=M("cDcd"),m=M.n(D);function S(P,d){var f=Object(D.useRef)();Object(D.useEffect)(function(){f.current=P}),Object(D.useEffect)(function(){function _(){f.current()}if(d!==null){var c=setInterval(_,d);return function(){return clearInterval(c)}}},[d])}},ALsQ:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.CFB=function(){var m=D.lib.BlockCipherMode.extend();m.Encryptor=m.extend({processBlock:function(P,d){var f=this._cipher,_=f.blockSize;S.call(this,P,d,_,f),this._prevBlock=P.slice(d,d+_)}}),m.Decryptor=m.extend({processBlock:function(P,d){var f=this._cipher,_=f.blockSize,c=P.slice(d,d+_);S.call(this,P,d,_,f),this._prevBlock=c}});function S(P,d,f,_){var c,o=this._iv;o?(c=o.slice(0),this._iv=void 0):c=this._prevBlock,_.encryptBlock(c,0);for(var i=0;i<f;i++)P[d+i]^=c[i]}return m}(),D.mode.CFB})},BJfS:function(j,Y){var M=function(D){return D.replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()}).toLowerCase()};j.exports=M},BU3w:function(j,Y,M){"use strict";M.d(Y,"a",function(){return f});var D=M("MNnm"),m="rc-util-key";function S(_){if(_.attachTo)return _.attachTo;var c=document.querySelector("head");return c||document.body}function P(_){var c,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(D.a)())return null;var i=document.createElement("style");if((c=o.csp)===null||c===void 0?void 0:c.nonce){var n;i.nonce=(n=o.csp)===null||n===void 0?void 0:n.nonce}i.innerHTML=_;var u=S(o),p=u.firstChild;return o.prepend&&u.prepend?u.prepend(i):o.prepend&&p?u.insertBefore(i,p):u.appendChild(i),i}var d=new Map;function f(_,c){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=S(o);if(!d.has(i)){var n=P("",o),u=n.parentNode;d.set(i,u),u.removeChild(n)}var p=Array.from(d.get(i).children).find(function(a){return a.tagName==="STYLE"&&a[m]===c});if(p){var h,v;if(((h=o.csp)===null||h===void 0?void 0:h.nonce)&&p.nonce!==((v=o.csp)===null||v===void 0?void 0:v.nonce)){var g;p.nonce=(g=o.csp)===null||g===void 0?void 0:g.nonce}return p.innerHTML!==_&&(p.innerHTML=_),p}var E=P(_,o);return E[m]=c,E}},Bd2K:function(j,Y,M){(function(D){D(M("VrN/"),M("osHv"))})(function(D){D.defineOption("autoCloseTags",!1,function(o,i,n){if(n!=D.Init&&n&&o.removeKeyMap("autoCloseTags"),!i)return;var u={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing!==!1)&&(u["'/'"]=function(p){return f(p)}),(typeof i!="object"||i.whenOpening!==!1)&&(u["'>'"]=function(p){return P(p)}),o.addKeyMap(u)});var m=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["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 P(o){if(o.getOption("disableInput"))return D.Pass;for(var i=o.listSelections(),n=[],u=o.getOption("autoCloseTags"),p=0;p<i.length;p++){if(!i[p].empty())return D.Pass;var h=i[p].head,v=o.getTokenAt(h),g=D.innerMode(o.getMode(),v.state),E=g.state,a=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(E),l=a&&a.name;if(!l)return D.Pass;var t=g.mode.configuration=="html",C=typeof u=="object"&&u.dontCloseTags||t&&m,w=typeof u=="object"&&u.indentTags||t&&S;v.end>h.ch&&(l=l.slice(0,l.length-v.end+h.ch));var s=l.toLowerCase();if(!l||v.type=="string"&&(v.end!=h.ch||!/[\"\']/.test(v.string.charAt(v.string.length-1))||v.string.length==1)||v.type=="tag"&&a.close||v.string.indexOf("/")==h.ch-v.start-1||C&&_(C,s)>-1||c(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(E)||[],l,h,!0))return D.Pass;var L=typeof u=="object"&&u.emptyTags;if(L&&_(L,l)>-1){n[p]={text:"/>",newPos:D.Pos(h.line,h.ch+2)};continue}var O=w&&_(w,s)>-1;n[p]={indent:O,text:">"+(O?`
`:"")+"</"+l+">",newPos:O?D.Pos(h.line+1,0):D.Pos(h.line,h.ch+1)}}for(var x=typeof u=="object"&&u.dontIndentOnAutoClose,p=i.length-1;p>=0;p--){var b=n[p];o.replaceRange(b.text,i[p].head,i[p].anchor,"+insert");var y=o.listSelections().slice(0);y[p]={head:b.newPos,anchor:b.newPos},o.setSelections(y),!x&&b.indent&&(o.indentLine(b.newPos.line,null,!0),o.indentLine(b.newPos.line+1,null,!0))}}function d(o,i){for(var n=o.listSelections(),u=[],p=i?"/":"</",h=o.getOption("autoCloseTags"),v=typeof h=="object"&&h.dontIndentOnSlash,g=0;g<n.length;g++){if(!n[g].empty())return D.Pass;var E=n[g].head,a=o.getTokenAt(E),l=D.innerMode(o.getMode(),a.state),t=l.state;if(i&&(a.type=="string"||a.string.charAt(0)!="<"||a.start!=E.ch-1))return D.Pass;var C,w=l.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(w&&l.mode.name=="javascript")C=p+"script";else if(w&&l.mode.name=="css")C=p+"style";else{var s=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(t);if(!s||s.length&&c(o,s,s[s.length-1],E))return D.Pass;C=p+s[s.length-1]}o.getLine(E.line).charAt(a.end)!=">"&&(C+=">"),u[g]=C}if(o.replaceSelections(u),n=o.listSelections(),!v)for(var g=0;g<n.length;g++)(g==n.length-1||n[g].head.line<n[g+1].head.line)&&o.indentLine(n[g].head.line)}function f(o){return o.getOption("disableInput")?D.Pass:d(o,!0)}D.commands.closeTag=function(o){return d(o)};function _(o,i){if(o.indexOf)return o.indexOf(i);for(var n=0,u=o.length;n<u;++n)if(o[n]==i)return n;return-1}function c(o,i,n,u,p){if(!D.scanForClosingTag)return!1;var h=Math.min(o.lastLine()+1,u.line+500),v=D.scanForClosingTag(o,u,null,h);if(!v||v.tag!=n)return!1;for(var g=p?1:0,E=i.length-1;E>=0&&i[E]==n;E--)++g;u=v.to;for(var E=1;E<g;E++){var a=D.scanForClosingTag(o,u,null,h);if(!a||a.tag!=n)return!1;u=a.to}return!0}})},BjJ7:function(j,Y,M){"use strict";M.d(Y,"d",function(){return m}),M.d(Y,"c",function(){return S}),M.d(Y,"e",function(){return P}),M.d(Y,"b",function(){return d}),M.d(Y,"a",function(){return _});var D=M("m3rI");function m(c){var o=!0;if(c.length>0){for(var i=0;i<c.length;i++)if(c[i].compile_success==0||!c[i].compile_success){o=!1;break}}else o=!1;return o}function S(c){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=[],n=0;n<c.length;n++){var u=c[n],p=o?"".concat(o,"/").concat(u.name):"".concat(u.name);i.push({title:u.name,isLeaf:!(u.type==="tree"),key:p})}return i}function P(c,o,i){for(var n=0;n<c.length;n++){var u=c[n];if(u.key===o){u.children=i;break}u.children&&P(u.children,o,i)}return c}function d(c,o,i){var n;return function(){var u=this,p=arguments,h=function(){n=null,i||c.apply(u,p)},v=i&&!n;clearTimeout(n),n=setTimeout(h,o),v&&c.apply(u,p)}}var f=!0,_=D.a.API_SERVER},"C+DQ":function(j,Y,M){},D1Df:function(j,Y,M){"use strict";function D(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(K){return typeof K}:D=function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},D(I)}function m(){return m=Object.assign||function(I){for(var W=1;W<arguments.length;W++){var K=arguments[W];for(var U in K)Object.prototype.hasOwnProperty.call(K,U)&&(I[U]=K[U])}return I},m.apply(this,arguments)}function S(I,W){var K=Object.keys(I);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(I);W&&(U=U.filter(function(z){return Object.getOwnPropertyDescriptor(I,z).enumerable})),K.push.apply(K,U)}return K}function P(I){for(var W=1;W<arguments.length;W++){var K=arguments[W]!=null?arguments[W]:{};W%2?S(K,!0).forEach(function(U){v(I,U,K[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(K)):S(K).forEach(function(U){Object.defineProperty(I,U,Object.getOwnPropertyDescriptor(K,U))})}return I}function d(I,W){if(I==null)return{};var K=f(I,W),U,z;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(I);for(z=0;z<B.length;z++){if(U=B[z],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(I,U))continue;K[U]=I[U]}}return K}function f(I,W){if(I==null)return{};var K={},U=Object.keys(I),z,B;for(B=0;B<U.length;B++){if(z=U[B],W.indexOf(z)>=0)continue;K[z]=I[z]}return K}function _(I,W){if(!(I instanceof W))throw new TypeError("Cannot call a class as a function")}function c(I,W){for(var K=0;K<W.length;K++){var U=W[K];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(I,U.key,U)}}function o(I,W,K){return W&&c(I.prototype,W),K&&c(I,K),I}function i(I,W){return W&&(D(W)==="object"||typeof W=="function")?W:u(I)}function n(I){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(K){return K.__proto__||Object.getPrototypeOf(K)},n(I)}function u(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function p(I,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(W&&W.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),W&&h(I,W)}function h(I,W){return h=Object.setPrototypeOf||function(U,z){return U.__proto__=z,U},h(I,W)}function v(I,W,K){return W in I?Object.defineProperty(I,W,{value:K,enumerable:!0,configurable:!0,writable:!0}):I[W]=K,I}var g=M("cDcd"),E=M("17x9"),a=M("H38U"),l=M("aRTE");function t(I){for(var W="",K=0;K<I.length;K++){var U=I.charCodeAt(K);U<128?W+=String.fromCharCode(U):U<2048?(W+=String.fromCharCode(192|U>>6),W+=String.fromCharCode(128|U&63)):U<55296||U>=57344?(W+=String.fromCharCode(224|U>>12),W+=String.fromCharCode(128|U>>6&63),W+=String.fromCharCode(128|U&63)):(K++,U=65536+((U&1023)<<10|I.charCodeAt(K)&1023),W+=String.fromCharCode(240|U>>18),W+=String.fromCharCode(128|U>>12&63),W+=String.fromCharCode(128|U>>6&63),W+=String.fromCharCode(128|U&63))}return W}var C={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},w={},s=4,L=.1;function O(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K=[];return I.forEach(function(U,z){var B=null;U.forEach(function(H,G){if(!H&&B!==null){K.push("M".concat(B+W," ").concat(z+W,"h").concat(G-B,"v1H").concat(B+W,"z")),B=null;return}if(G===U.length-1){if(!H)return;B===null?K.push("M".concat(G+W,",").concat(z+W," h1v1H").concat(G+W,"z")):K.push("M".concat(B+W,",").concat(z+W," h").concat(G+1-B,"v1H").concat(B+W,"z"));return}H&&B===null&&(B=G)})}),K.join("")}function x(I,W){return I.slice().map(function(K,U){return U<W.y||U>=W.y+W.h?K:K.map(function(z,B){return B<W.x||B>=W.x+W.w?z:!1})})}function b(I,W){var K=I.imageSettings,U=I.size,z=I.includeMargin;if(K==null)return null;var B=z?s:0,H=W.length+B*2,G=Math.floor(U*L),ee=H/U,ie=(K.width||G)*ee,ue=(K.height||G)*ee,xe=K.x==null?W.length/2-ie/2:K.x*ee,Te=K.y==null?W.length/2-ue/2:K.y*ee,se=null;if(K.excavate){var ve=Math.floor(xe),de=Math.floor(Te),ne=Math.ceil(ie+xe-ve),ae=Math.ceil(ue+Te-de);se={x:ve,y:de,w:ne,h:ae}}return{x:xe,y:Te,h:ue,w:ie,excavation:se}}var y=function(){try{new Path2D().addPath(new Path2D)}catch(I){return!1}return!0}(),T=function(I){p(W,I);function W(){var K,U;_(this,W);for(var z=arguments.length,B=new Array(z),H=0;H<z;H++)B[H]=arguments[H];return U=i(this,(K=n(W)).call.apply(K,[this].concat(B))),v(u(U),"_canvas",void 0),v(u(U),"_image",void 0),v(u(U),"state",{imgLoaded:!1}),v(u(U),"handleImageLoad",function(){U.setState({imgLoaded:!0})}),U}return o(W,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var U=this.props,z=U.value,B=U.size,H=U.level,G=U.bgColor,ee=U.fgColor,ie=U.includeMargin,ue=U.imageSettings,xe=new a(-1,l[H]);if(xe.addData(t(z)),xe.make(),this._canvas!=null){var Te=this._canvas,se=Te.getContext("2d");if(!se)return;var ve=xe.modules;if(ve===null)return;var de=ie?s:0,ne=ve.length+de*2,ae=b(this.props,ve);ue!=null&&ae!=null&&(ae.excavation!=null&&(ve=x(ve,ae.excavation)));var Z=window.devicePixelRatio||1;Te.height=Te.width=B*Z;var le=B/ne*Z;se.scale(le,le),se.fillStyle=G,se.fillRect(0,0,ne,ne),se.fillStyle=ee,y?se.fill(new Path2D(O(ve,de))):ve.forEach(function(Q,q){Q.forEach(function(be,te){be&&se.fillRect(te+de,q+de,1,1)})}),this.state.imgLoaded&&this._image&&ae!=null&&se.drawImage(this._image,ae.x+de,ae.y+de,ae.w,ae.h)}}},{key:"render",value:function(){var U=this,z=this.props,B=z.value,H=z.size,G=z.level,ee=z.bgColor,ie=z.fgColor,ue=z.style,xe=z.includeMargin,Te=z.imageSettings,se=d(z,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),ve=P({height:H,width:H},ue),de=null,ne=Te&&Te.src;return Te!=null&&ne!=null&&(de=g.createElement("img",{src:ne,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Z){return U._image=Z}})),g.createElement(g.Fragment,null,g.createElement("canvas",m({style:ve,height:H,width:H,ref:function(Z){return U._canvas=Z}},se)),de)}}]),W}(g.PureComponent);v(T,"defaultProps",C);var k=function(I){p(W,I);function W(){return _(this,W),i(this,n(W).apply(this,arguments))}return o(W,[{key:"render",value:function(){var U=this.props,z=U.value,B=U.size,H=U.level,G=U.bgColor,ee=U.fgColor,ie=U.includeMargin,ue=U.imageSettings,xe=d(U,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),Te=new a(-1,l[H]);Te.addData(t(z)),Te.make();var se=Te.modules;if(se===null)return null;var ve=ie?s:0,de=se.length+ve*2,ne=b(this.props,se),ae=null;ue!=null&&ne!=null&&(ne.excavation!=null&&(se=x(se,ne.excavation)),ae=g.createElement("image",{xlinkHref:ue.src,height:ne.h,width:ne.w,x:ne.x+ve,y:ne.y+ve,preserveAspectRatio:"none"}));var Z=O(se,ve);return g.createElement("svg",m({shapeRendering:"crispEdges",height:B,width:B,viewBox:"0 0 ".concat(de," ").concat(de)},xe),g.createElement("path",{fill:G,d:"M0,0 h".concat(de,"v").concat(de,"H0z")}),g.createElement("path",{fill:ee,d:Z}),ae)}}]),W}(g.PureComponent);v(k,"defaultProps",C);var N=function(W){var K=W.renderAs,U=d(W,["renderAs"]),z=K==="svg"?k:T;return g.createElement(z,U)};N.defaultProps=P({renderAs:"canvas"},C),j.exports=N},Dgm7:function(j,Y,M){j.exports=M.p+"static/auth.ea067b42.png"},DlQD:function(j,Y,M){(function(D,m){j.exports=m()})(this,function(){"use strict";function D(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 m(ke,Oe,Re){return Oe&&D(ke.prototype,Oe),Re&&D(ke,Re),ke}function S(ke,Oe){if(!ke)return;if(typeof ke=="string")return P(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 P(ke,Oe)}function P(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 d(ke,Oe){var Re;if(typeof Symbol=="undefined"||ke[Symbol.iterator]==null){if(Array.isArray(ke)||(Re=S(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 f(ke,Oe){return Oe={exports:{}},ke(Oe,Oe.exports),Oe.exports}var _=f(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}}),c=_.defaults,o=_.getDefaults,i=_.changeDefaults,n=/[&<>"']/,u=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,v={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=function(Oe){return v[Oe]};function E(ke,Oe){if(Oe){if(n.test(ke))return ke.replace(u,g)}else if(p.test(ke))return ke.replace(h,g);return ke}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ke){return ke.replace(a,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 C(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=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(ke,Oe,Re){if(ke){var pe;try{pe=decodeURIComponent(l(Re)).replace(w,"").toLowerCase()}catch(Ee){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}Oe&&!s.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]=W(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 k={exec:function(){}};function N(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 I(ke,Oe){var Re=ke.replace(/\|/g,function(we,De,Ge){for(var nt=!1,lt=De;--lt>=0&&Ge[lt]==="\\";)nt=!nt;return nt?"|":" |"}),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 W(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 K(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 U(ke){ke&&ke.sanitize&&!ke.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var z={escape:E,unescape:l,edit:C,cleanUrl:L,resolveUrl:T,noopTest:k,merge:N,splitCells:I,rtrim:W,findClosingBracket:K,checkSanitizeDeprecation:U},B=_.defaults,H=z.rtrim,G=z.splitCells,ee=z.escape,ie=z.findClosingBracket;function ue(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 xe(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 Te=function(){function ke(Re){this.options=Re||B}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 Ge=we[0].replace(/^ {4}/gm,"");return{type:"code",raw:we[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:H(Ge,`
`)}}},Oe.fences=function(pe){var Ee=this.rules.block.fences.exec(pe);if(Ee){var we=Ee[0],De=xe(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,Ge;for(Ge=0;Ge<De;Ge++)/^ *-+: *$/.test(we.align[Ge])?we.align[Ge]="right":/^ *:-+: *$/.test(we.align[Ge])?we.align[Ge]="center":/^ *:-+ *$/.test(we.align[Ge])?we.align[Ge]="left":we.align[Ge]=null;for(De=we.cells.length,Ge=0;Ge<De;Ge++)we.cells[Ge]=G(we.cells[Ge],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],Ge=De.length>1,nt=De[De.length-1]===")",lt={type:"list",raw:we,ordered:Ge,start:Ge?+De.slice(0,-1):"",loose:!1,items:[]},ut=Ee[0].match(this.rules.block.item),Rt=!1,tt,nr,Wt,pt,Rr,Ir,Lr,Jr=ut.length,pr=0;pr<Jr;pr++)tt=ut[pr],we=tt,nr=tt.length,tt=tt.replace(/^ *([*+-]|\d+[.)]) */,""),~tt.indexOf(`
`)&&(nr-=tt.length,tt=this.options.pedantic?tt.replace(/^ {1,4}/gm,""):tt.replace(new RegExp("^ {1,"+nr+"}","gm"),"")),pr!==Jr-1&&(Wt=this.rules.block.bullet.exec(ut[pr+1])[0],(Ge?Wt.length===1||!nt&&Wt[Wt.length-1]===")":Wt.length>1||this.options.smartLists&&Wt!==De)&&(pt=ut.slice(pr+1).join(`
`),lt.raw=lt.raw.substring(0,lt.raw.length-pt.length),pr=Jr-1)),Rr=Rt||/\n\n(?!\s*$)/.test(tt),pr!==Jr-1&&(Rt=tt.charAt(tt.length-1)===`
`,Rr||(Rr=Rt)),Rr&&(lt.loose=!0),Ir=/^\[[ xX]\] /.test(tt),Lr=void 0,Ir&&(Lr=tt[1]!==" ",tt=tt.replace(/^\[[ xX]\] +/,"")),lt.items.push({type:"list_item",raw:we,task:Ir,checked:Lr,loose:Rr,text:tt});return lt}},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,Ge;for(Ge=0;Ge<De;Ge++)/^ *-+: *$/.test(we.align[Ge])?we.align[Ge]="right":/^ *:-+: *$/.test(we.align[Ge])?we.align[Ge]="center":/^ *:-+ *$/.test(we.align[Ge])?we.align[Ge]="left":we.align[Ge]=null;for(De=we.cells.length,Ge=0;Ge<De;Ge++)we.cells[Ge]=G(we.cells[Ge].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,Ge=De+Ee[1].length+we;Ee[2]=Ee[2].substring(0,we),Ee[0]=Ee[0].substring(0,Ge).trim(),Ee[3]=""}var nt=Ee[2],lt="";if(this.options.pedantic){var ut=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(nt);ut?(nt=ut[1],lt=ut[3]):lt=""}else lt=Ee[3]?Ee[3].slice(1,-1):"";nt=nt.trim().replace(/^<([\s\S]*)>$/,"$1");var Rt=ue(Ee,{href:nt&&nt.replace(this.rules.inline._escapes,"$1"),title:lt&&lt.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Rt}},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 Ge=we[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var nt=ue(we,De,we[0]);return nt}},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 Ge=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var nt;(De=Ge.exec(Ee))!=null;)if(nt=this.rules.inline.strong.middle.exec(Ee.slice(0,De.index+3)),nt)return{type:"strong",raw:pe.slice(0,nt[0].length),text:pe.slice(2,nt[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 Ge=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var nt;(De=Ge.exec(Ee))!=null;)if(nt=this.rules.inline.em.middle.exec(Ee.slice(0,De.index+2)),nt)return{type:"em",raw:pe.slice(0,nt[0].length),text:pe.slice(1,nt[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),Ge=we.startsWith(" ")&&we.endsWith(" ");return De&&Ge&&(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,Ge;return we[2]==="@"?(De=ee(this.options.mangle?Ee(we[1]):we[1]),Ge="mailto:"+De):(De=ee(we[1]),Ge=De),{type:"link",raw:we[0],text:De,href:Ge,tokens:[{type:"text",raw:De,text:De}]}}},Oe.url=function(pe,Ee){var we;if(we=this.rules.inline.url.exec(pe)){var De,Ge;if(we[2]==="@")De=ee(this.options.mangle?Ee(we[0]):we[0]),Ge="mailto:"+De;else{var nt;do nt=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(nt!==we[0]);De=ee(we[0]),we[1]==="www."?Ge="http://"+De:Ge=De}return{type:"link",raw:we[0],text:De,href:Ge,tokens:[{type:"text",raw:De,text:De}]}}},Oe.inlineText=function(pe,Ee,we){var De=this.rules.inline.text.exec(pe);if(De){var Ge;return Ee?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]:Ge=ee(this.options.smartypants?we(De[0]):De[0]),{type:"text",raw:De[0],text:Ge}}},ke}(),se=z.noopTest,ve=z.edit,de=z.merge,ne={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:se,table:se,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=ve(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=ve(ne.item,"gm").replace(/bull/g,ne.bullet).getRegex(),ne.list=ve(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=ve(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=ve(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=ve(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=de({},ne),ne.gfm=de({},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=ve(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=ve(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=de({},ne.normal,{html:ve(`^ *(?: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:se,paragraph:ve(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:se,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:se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ae._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ae.punctuation=ve(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=ve(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=ve(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=ve(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=ve(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=ve(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=ve(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=ve(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=ve(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=ve(ae._blockSkip,"g").getRegex(),ae.overlapSkip=ve(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=ve(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=ve(ae.tag).replace("comment",ne._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=ve(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=ve(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=ve(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=de({},ae),ae.pedantic=de({},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:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=de({},ae.normal,{escape:ve(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=ve(ae.gfm.url,"i").replace("email",ae.gfm._extended_email).getRegex(),ae.breaks=de({},ae.gfm,{br:ve(ae.br).replace("{2,}","*").getRegex(),text:ve(ae.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Z={block:ne,inline:ae},le=_.defaults,Q=Z.block,q=Z.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 te(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 J=function(){function ke(Re){this.tokens=[],this.tokens.links=Object.create(null),this.options=Re||le,this.options.tokenizer=this.options.tokenizer||new Te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:Q.normal,inline:q.normal};this.options.pedantic?(pe.block=Q.pedantic,pe.inline=q.pedantic):this.options.gfm&&(pe.block=Q.gfm,this.options.breaks?pe.inline=q.breaks:pe.inline=q.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,Ge,nt,lt;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):(lt=Ee[Ee.length-1],lt.raw+=`
`+De.raw,lt.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),nt=De.items.length,Ge=0;Ge<nt;Ge++)De.items[Ge].tokens=this.blockTokens(De.items[Ge].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):(lt=Ee[Ee.length-1],lt.raw+=`
`+De.raw,lt.text+=`
`+De.text);continue}if(pe){var ut="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(ut);break}else throw new Error(ut)}}return Ee},Oe.inline=function(pe){var Ee,we,De,Ge,nt,lt,ut=pe.length;for(Ee=0;Ee<ut;Ee++){lt=pe[Ee];switch(lt.type){case"paragraph":case"text":case"heading":{lt.tokens=[],this.inlineTokens(lt.text,lt.tokens);break}case"table":{for(lt.tokens={header:[],cells:[]},Ge=lt.header.length,we=0;we<Ge;we++)lt.tokens.header[we]=[],this.inlineTokens(lt.header[we],lt.tokens.header[we]);for(Ge=lt.cells.length,we=0;we<Ge;we++)for(nt=lt.cells[we],lt.tokens.cells[we]=[],De=0;De<nt.length;De++)lt.tokens.cells[we][De]=[],this.inlineTokens(nt[De],lt.tokens.cells[we][De]);break}case"blockquote":{this.inline(lt.tokens);break}case"list":{for(Ge=lt.items.length,we=0;we<Ge;we++)this.inline(lt.items[we].tokens);break}}}return pe},Oe.inlineTokens=function(pe,Ee,we,De,Ge){Ee===void 0&&(Ee=[]),we===void 0&&(we=!1),De===void 0&&(De=!1),Ge===void 0&&(Ge="");var nt,lt=pe,ut;if(this.tokens.links){var Rt=Object.keys(this.tokens.links);if(Rt.length>0)for(;(ut=this.tokenizer.rules.inline.reflinkSearch.exec(lt))!=null;)Rt.includes(ut[0].slice(ut[0].lastIndexOf("[")+1,-1))&&(lt=lt.slice(0,ut.index)+"["+"a".repeat(ut[0].length-2)+"]"+lt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ut=this.tokenizer.rules.inline.blockSkip.exec(lt))!=null;)lt=lt.slice(0,ut.index)+"["+"a".repeat(ut[0].length-2)+"]"+lt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if(nt=this.tokenizer.escape(pe)){pe=pe.substring(nt.raw.length),Ee.push(nt);continue}if(nt=this.tokenizer.tag(pe,we,De)){pe=pe.substring(nt.raw.length),we=nt.inLink,De=nt.inRawBlock,Ee.push(nt);continue}if(nt=this.tokenizer.link(pe)){pe=pe.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,De)),Ee.push(nt);continue}if(nt=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,De)),Ee.push(nt);continue}if(nt=this.tokenizer.strong(pe,lt,Ge)){pe=pe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],we,De),Ee.push(nt);continue}if(nt=this.tokenizer.em(pe,lt,Ge)){pe=pe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],we,De),Ee.push(nt);continue}if(nt=this.tokenizer.codespan(pe)){pe=pe.substring(nt.raw.length),Ee.push(nt);continue}if(nt=this.tokenizer.br(pe)){pe=pe.substring(nt.raw.length),Ee.push(nt);continue}if(nt=this.tokenizer.del(pe)){pe=pe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],we,De),Ee.push(nt);continue}if(nt=this.tokenizer.autolink(pe,te)){pe=pe.substring(nt.raw.length),Ee.push(nt);continue}if(!we&&(nt=this.tokenizer.url(pe,te))){pe=pe.substring(nt.raw.length),Ee.push(nt);continue}if(nt=this.tokenizer.inlineText(pe,De,be)){pe=pe.substring(nt.raw.length),Ge=nt.raw.slice(-1),Ee.push(nt);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},m(ke,null,[{key:"rules",get:function(){return{block:Q,inline:q}}}]),ke}(),X=_.defaults,$=z.cleanUrl,ge=z.escape,fe=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 Ge=this.options.highlight(pe,De);Ge!=null&&Ge!==pe&&(we=!0,pe=Ge)}return De?'<pre><code class="'+this.options.langPrefix+ge(De,!0)+'">'+(we?pe:ge(pe,!0))+`</code></pre>
`:"<pre><code>"+(we?pe:ge(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",Ge=Ee&&we!==1?' start="'+we+'"':"";return"<"+De+Ge+`>
`+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="'+ge(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}(),_e=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}(),He=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}(),$e=_.defaults,Ve=z.unescape,et=function(){function ke(Re){this.options=Re||$e,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new He}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,Ge,nt,lt,ut,Rt,tt,nr,Wt,pt,Rr,Ir,Lr,Jr,pr,Qr,Br,Cr,cn=pe.length;for(De=0;De<cn;De++){pt=pe[De];switch(pt.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(pt.tokens),pt.depth,Ve(this.parseInline(pt.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(pt.text,pt.lang,pt.escaped);continue}case"table":{for(nr="",tt="",lt=pt.header.length,Ge=0;Ge<lt;Ge++)tt+=this.renderer.tablecell(this.parseInline(pt.tokens.header[Ge]),{header:!0,align:pt.align[Ge]});for(nr+=this.renderer.tablerow(tt),Wt="",lt=pt.cells.length,Ge=0;Ge<lt;Ge++){for(Rt=pt.tokens.cells[Ge],tt="",ut=Rt.length,nt=0;nt<ut;nt++)tt+=this.renderer.tablecell(this.parseInline(Rt[nt]),{header:!1,align:pt.align[nt]});Wt+=this.renderer.tablerow(tt)}we+=this.renderer.table(nr,Wt);continue}case"blockquote":{Wt=this.parse(pt.tokens),we+=this.renderer.blockquote(Wt);continue}case"list":{for(Rr=pt.ordered,Ir=pt.start,Lr=pt.loose,lt=pt.items.length,Wt="",Ge=0;Ge<lt;Ge++)pr=pt.items[Ge],Qr=pr.checked,Br=pr.task,Jr="",pr.task&&(Cr=this.renderer.checkbox(Qr),Lr?pr.tokens.length>0&&pr.tokens[0].type==="text"?(pr.tokens[0].text=Cr+" "+pr.tokens[0].text,pr.tokens[0].tokens&&pr.tokens[0].tokens.length>0&&pr.tokens[0].tokens[0].type==="text"&&(pr.tokens[0].tokens[0].text=Cr+" "+pr.tokens[0].tokens[0].text)):pr.tokens.unshift({type:"text",text:Cr}):Jr+=Cr),Jr+=this.parse(pr.tokens,Lr),Wt+=this.renderer.listitem(Jr,Br,Qr);we+=this.renderer.list(Wt,Rr,Ir);continue}case"html":{we+=this.renderer.html(pt.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(pt.tokens));continue}case"text":{for(Wt=pt.tokens?this.parseInline(pt.tokens):pt.text;De+1<cn&&pe[De+1].type==="text";)pt=pe[++De],Wt+=`
`+(pt.tokens?this.parseInline(pt.tokens):pt.text);we+=Ee?this.renderer.paragraph(Wt):Wt;continue}default:{var wn='Token with "'+pt.type+'" type was not found.';if(this.options.silent){console.error(wn);return}else throw new Error(wn)}}}return we},Oe.parseInline=function(pe,Ee){Ee=Ee||this.renderer;var we="",De,Ge,nt=pe.length;for(De=0;De<nt;De++){Ge=pe[De];switch(Ge.type){case"escape":{we+=Ee.text(Ge.text);break}case"html":{we+=Ee.html(Ge.text);break}case"link":{we+=Ee.link(Ge.href,Ge.title,this.parseInline(Ge.tokens,Ee));break}case"image":{we+=Ee.image(Ge.href,Ge.title,Ge.text);break}case"strong":{we+=Ee.strong(this.parseInline(Ge.tokens,Ee));break}case"em":{we+=Ee.em(this.parseInline(Ge.tokens,Ee));break}case"codespan":{we+=Ee.codespan(Ge.text);break}case"br":{we+=Ee.br();break}case"del":{we+=Ee.del(this.parseInline(Ge.tokens,Ee));break}case"text":{we+=Ee.text(Ge.text);break}default:{var lt='Token with "'+Ge.type+'" type was not found.';if(this.options.silent){console.error(lt);return}else throw new Error(lt)}}}return we},ke}(),at=z.merge,st=z.checkSanitizeDeprecation,Me=z.escape,Se=_.getDefaults,Ye=_.changeDefaults,it=_.defaults;function Ke(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=at({},Ke.defaults,Oe||{}),st(Oe),Re){var pe=Oe.highlight,Ee;try{Ee=J.lex(ke,Oe)}catch(nt){return Re(nt)}var we=function(lt){var ut;if(!lt)try{ut=et.parse(Ee,Oe)}catch(Rt){lt=Rt}return Oe.highlight=pe,lt?Re(lt):Re(null,ut)};if(!pe||pe.length<3)return we();if(delete Oe.highlight,!Ee.length)return we();var De=0;Ke.walkTokens(Ee,function(nt){nt.type==="code"&&(De++,setTimeout(function(){pe(nt.text,nt.lang,function(lt,ut){if(lt)return we(lt);ut!=null&&ut!==nt.text&&(nt.text=ut,nt.escaped=!0),De--,De===0&&we()})},0))}),De===0&&we();return}try{var Ge=J.lex(ke,Oe);return Oe.walkTokens&&Ke.walkTokens(Ge,Oe.walkTokens),et.parse(Ge,Oe)}catch(nt){if(nt.message+=`
Please report this to https://github.com/markedjs/marked.`,Oe.silent)return"<p>An error occurred:</p><pre>"+Me(nt.message+"",!0)+"</pre>";throw nt}}Ke.options=Ke.setOptions=function(ke){return at(Ke.defaults,ke),Ye(Ke.defaults),Ke},Ke.getDefaults=Se,Ke.defaults=it,Ke.use=function(ke){var Oe=at({},ke);if(ke.renderer&&function(){var pe=Ke.defaults.renderer||new fe,Ee=function(Ge){var nt=pe[Ge];pe[Ge]=function(){for(var lt=arguments.length,ut=new Array(lt),Rt=0;Rt<lt;Rt++)ut[Rt]=arguments[Rt];var tt=ke.renderer[Ge].apply(pe,ut);return tt===!1&&(tt=nt.apply(pe,ut)),tt}};for(var we in ke.renderer)Ee(we);Oe.renderer=pe}(),ke.tokenizer&&function(){var pe=Ke.defaults.tokenizer||new Te,Ee=function(Ge){var nt=pe[Ge];pe[Ge]=function(){for(var lt=arguments.length,ut=new Array(lt),Rt=0;Rt<lt;Rt++)ut[Rt]=arguments[Rt];var tt=ke.tokenizer[Ge].apply(pe,ut);return tt===!1&&(tt=nt.apply(pe,ut)),tt}};for(var we in ke.tokenizer)Ee(we);Oe.tokenizer=pe}(),ke.walkTokens){var Re=Ke.defaults.walkTokens;Oe.walkTokens=function(pe){ke.walkTokens(pe),Re&&Re(pe)}}Ke.setOptions(Oe)},Ke.walkTokens=function(ke,Oe){for(var Re=d(ke),pe;!(pe=Re()).done;){var Ee=pe.value;Oe(Ee);switch(Ee.type){case"table":{for(var we=d(Ee.tokens.header),De;!(De=we()).done;){var Ge=De.value;Ke.walkTokens(Ge,Oe)}for(var nt=d(Ee.tokens.cells),lt;!(lt=nt()).done;)for(var ut=lt.value,Rt=d(ut),tt;!(tt=Rt()).done;){var nr=tt.value;Ke.walkTokens(nr,Oe)}break}case"list":{Ke.walkTokens(Ee.items,Oe);break}default:Ee.tokens&&Ke.walkTokens(Ee.tokens,Oe)}}},Ke.Parser=et,Ke.parser=et.parse,Ke.Renderer=fe,Ke.TextRenderer=_e,Ke.Lexer=J,Ke.lexer=J.lex,Ke.Tokenizer=Te,Ke.Slugger=He,Ke.parse=Ke;var qe=Ke;return qe})},E4JC:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,d=m.algo,f=[],_=[],c=[],o=d.Rabbit=P.extend({_doReset:function(){for(var n=this._key.words,u=this.cfg.iv,p=0;p<4;p++)n[p]=(n[p]<<8|n[p]>>>24)&16711935|(n[p]<<24|n[p]>>>8)&4278255360;var h=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],v=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var p=0;p<4;p++)i.call(this);for(var p=0;p<8;p++)v[p]^=h[p+4&7];if(u){var g=u.words,E=g[0],a=g[1],l=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,t=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,C=l>>>16|t&4294901760,w=t<<16|l&65535;v[0]^=l,v[1]^=C,v[2]^=t,v[3]^=w,v[4]^=l,v[5]^=C,v[6]^=t,v[7]^=w;for(var p=0;p<4;p++)i.call(this)}},_doProcessBlock:function(n,u){var p=this._X;i.call(this),f[0]=p[0]^p[5]>>>16^p[3]<<16,f[1]=p[2]^p[7]>>>16^p[5]<<16,f[2]=p[4]^p[1]>>>16^p[7]<<16,f[3]=p[6]^p[3]>>>16^p[1]<<16;for(var h=0;h<4;h++)f[h]=(f[h]<<8|f[h]>>>24)&16711935|(f[h]<<24|f[h]>>>8)&4278255360,n[u+h]^=f[h]},blockSize:128/32,ivSize:64/32});function i(){for(var n=this._X,u=this._C,p=0;p<8;p++)_[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<_[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<_[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<_[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<_[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<_[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<_[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<_[6]>>>0?1:0)|0,this._b=u[7]>>>0<_[7]>>>0?1:0;for(var p=0;p<8;p++){var h=n[p]+u[p],v=h&65535,g=h>>>16,E=((v*v>>>17)+v*g>>>15)+g*g,a=((h&4294901760)*h|0)+((h&65535)*h|0);c[p]=E^a}n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}m.Rabbit=P._createHelper(o)}(),D.Rabbit})},ELLl:function(j,Y,M){(function(D){D(M("VrN/"))})(function(D){var m={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=D.Pos;D.defineOption("autoCloseBrackets",!1,function(v,g,E){E&&E!=D.Init&&(v.removeKeyMap(d),v.state.closeBrackets=null),g&&(f(P(g,"pairs")),v.state.closeBrackets=g,v.addKeyMap(d))});function P(v,g){return g=="pairs"&&typeof v=="string"?v:typeof v=="object"&&v[g]!=null?v[g]:m[g]}var d={Backspace:o,Enter:i};function f(v){for(var g=0;g<v.length;g++){var E=v.charAt(g),a="'"+E+"'";d[a]||(d[a]=_(E))}}f(m.pairs+"`");function _(v){return function(g){return u(g,v)}}function c(v){var g=v.state.closeBrackets;if(!g||g.override)return g;var E=v.getModeAt(v.getCursor());return E.closeBrackets||g}function o(v){var g=c(v);if(!g||v.getOption("disableInput"))return D.Pass;for(var E=P(g,"pairs"),a=v.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return D.Pass;var t=p(v,a[l].head);if(!t||E.indexOf(t)%2!=0)return D.Pass}for(var l=a.length-1;l>=0;l--){var C=a[l].head;v.replaceRange("",S(C.line,C.ch-1),S(C.line,C.ch+1),"+delete")}}function i(v){var g=c(v),E=g&&P(g,"explode");if(!E||v.getOption("disableInput"))return D.Pass;for(var a=v.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return D.Pass;var t=p(v,a[l].head);if(!t||E.indexOf(t)%2!=0)return D.Pass}v.operation(function(){var C=v.lineSeparator()||`
`;v.replaceSelection(C+C,null),v.execCommand("goCharLeft"),a=v.listSelections();for(var w=0;w<a.length;w++){var s=a[w].head.line;v.indentLine(s,null,!0),v.indentLine(s+1,null,!0)}})}function n(v){var g=D.cmpPos(v.anchor,v.head)>0;return{anchor:new S(v.anchor.line,v.anchor.ch+(g?-1:1)),head:new S(v.head.line,v.head.ch+(g?1:-1))}}function u(v,g){var E=c(v);if(!E||v.getOption("disableInput"))return D.Pass;var a=P(E,"pairs"),l=a.indexOf(g);if(l==-1)return D.Pass;for(var t=P(E,"closeBefore"),C=P(E,"triples"),w=a.charAt(l+1)==g,s=v.listSelections(),L=l%2==0,O,x=0;x<s.length;x++){var b=s[x],y=b.head,T,k=v.getRange(y,S(y.line,y.ch+1));if(L&&!b.empty())T="surround";else if((w||!L)&&k==g)w&&h(v,y)?T="both":C.indexOf(g)>=0&&v.getRange(y,S(y.line,y.ch+3))==g+g+g?T="skipThree":T="skip";else if(w&&y.ch>1&&C.indexOf(g)>=0&&v.getRange(S(y.line,y.ch-2),y)==g+g){if(y.ch>2&&/\bstring/.test(v.getTokenTypeAt(S(y.line,y.ch-2))))return D.Pass;T="addFour"}else if(w){var N=y.ch==0?" ":v.getRange(S(y.line,y.ch-1),y);if(!D.isWordChar(k)&&N!=g&&!D.isWordChar(N))T="both";else return D.Pass}else if(L&&(k.length===0||/\s/.test(k)||t.indexOf(k)>-1))T="both";else return D.Pass;if(!O)O=T;else if(O!=T)return D.Pass}var I=l%2?a.charAt(l-1):g,W=l%2?g:a.charAt(l+1);v.operation(function(){if(O=="skip")v.execCommand("goCharRight");else if(O=="skipThree")for(var K=0;K<3;K++)v.execCommand("goCharRight");else if(O=="surround"){for(var U=v.getSelections(),K=0;K<U.length;K++)U[K]=I+U[K]+W;v.replaceSelections(U,"around"),U=v.listSelections().slice();for(var K=0;K<U.length;K++)U[K]=n(U[K]);v.setSelections(U)}else O=="both"?(v.replaceSelection(I+W,null),v.triggerElectric(I+W),v.execCommand("goCharLeft")):O=="addFour"&&(v.replaceSelection(I+I+I+I,"before"),v.execCommand("goCharRight"))})}function p(v,g){var E=v.getRange(S(g.line,g.ch-1),S(g.line,g.ch+1));return E.length==2?E:null}function h(v,g){var E=v.getTokenAt(S(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,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){/** @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(m){var S=D,P=S.lib,d=P.WordArray,f=P.Hasher,_=S.algo,c=d.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=d.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]),i=d.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]),n=d.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=d.create([0,1518500249,1859775393,2400959708,2840853838]),p=d.create([1352829926,1548603684,1836072691,2053994217,0]),h=_.RIPEMD160=f.extend({_doReset:function(){this._hash=d.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,w){for(var s=0;s<16;s++){var L=w+s,O=C[L];C[L]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var x=this._hash.words,b=u.words,y=p.words,T=c.words,k=o.words,N=i.words,I=n.words,W,K,U,z,B,H,G,ee,ie,ue;H=W=x[0],G=K=x[1],ee=U=x[2],ie=z=x[3],ue=B=x[4];for(var xe,s=0;s<80;s+=1)xe=W+C[w+T[s]]|0,s<16?xe+=v(K,U,z)+b[0]:s<32?xe+=g(K,U,z)+b[1]:s<48?xe+=E(K,U,z)+b[2]:s<64?xe+=a(K,U,z)+b[3]:xe+=l(K,U,z)+b[4],xe=xe|0,xe=t(xe,N[s]),xe=xe+B|0,W=B,B=z,z=t(U,10),U=K,K=xe,xe=H+C[w+k[s]]|0,s<16?xe+=l(G,ee,ie)+y[0]:s<32?xe+=a(G,ee,ie)+y[1]:s<48?xe+=E(G,ee,ie)+y[2]:s<64?xe+=g(G,ee,ie)+y[3]:xe+=v(G,ee,ie)+y[4],xe=xe|0,xe=t(xe,I[s]),xe=xe+ue|0,H=ue,ue=ie,ie=t(ee,10),ee=G,G=xe;xe=x[1]+U+ie|0,x[1]=x[2]+z+ue|0,x[2]=x[3]+B+H|0,x[3]=x[4]+W+G|0,x[4]=x[0]+K+ee|0,x[0]=xe},_doFinalize:function(){var C=this._data,w=C.words,s=this._nDataBytes*8,L=C.sigBytes*8;w[L>>>5]|=128<<24-L%32,w[(L+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,C.sigBytes=(w.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 C=f.clone.call(this);return C._hash=this._hash.clone(),C}});function v(C,w,s){return C^w^s}function g(C,w,s){return C&w|~C&s}function E(C,w,s){return(C|~w)^s}function a(C,w,s){return C&s|w&~s}function l(C,w,s){return C^(w|~s)}function t(C,w){return C<<w|C>>>32-w}S.RIPEMD160=f._createHelper(h),S.HmacRIPEMD160=f._createHmacHelper(h)}(Math),D.RIPEMD160})},ETIr:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=m.enc,f=d.Base64={stringify:function(c){var o=c.words,i=c.sigBytes,n=this._map;c.clamp();for(var u=[],p=0;p<i;p+=3)for(var h=o[p>>>2]>>>24-p%4*8&255,v=o[p+1>>>2]>>>24-(p+1)%4*8&255,g=o[p+2>>>2]>>>24-(p+2)%4*8&255,E=h<<16|v<<8|g,a=0;a<4&&p+a*.75<i;a++)u.push(n.charAt(E>>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;u.length%4;)u.push(l);return u.join("")},parse:function(c){var o=c.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var u=0;u<i.length;u++)n[i.charCodeAt(u)]=u}var p=i.charAt(64);if(p){var h=c.indexOf(p);h!==-1&&(o=h)}return _(c,o,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function _(c,o,i){for(var n=[],u=0,p=0;p<o;p++)if(p%4){var h=i[c.charCodeAt(p-1)]<<p%4*2,v=i[c.charCodeAt(p)]>>>6-p%4*2,g=h|v;n[u>>>2]|=g<<24-u%4*8,u++}return P.create(n,u)}}(),D.enc.Base64})},"F+F2":function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(){if(typeof ArrayBuffer!="function")return;var m=D,S=m.lib,P=S.WordArray,d=P.init,f=P.init=function(_){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),(_ instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array)&&(_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Uint8Array){for(var c=_.byteLength,o=[],i=0;i<c;i++)o[i>>>2]|=_[i]<<24-i%4*8;d.call(this,o,c)}else d.apply(this,arguments)};f.prototype=P}(),D.lib.WordArray})},GRO8:function(j,Y,M){"use strict";M.r(Y);var D=M("k1fw"),m=M("2qtc"),S=M("kLXV"),P=M("lUTK"),d=M("BvKs"),f=M("+L6B"),_=M("2/Rp"),c=M("T2oS"),o=M("W9HT"),i=M("sPJy"),n=M("bE4q"),u=M("miYZ"),p=M("tsqr"),h=M("9og8"),v=M("tJVT"),g=M("PpiC"),E=M("WmNS"),a=M.n(E),l=M("cDcd"),t=M.n(l),C=M("Ty5D"),w=M("55Ip"),s=M("9kvl"),L=M("KeDT"),O=M.n(L),x=M("zrhs"),b=M("DZo9"),y=M("8z0m"),T=M("LtfV"),k=M("KhGG"),N=y.a.Dragger,I=function(Ze){var ht=Ze.user,bt=Ze.dispatch,Ht=Ze.classroomList,Ot=Ze.shixunsDetail,tr=Ze.getResults,Pt=Object(C.i)(),ct=Object(l.useState)(),vt=Object(v.a)(ct,2),yt=vt[0],or=vt[1],Xt=Object(l.useState)([]),zt=Object(v.a)(Xt,2),jt=zt[0],Vt=zt[1],Yt=Object(l.useState)(!1),Qe=Object(v.a)(Yt,2),hr=Qe[0],wr=Qe[1],lr={onRemove:function(){Vt([])},beforeUpload:function(ar){if(console.log(ar),(ar==null?void 0:ar.size)>1024*1024*500)return p.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Kt=[];return Kt.push(ar),Vt([].concat(Kt)),!1},fileList:jt};return t.a.createElement(S.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Ot.actionTabs.key==="md-tab",confirmLoading:hr,onOk:Object(h.a)(a.a.mark(function $t(){var ar,Kt,Jt;return a.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!((jt==null?void 0:jt.length)<=0)){At.next=3;break}return p.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),At.abrupt("return");case 3:return wr(!0),At.next=6,Object(k.c)(jt[0],{login:(ar=ht.userInfo)===null||ar===void 0?void 0:ar.login,container_type:"Competition",container_id:Ot.actionTabs.params.id,stage_type:Ot.actionTabs.params.value,file_name:(Kt=jt[0])===null||Kt===void 0?void 0:Kt.name});case 6:Jt=At.sent,(Jt==null?void 0:Jt.status)===0?(p.b.info("\u63D0\u4EA4\u6210\u529F"),bt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),wr(!1),Vt([]),tr(Ot.actionTabs.params.value)):(wr(!1),p.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return At.stop()}},$t)})),onCancel:function(){Vt([]),bt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,lr,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")))},W=Object(s.a)(function(mt){var Ze=mt.user,ht=mt.classroomList,bt=mt.shixunsDetail;return{user:Ze,classroomList:ht,shixunsDetail:bt}})(I),K=M("14J3"),U=M("BMrR"),z=M("5NDa"),B=M("5rEg"),H=M("9Bee"),G=M("m3rI"),ee=M("ErOA"),ie=M("NLgs"),ue=M("fV52"),xe=M("3I+P"),Te=M("OaEy"),se=M("2fM7"),ve=M("5bA4"),de=M("UESt"),ne=se.a.Option;function ae(mt){var Ze=mt.rewarddata,ht=mt.getlistdatas,bt=mt.is_signed,Ht=mt.dispatch,Ot=mt.userlist,tr=Object(l.useRef)(null),Pt=Object(l.useState)(!1),ct=Object(v.a)(Pt,2),vt=ct[0],yt=ct[1],or=Object(l.useState)(void 0),Xt=Object(v.a)(or,2),zt=Xt[0],jt=Xt[1],Vt=Object(l.useState)(""),Yt=Object(v.a)(Vt,2),Qe=Yt[0],hr=Yt[1],wr=Object(l.useState)(void 0),lr=Object(v.a)(wr,2),$t=lr[0],ar=lr[1],Kt=Object(l.useState)(void 0),Jt=Object(v.a)(Kt,2),Ar=Jt[0],At=Jt[1],kt=Object(l.useState)(void 0),Lt=Object(v.a)(kt,2),Qt=Lt[0],gr=Lt[1];function Xe(Nt){return Ct.apply(this,arguments)}function Ct(){return Ct=Object(h.a)(a.a.mark(function Nt(ur){var Bt;return a.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(!ur.user_received){Mt.next=3;break}return window.open(ur.click_info),Mt.abrupt("return");case 3:if(Object(ie.f)(Ht)){Mt.next=5;break}return Mt.abrupt("return");case 5:if(!(bt===!1)){Mt.next=8;break}return p.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Mt.abrupt("return");case 8:if(!(ur.click_event==="Pop")){Mt.next=14;break}return hr(ur.id),yt(!0),Mt.abrupt("return");case 14:jt(void 0);case 15:return Mt.next=17,Ht({type:"competitions/Reward",payload:{competition_module_setting_id:ur.id}});case 17:Bt=Mt.sent,Bt&&Bt.status===0&&(ht(),ur.click_event==="Link"?(p.b.info("\u9886\u53D6\u6210\u529F"),window.open(ur.click_info)):p.b.info(ur.click_info));case 19:case"end":return Mt.stop()}},Nt)})),Ct.apply(this,arguments)}function kr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(h.a)(a.a.mark(function Nt(){var ur;return a.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!(Ot&&!Ot.real_name)){Et.next=4;break}if($t){Et.next=4;break}return p.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Et.abrupt("return");case 4:if(!(Ot&&!Ot.email)){Et.next=8;break}if(Ar){Et.next=8;break}return p.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Et.abrupt("return");case 8:if(!(Ot&&!Ot.phone)){Et.next=12;break}if(Qt){Et.next=12;break}return p.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Et.abrupt("return");case 12:if(zt){Et.next=15;break}return p.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Et.abrupt("return");case 15:return Et.next=17,Ht({type:"competitions/Reward",payload:{competition_module_setting_id:Qe,className:zt,name:$t,mail:Ar,phone:Qt}});case 17:ur=Et.sent,ur&&ur.status===0&&(yt(!1),ht(),p.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 Et.stop()}},Nt)})),Ur.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(S.a,{visible:vt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return yt(!1)},onOk:function(){kr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(B.a,{className:Ot&&Ot.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Ot&&Ot.phone?"":"#ffffff!important"},value:Ot&&Ot.real_name||$t,disabled:Ot&&Ot.real_name||!1,onChange:function(ur){return ar(ur.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(B.a,{className:Ot&&Ot.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Ot&&Ot.phone?"":"#ffffff!important"},value:Ot&&Ot.email||Ar,disabled:Ot&&Ot.email||!1,onChange:function(ur){return At(ur.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(B.a,{style:{width:"300px"},className:Ot&&Ot.phone?"":"bkfff",value:Ot&&Ot.phone||Qt,disabled:Ot&&Ot.phone||!1,onChange:function(ur){return gr(ur.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(se.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(ur){jt(ur)}},t.a.createElement(ne,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ne,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ne,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ne,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ne,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ne,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ne,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ne,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ne,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ne,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ne,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ne,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ne,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),Ze&&Ze.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){tr.current.prev()}},t.a.createElement(ve.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(xe.a,{ref:tr,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},Ze&&Ze.map(function(Nt,ur){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(Nt.image_url)}),Nt.user_received===!1||Nt.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Xe(Nt)}},"\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(){tr.current.next()}},t.a.createElement(de.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},Ze&&Ze.map(function(Nt,ur){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(Nt.image_url)}),Nt.user_received===!1||Nt.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Xe(Nt)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var Z=ae,le=function(Ze,ht){var bt=Ze.StaffDetail,Ht=Ze.HeaderDetail,Ot=Ze.ItemData,tr=Ze.setIssee,Pt=Ze.ModelType,ct=Ze.dispatch,vt=Ze.userinfo,yt=Ze.Editable,or=Object(l.useState)(!1),Xt=Object(v.a)(or,2),zt=Xt[0],jt=Xt[1],Vt=Object(l.useState)([]),Yt=Object(v.a)(Vt,2),Qe=Yt[0],hr=Yt[1],wr=Object(l.useState)(""),lr=Object(v.a)(wr,2),$t=lr[0],ar=lr[1],Kt=Object(l.useState)(""),Jt=Object(v.a)(Kt,2),Ar=Jt[0],At=Jt[1],kt=Object(l.useState)(!1),Lt=Object(v.a)(kt,2),Qt=Lt[0],gr=Lt[1],Xe=Object(C.i)(),Ct=Xe.identifier,kr=Object(l.useRef)(null),Ur=Object(l.useRef)(null);kr.current=bt==null?void 0:bt.enrolled,Object(l.useEffect)(function(){var Et;return(Et=Ur.current)===null||Et===void 0||Et.addEventListener("click",Nt),function(){var Mt;(Mt=Ur.current)===null||Mt===void 0||Mt.removeEventListener("click",Nt)}},[]);var Nt=function(Mt){var Zt;if((Mt==null||((Zt=Mt.target)===null||Zt===void 0)?void 0:Zt.id)==="modal-upload"){if(!Object(ie.e)(ct))return;if(!kr.current){S.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(l.useEffect)(function(){if(Ht!=null&&Ht.upload_file){var Et,Mt,Zt;hr([{name:Ht==null||((Et=Ht.upload_file)===null||Et===void 0)?void 0:Et.title,status:"done",uid:"123456789"}]),At(Ht==null?void 0:Ht.upload_file_url),ar(Ht==null||((Mt=Ht.upload_file)===null||Mt===void 0||((Zt=Mt.url)===null||Zt===void 0))?void 0:Zt.split("/")[3])}},[Ht==null?void 0:Ht.upload_file]);var ur={name:"file",multiple:!1,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:Qe,onChange:function(Mt){var Zt=Mt.file.status,Gt=[Object(D.a)({},Mt.file)];if(hr(Gt),Mt.file.status==="uploading"&&gr(!0),Zt==="done"){var dt,ft;ar((dt=Gt[0])===null||dt===void 0||((ft=dt.response)===null||ft===void 0)?void 0:ft.id),gr(!1)}Zt==="error"&&(hr([]),gr(!1))},beforeUpload:function(Mt){var Zt=Mt.size/1024/1024<1e3;return Zt?Promise.resolve():(p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Bt=function(){jt(!0)};return Object(l.useImperativeHandle)(ht,function(){return{handleVisible:Bt}}),t.a.createElement("div",{ref:Ur},Pt==="reward"?t.a.createElement(Z,{userlist:vt,dispatch:ct,rewarddata:Ot.reward_setting,is_signed:Ot.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((vt==null?void 0:vt.admin)||(vt==null?void 0:vt.business)||yt)&&t.a.createElement(_.a,{onClick:function(){return tr(!1)}},"\u7F16\u8F91")),t.a.createElement(H.a,{value:Ot.md_content}),Ot&&Ot.attachments&&Ot.attachments.map(function(Et,Mt){return t.a.createElement("div",null,t.a.createElement("a",{href:(G.a===null||G.a===void 0?void 0:G.a.API_SERVER)+Et.url,target:"_self",download:Et.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Et.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Et.filesize)))}),t.a.createElement(S.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:zt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Qt,onCancel:function(){return jt(!1)},onOk:Object(h.a)(a.a.mark(function Et(){var Mt;return a.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(!(!$t&&!Ar)){Gt.next=3;break}return jt(!1),Gt.abrupt("return");case 3:return gr(!0),Gt.next=6,Object(ee.a)("/api/competitions/".concat(Ct,"/upload_file.json"),{method:"post",body:{attachment_id:$t,upload_file_url:Ar}});case 6:Mt=Gt.sent,Mt.status===0&&(jt(!1),gr(!1));case 8:case"end":return Gt.stop()}},Et)}))},t.a.createElement("div",null,t.a.createElement(U.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(B.a,{style:{width:416},value:Ar,onChange:function(Mt){var Zt;return At((Zt=Mt.target)===null||Zt===void 0?void 0:Zt.value)}})),t.a.createElement(U.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(y.a,ur,t.a.createElement(_.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},Q=Object(l.forwardRef)(le),q=M("Ot1p"),be=M("hJwl");function te(mt){var Ze=mt.ItemData,ht=mt.setIssee,bt=mt.MenuItem,Ht=mt.dispatch,Ot=mt.identifier,tr=mt.ModelType,Pt=mt.userinfo,ct=mt.getrightdatas,vt=Object(l.useState)([]),yt=Object(v.a)(vt,2),or=yt[0],Xt=yt[1],zt=Object(l.useState)(Ze.md_content),jt=Object(v.a)(zt,2),Vt=jt[0],Yt=jt[1];Object(l.useEffect)(function(){var ar,Kt=[];Ze==null||((ar=Ze.attachments)===null||ar===void 0)||ar.map(function(Jt){var Ar={uid:Jt.id,name:Jt.title,response:{id:Jt.id}};Kt.push(Ar)}),Xt(Kt)},[Ze==null?void 0:Ze.attachments]);function Qe(){var ar,Kt=[];return Ze==null||((ar=Ze.attachments)===null||ar===void 0)||ar.map(function(Jt){var Ar={uid:Jt==null?void 0:Jt.id,name:Jt.title,response:{id:Jt.id}};Kt.push(Ar)}),Kt}var hr={name:"file",multiple:!0,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",defaultFileList:Qe(),onRemove:function(Kt){Object(be.t)({id:Kt.uid})},onChange:function(Kt){var Jt=Kt.file.status;Jt!=="uploading",Jt==="removed"&&Xt(Kt.fileList),Jt==="done"?(Xt(Kt.fileList),p.b.success("".concat(Kt.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Jt==="error"&&p.b.error("".concat(Kt.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Kt){var Jt=Kt.size/1024/1024<150;return Jt||p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Jt}};console.log(hr);function wr(){return lr.apply(this,arguments)}function lr(){return lr=Object(h.a)(a.a.mark(function ar(){var Kt;return a.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Ar.next=2,Ht({type:"competitions/updateMdContent",payload:{attachment_ids:$t(or),competition_module_id:Ze.id,md_content_id:Ze.md_id,content:Vt,identifier:Ot}});case 2:Kt=Ar.sent,Kt&&(p.b.info("\u63D0\u4EA4\u6210\u529F"),ht(!0),ct(bt));case 4:case"end":return Ar.stop()}},ar)})),lr.apply(this,arguments)}function $t(ar){var Kt=[];return ar&&ar.map(function(Jt){Kt.push(Jt.response.id)}),Kt}return t.a.createElement("div",null,tr==="reward"?t.a.createElement(Z,{userlist:Pt,dispatch:Ht,rewarddata:Ze.reward_setting,is_signed:Ze.is_signed}):null,t.a.createElement(q.a,{defaultValue:Vt,onChange:function(Kt){return Yt(Kt)}}),t.a.createElement(y.a,hr,t.a.createElement(_.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{style:{width:"90px"},type:"primary",onClick:function(){return wr()}},"\u63D0\u4EA4"),t.a.createElement(_.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return ht(!0)}},"\u53D6\u6D88")))}var J=te,X=M("g9YV"),$=M("wCAj"),ge=M("Znn+"),fe=M("ZTPi");function _e(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var He=_e,$e=M("5Dmo"),Ve=M("3S7+"),et=M("jCWc"),at=M("kPKH"),st=M("IzEo"),Me=M("bx4M");function Se(mt){var Ze=mt.oneItem,ht=mt.towItem,bt=mt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(U.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(at.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(w.a,{to:"/users/".concat(ht==null?void 0:ht.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(ht==null?void 0:ht.user_image)}),(ht==null?void 0:ht.competition_prize)&&t.a.createElement("p",{className:O.a.prize},ht==null?void 0:ht.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},ht==null?void 0:ht.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},ht==null?void 0:ht.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},ht==null?void 0:ht.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(ht==null?void 0:ht.extra_score)+parseFloat(ht==null?void 0:ht.score),"\u5206"))),t.a.createElement(at.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(w.a,{to:"/users/".concat(Ze==null?void 0:Ze.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Ze==null?void 0:Ze.user_image)}),(Ze==null?void 0:Ze.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Ze==null?void 0:Ze.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Ze==null?void 0:Ze.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Ze==null?void 0:Ze.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Ze==null?void 0:Ze.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Ze==null?void 0:Ze.extra_score)+parseFloat(Ze==null?void 0:Ze.score),"\u5206"))),t.a.createElement(at.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(w.a,{to:"/users/".concat(bt==null?void 0:bt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(bt==null?void 0:bt.user_image)}),(bt==null?void 0:bt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},bt==null?void 0:bt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},bt==null?void 0:bt.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},bt==null?void 0:bt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},bt==null?void 0:bt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(bt==null?void 0:bt.extra_score)+parseFloat(bt==null?void 0:bt.score),"\u5206")))))}var Ye=Se;function it(mt){var Ze,ht,bt,Ht,Ot,tr,Pt,ct,vt,yt,or,Xt,zt,jt,Vt,Yt,Qe,hr,wr,lr,$t,ar,Kt,Jt,Ar,At,kt,Lt,Qt,gr,Xe=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:Xe==null?void 0:Xe.teams[0],towItem:Xe==null?void 0:Xe.teams[1],threeItem:Xe==null?void 0:Xe.teams[2]}),(Xe==null||((Ze=Xe.user_ranks)===null||Ze===void 0)?void 0:Ze.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(Xe==null||((ht=Xe.user_ranks)===null||ht===void 0||((bt=ht[0])===null||bt===void 0))?void 0:bt.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:(Xe==null||((Ht=Xe.user_ranks)===null||Ht===void 0||((Ot=Ht[0])===null||Ot===void 0))?void 0:Ot.success)===!1?"red":"green"}},(Xe==null||((tr=Xe.user_ranks)===null||tr===void 0||((Pt=tr[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"\u5426":Xe!=null&&(ct=Xe.user_ranks)!==null&&ct!==void 0&&(vt=ct[0])!==null&&vt!==void 0&&vt.success?"\u662F":"")),(Xe==null||((yt=Xe.user_ranks)===null||yt===void 0||((or=yt[0])===null||or===void 0))?void 0:or.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(Xe==null||((Xt=Xe.user_ranks)===null||Xt===void 0||((zt=Xt[0])===null||zt===void 0))?void 0:zt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(Xe==null||((jt=Xe.user_ranks)===null||jt===void 0||((Vt=jt[0])===null||Vt===void 0))?void 0:Vt.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",Xe==null||((Yt=Xe.user_ranks)===null||Yt===void 0||((Qe=Yt[0])===null||Qe===void 0))?void 0:Qe.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u6218\u961F\u540D"},Xe==null||((hr=Xe.user_ranks)===null||hr===void 0||((wr=hr[0])===null||wr===void 0))?void 0:wr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u65F6\u95F4"},Xe==null||((lr=Xe.user_ranks)===null||lr===void 0||(($t=lr[0])===null||$t===void 0))?void 0:$t.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Ve.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Xe==null||((ar=Xe.user_ranks)===null||ar===void 0||((Kt=ar[0])===null||Kt===void 0))?void 0:Kt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Xe==null||((Jt=Xe.user_ranks)===null||Jt===void 0||((Ar=Jt[0])===null||Ar===void 0))?void 0:Ar.score)),t.a.createElement("span",null,t.a.createElement(Ve.a,{title:"\u603B\u5206"},parseFloat(Xe==null||((At=Xe.user_ranks)===null||At===void 0||((kt=At[0])===null||kt===void 0))?void 0:kt.extra_score)+parseFloat(Xe==null||((Lt=Xe.user_ranks)===null||Lt===void 0||((Qt=Lt[0])===null||Qt===void 0))?void 0:Qt.score)||0))),Xe==null||((gr=Xe.teams)===null||gr===void 0)?void 0:gr.map(function(Ct,kr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},kr+1),t.a.createElement(w.a,{to:"/users/".concat(Ct==null?void 0:Ct.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Ct==null?void 0:Ct.user_image)}),(Ct==null?void 0:Ct.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},Ct==null?void 0:Ct.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u6218\u961F\u540D"},Ct==null?void 0:Ct.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},Ct.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Ve.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Ct.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Ve.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Ct.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(Ve.a,{title:"\u603B\u5206"},parseFloat(Ct.extra_score)+parseFloat(Ct.score))))}))}var Ke=it,qe=fe.a.TabPane;function ke(mt){var Ze,ht,bt,Ht,Ot,tr,Pt=mt.ChartRules,ct=mt.ItemData,vt=mt.getCharts,yt=mt.Selectkey,or=mt.getChartRules,Xt=mt.userinfo,zt=mt.Editable,jt=mt.HeaderDetail,Vt=Object(l.useState)(!1),Yt=Object(v.a)(Vt,2),Qe=Yt[0],hr=Yt[1],wr=Object(l.useState)(""),lr=Object(v.a)(wr,2),$t=lr[0],ar=lr[1],Kt=Object(l.useState)(!0),Jt=Object(v.a)(Kt,2),Ar=Jt[0],At=Jt[1],kt=Object(l.useState)(),Lt=Object(v.a)(kt,2),Qt=Lt[0],gr=Lt[1],Xe=Object(l.useState)(),Ct=Object(v.a)(Xe,2),kr=Ct[0],Ur=Ct[1],Nt=Object(C.i)(),ur=Nt.identifier;Object(l.useEffect)(function(){if(Ar){var Zt,Gt=Pt==null||((Zt=Pt.stages)===null||Zt===void 0)?void 0:Zt[0];if(gr(Gt),Gt!=null&&Gt.id){var dt,ft,It;((jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog")&&vt(Gt==null?void 0:Gt.id),ar(((dt=Pt.rule_contents)===null||dt===void 0||((ft=dt.filter(function(Vr){return parseInt(Vr.competition_stage_id)===parseInt(Gt==null?void 0:Gt.id)}))===null||ft===void 0||((It=ft[0])===null||It===void 0))?void 0:It.content)||"")}else{var _t,Er,Gr;(jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog",ar(((_t=Pt.rule_contents)===null||_t===void 0||((Er=_t.filter(function(Vr){return parseInt(Vr.competition_stage_id)===0}))===null||Er===void 0||((Gr=Er[0])===null||Gr===void 0))?void 0:Gr.content)||"")}}},[Pt]);function Bt(){return Et.apply(this,arguments)}function Et(){return Et=Object(h.a)(a.a.mark(function Zt(){var Gt,dt,ft,It,_t,Er,Gr,Vr,br;return a.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if($t){Sr.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Sr.abrupt("return");case 3:if(At(!1),Gt=Qt==null?void 0:Qt.id,!Gt){Sr.next=12;break}return Sr.next=8,Object(ee.a)("/api/competitions/".concat(ur,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:$t,md_content_id:(dt=Pt.rule_contents)===null||dt===void 0||((ft=dt.filter(function(qr){return parseInt(qr.competition_stage_id)===parseInt(Gt)}))===null||ft===void 0||((It=ft[0])===null||It===void 0))?void 0:It.id,stage_id:Qt==null?void 0:Qt.id}});case 8:_t=Sr.sent,_t.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),hr(!1),or()),Sr.next=16;break;case 12:return Sr.next=14,Object(ee.a)("/api/competitions/".concat(ur,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:$t,md_content_id:(Er=Pt.rule_contents)===null||Er===void 0||((Gr=Er.filter(function(qr){return parseInt(qr.competition_stage_id)===0}))===null||Gr===void 0||((Vr=Gr[0])===null||Vr===void 0))?void 0:Vr.id,stage_id:Qt==null?void 0:Qt.id}});case 14:br=Sr.sent,br.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),hr(!1),or());case 16:case"end":return Sr.stop()}},Zt)})),Et.apply(this,arguments)}var Mt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Gt,dt,ft){return t.a.createElement("span",null,ft+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Gt){return t.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Gt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Gt){return t.a.createElement("span",{title:Gt},Gt&&(Gt==null?void 0:Gt.length)>=15?(Gt==null?void 0:Gt.substr(0,15))+"...":Gt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Gt){return t.a.createElement("span",null,Gt||"--")}},{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(Gt){return t.a.createElement("span",null,Gt||"--")}}];return t.a.createElement("div",null,(Pt==null||((Ze=Pt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(He,null),(Pt==null||((ht=Pt.stages)===null||ht===void 0)?void 0:ht.length)>0&&t.a.createElement(fe.a,{animated:!0,tabBarExtraContent:((Xt==null?void 0:Xt.admin)||(Xt==null?void 0:Xt.business)||zt)&&t.a.createElement(_.a,{onClick:function(){hr(!0)}},"\u7F16\u8F91"),onChange:function(Gt){var dt,ft,It,_t,Er;hr(!1);var Gr=Pt==null||((dt=Pt.stages)===null||dt===void 0)?void 0:dt.filter(function(br){return parseInt(Gt)===parseInt(br==null?void 0:br.id)})[0];gr(Gr);var Vr=Gr==null||((ft=Gr.children)===null||ft===void 0)?void 0:ft[0];Ur(Vr),ar(((It=Pt.rule_contents)===null||It===void 0||((_t=It.filter(function(br){return parseInt(br.competition_stage_id)===parseInt(Gr==null?void 0:Gr.id)}))===null||_t===void 0||((Er=_t[0])===null||Er===void 0))?void 0:Er.content)||""),vt((Vr==null?void 0:Vr.id)||Gt)}},Pt&&Pt.stages.map(function(Zt,Gt){return t.a.createElement(qe,{tab:Zt.name,key:Zt.id===null?0:Zt.id},Qe===!1&&Pt&&Pt.rule_contents.map(function(dt,ft){if(Zt.id===dt.competition_stage_id)return t.a.createElement(H.a,{key:ft,value:dt.content===void 0||dt.content===null?"":dt.content});if(Zt.id===null&&dt.competition_stage_id===0)return t.a.createElement(H.a,{key:ft,value:dt.content===void 0||dt.content===null?"":dt.content})}))})),(Qt==null||((bt=Qt.children)===null||bt===void 0)?void 0:bt.length)>0&&t.a.createElement(fe.a,{activeKey:(kr==null?void 0:kr.id)+"",onChange:function(Gt){var dt,ft=Qt==null||((dt=Qt.children)===null||dt===void 0)?void 0:dt.filter(function(It){return parseInt(Gt)===parseInt(It==null?void 0:It.id)})[0];Ur(ft),vt(Gt)}},Qt==null||((Ht=Qt.children)===null||Ht===void 0)?void 0:Ht.map(function(Zt,Gt){return t.a.createElement(qe,{tab:Zt.name,key:Zt.id===null?0:Zt.id})})),Qe&&t.a.createElement("div",null,t.a.createElement(q.a,{defaultValue:$t,onChange:function(Gt){ar(Gt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{style:{width:"90px"},type:"primary",onClick:function(){return Bt()}},"\u63D0\u4EA4"),t.a.createElement(_.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return hr(!1)}},"\u53D6\u6D88"))),(ct==null||((Ot=ct.teams)===null||Ot===void 0)?void 0:Ot.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:ct==null?void 0:ct.teams,columns:Mt,pagination:!1}):(ct==null||((tr=ct.teams)===null||tr===void 0)?void 0:tr.length)>0&&t.a.createElement(Ke,{ItemData:ct}))}var Oe=ke,Re=M("/zsF"),pe=M("PArb");function Ee(mt){var Ze,ht,bt,Ht,Ot,tr,Pt,ct=mt.Prize,vt=Object(C.i)(),yt=Object(l.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"}]),or=Object(v.a)(yt,2),Xt=or[0],zt=or[1],jt=function(){var Vt=Object(h.a)(a.a.mark(function Yt(Qe){var hr;return a.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.next=2,Object(be.u)({type:Qe.type,id:vt.identifier});case 2:hr=lr.sent,(hr==null?void 0:hr.status)===0&&(location.href="/competitions/exports?id=".concat(vt.identifier,"&type=").concat(Qe.type));case 4:case"end":return lr.stop()}},Yt)}));return function(Qe){return Vt.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"),(ct==null||((Ze=ct.personal_certifications)===null||Ze===void 0)?void 0:Ze.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:G.a.API_SERVER+"".concat(ct==null||((ht=ct.personal_certifications[0])===null||ht===void 0)?void 0:ht.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")),(ct==null||((bt=ct.team_certifications)===null||bt===void 0)?void 0:bt.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(ct==null||((Ht=ct.team_certifications[0])===null||Ht===void 0)?void 0:Ht.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),(ct==null||((Ot=ct.teams)===null||Ot===void 0)?void 0:Ot.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ct==null?void 0:ct.teams)&&(ct==null||((tr=ct.teams[0])===null||tr===void 0)?void 0:tr.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")),(ct==null?void 0:ct.teams)&&(ct==null||((Pt=ct.teams[0])===null||Pt===void 0)?void 0:Pt.team_members.map(function(Vt,Yt){var Qe,hr,wr,lr,$t,ar;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},Vt==null?void 0:Vt.role),t.a.createElement("span",{style:{width:"5%"}},Vt==null?void 0:Vt.name),t.a.createElement("span",{style:{width:"10%"}},(Vt==null?void 0:Vt.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Vt==null?void 0:Vt.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(Vt==null?void 0:Vt.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Vt==null?void 0:Vt.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},Vt!=null&&Vt.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},Vt!=null&&Vt.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(Vt==null?void 0:Vt.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ct==null?void 0:ct.teams)&&(ct==null||((Qe=ct.teams[0])===null||Qe===void 0||((hr=Qe.bank_account)===null||hr===void 0))?void 0:hr.bank),(ct==null?void 0:ct.teams)&&(ct==null||((wr=ct.teams[0])===null||wr===void 0||((lr=wr.bank_account)===null||lr===void 0))?void 0:lr.second_bank),(ct==null?void 0:ct.teams)&&(ct==null||(($t=ct.teams[0])===null||$t===void 0||((ar=$t.bank_account)===null||ar===void 0))?void 0:ar.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(U.a,{gutter:[20,20]},Xt.map(function(Vt,Yt){return t.a.createElement(at.a,{key:Yt},t.a.createElement(_.a,{type:"primary",onClick:function(){return jt(Vt)}},Vt.name))})))}var we=Ee,De=M("0Owb"),Ge=M("7Kak"),nt=M("9yH6"),lt=M("y8nQ"),ut=M("Vl3Y"),Rt=M("1vsH"),tt=M("Dgm7"),nr=M.n(tt),Wt=M("NnUe"),pt=M.n(Wt),Rr=y.a.Dragger,Ir=10,Lr=function(Ze){var ht=Ze.user,bt=Ze.account,Ht=Ze.globalSetting,Ot=Ze.loading,tr=Ze.dispatch,Pt=Object(g.a)(Ze,["user","account","globalSetting","loading","dispatch"]),ct=ut.a.useForm(),vt=Object(v.a)(ct,1),yt=vt[0],or=Object(l.useState)({}),Xt=Object(v.a)(or,2),zt=Xt[0],jt=Xt[1],Vt=Object(l.useState)(!0),Yt=Object(v.a)(Vt,2),Qe=Yt[0],hr=Yt[1],wr=Object(l.useState)(),lr=Object(v.a)(wr,2),$t=lr[0],ar=lr[1],Kt=Object(l.useState)(),Jt=Object(v.a)(Kt,2),Ar=Jt[0],At=Jt[1],kt=Object(l.useState)(),Lt=Object(v.a)(kt,2),Qt=Lt[0],gr=Lt[1],Xe=Object(l.useState)(),Ct=Object(v.a)(Xe,2),kr=Ct[0],Ur=Ct[1];Object(l.useEffect)(function(){if(!bt.basicInfo)return;var Gt=bt.basicInfo,dt={name:Gt.show_realname?Gt.name:Object(Rt.I)(Gt.name),gender:Gt.gender};ar(Gt.name),hr(Gt.show_realname),yt.setFieldsValue(dt),jt(dt)},[bt.basicInfo]);var Nt=function(dt){if(dt.file.status==="uploading"){Ur(!0);return}if(dt.file.status==="done"){var ft;console.log(dt.file,dt.file.response),gr((ft=dt.file.response)===null||ft===void 0?void 0:ft.id),Object(Rt.E)(dt.file.originFileObj,function(It){At(It),Ur(!1)})}},ur=function(dt){jt(Object(D.a)({},yt.getFieldsValue())),"name"in dt&&ar(dt.name)},Bt=function(){var dt=!Qe;hr(dt);var ft=dt?$t:Object(Rt.I)($t);yt.setFieldsValue({name:ft})},Et=function(){var Gt=Object(h.a)(a.a.mark(function dt(ft){var It,_t,Er,Gr,Vr,br,Hr,Sr;return a.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:if(Er=ft||{},Gr=Er.name,Vr=Er.gender,br=Er.idNumber,Ar){Mr.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Mr.abrupt("return");case 4:return Mr.next=6,tr({type:"account/applyRealNameAuth",payload:{id:((It=bt.basicInfo)===null||It===void 0?void 0:It.id)||((_t=ht.userInfo)===null||_t===void 0?void 0:_t.login),name:Gr,gender:Vr,id_number:br,show_realname:Qe,attachment_ids:[Qt]}});case 6:Hr=Mr.sent,Mt(),Hr&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),tr({type:"account/getBasicInfo",payload:{login:(Sr=ht.userInfo)===null||Sr===void 0?void 0:Sr.login}}));case 9:case"end":return Mr.stop()}},dt)}));return function(ft){return Gt.apply(this,arguments)}}(),Mt=function(){tr({type:"account/setActionTabs",payload:{}})},Zt={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:pt.a.uploader,onChange:Nt,beforeUpload:function(dt){var ft=dt.type==="image/jpeg"||dt.type==="image/png"||dt.type==="image/jpg"||dt.type==="image/bmp";return ft||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),ft}};return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:bt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(o.a,{spinning:!!kr},t.a.createElement(ut.a,{className:pt.a.formWrap,form:yt,layout:"horizontal",onValuesChange:ur,onFinish:Et},t.a.createElement(ut.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:Rt.L}],extra:t.a.createElement("span",null,Qe?"\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(B.a,{disabled:!Qe,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(Qe?"icon-xianshi":"icon-yincang"," font18 ").concat(pt.a.color0152d9),onClick:Bt})})),t.a.createElement(ut.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(nt.a.Group,null,t.a.createElement(nt.a,{value:0},"\u7537"),t.a.createElement(nt.a,{value:1},"\u5973"))),t.a.createElement(ut.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(B.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(ut.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:pt.a.flexRow},t.a.createElement("div",{className:"".concat(pt.a.flexColumn," ").concat(pt.a.example)},t.a.createElement("span",{className:pt.a.exampleImg},t.a.createElement("img",{src:nr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(pt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:pt.a.flexColumn},t.a.createElement(Rr,Object(De.a)({},Zt,{accept:".png,.jpg,.bmp,.jpeg"}),Ar?t.a.createElement("img",{src:Ar,className:pt.a.uploadImg}):t.a.createElement("div",{className:pt.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(pt.a.uploadTipIcon)})),t.a.createElement("p",{className:pt.a.uploadTip},t.a.createElement("a",{className:pt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:pt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:pt.a.footerWrap},t.a.createElement(ut.a.Item,null,t.a.createElement(_.a,{className:"mr5",size:"large",onClick:Mt},"\u53D6\u6D88"),t.a.createElement(_.a,{size:"large",type:"primary",htmlType:"submit",loading:Ot["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:pt.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")))))},Jr=Object(s.a)(function(mt){var Ze=mt.user,ht=mt.account,bt=mt.loading,Ht=mt.globalSetting;return{user:Ze,account:ht,globalSetting:Ht,loading:bt.effects}})(Lr),pr=M("O3gP"),Qr=M("lrIw"),Br=M("KXlV"),Cr=M.n(Br),cn=M("Sjjz"),wn=M.n(cn),Hn=B.a.TextArea,sn=function(Ze){var ht=Ze.account,bt=Ze.globalSetting,Ht=Ze.loading,Ot=Ze.dispatch,tr=Ze.schoolName,Pt=Ze.departmentName,ct=Ze.visible,vt=Ze.onClose,yt=vt===void 0?function(){}:vt,or=Ze.onSuccess,Xt=or===void 0?function(){}:or,zt=Object(g.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),jt=ut.a.useForm(),Vt=Object(v.a)(jt,1),Yt=Vt[0],Qe=Object(l.useRef)();Object(l.useEffect)(function(){Qe.current=zt.schoolId},[zt.schoolId]),Object(l.useEffect)(function(){Yt.setFieldsValue({department:Pt})},[Pt]);var hr=function(){var wr=Object(h.a)(a.a.mark(function lr($t){var ar,Kt,Jt,Ar;return a.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return ar=$t||{},Kt=ar.department,Jt=ar.remarks,kt.next=3,Ot({type:"account/appplyDepartment",payload:{school_id:Qe.current,name:Kt,remarks:Jt}});case 3:Ar=kt.sent,yt(),Ar&&(p.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),Xt(Kt));case 6:case"end":return kt.stop()}},lr)}));return function($t){return wr.apply(this,arguments)}}();return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ct,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(ut.a,{className:wn.a.formWrap,form:Yt,labelCol:{span:4},wrapperCol:{span:20},onFinish:hr},t.a.createElement(ut.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},tr),t.a.createElement(ut.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(B.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(ut.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Hn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:wn.a.footerWrap},t.a.createElement(ut.a.Item,null,t.a.createElement(_.a,{className:"mr5",size:"large",onClick:function(){yt()}},"\u53D6\u6D88"),t.a.createElement(_.a,{size:"large",type:"primary",htmlType:"submit",loading:Ht["account/appplyDepartment"]},"\u4FDD\u5B58")))))},_a=Object(s.a)(function(mt){var Ze=mt.account,ht=mt.loading,bt=mt.globalSetting;return{account:Ze,globalSetting:bt,loading:ht.effects}})(sn),wa=M("6UJt"),mn=M("DFOY"),sr=M("jO45"),Kn=M("jN4g"),Ta=M("gJ3r"),jn=M("jwmR"),Zr=M.n(jn),Ln=function(Ze,ht){return ht.some(function(bt){return bt.label.toLowerCase().indexOf(Ze.toLowerCase())>-1})},ga=B.a.TextArea,fa=function(Ze){var ht=Ze.account,bt=Ze.globalSetting,Ht=Ze.loading,Ot=Ze.dispatch,tr=Ze.schoolName,Pt=Ze.visible,ct=Ze.onClose,vt=ct===void 0?function(){}:ct,yt=Ze.onSuccess,or=yt===void 0?function(){}:yt,Xt=Object(g.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),zt=ut.a.useForm(),jt=Object(v.a)(zt,1),Vt=jt[0];Object(l.useEffect)(function(){Vt.setFieldsValue({name:tr})},[tr]);var Yt=function(){var Qe=Object(h.a)(a.a.mark(function hr(wr){var lr,$t,ar,Kt,Jt,Ar,At;return a.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return lr=wr||{},$t=lr.name,ar=lr.city,Kt=ar===void 0?[]:ar,Jt=lr.address,Ar=lr.remarks,Lt.next=3,Ot({type:"account/appplySchool",payload:{name:$t,province:Kt[0],city:Kt[1],address:Jt,remarks:Ar}});case 3:At=Lt.sent,vt(),At&&(p.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),or($t));case 6:case"end":return Lt.stop()}},hr)}));return function(wr){return Qe.apply(this,arguments)}}();return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Pt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(ut.a,{className:Zr.a.formWrap,form:Vt,labelCol:{span:4},wrapperCol:{span:20},onFinish:Yt},t.a.createElement(ut.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(B.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Zr.a.flexRow," ").concat(Zr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Zr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(sr.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Kn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(ut.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(mn.a,{allowClear:!0,size:"large",options:Ta.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Ln}})),t.a.createElement(ut.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(B.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(ut.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(ga,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Zr.a.footerWrap},t.a.createElement(ut.a.Item,null,t.a.createElement(_.a,{className:"mr5",size:"large",onClick:function(){vt()}},"\u53D6\u6D88"),t.a.createElement(_.a,{size:"large",type:"primary",htmlType:"submit",loading:Ht["account/appplySchool"]},"\u4FDD\u5B58")))))},Tt=Object(s.a)(function(mt){var Ze=mt.account,ht=mt.loading,bt=mt.globalSetting;return{account:Ze,globalSetting:bt,loading:ht.effects}})(fa),fr=se.a.Option,na=y.a.Dragger,ha=function(Ze){var ht,bt,Ht=Ze.user,Ot=Ze.account,tr=Ze.globalSetting,Pt=Ze.loading,ct=Ze.dispatch,vt=Ze.Scoid,yt=Object(g.a)(Ze,["user","account","globalSetting","loading","dispatch","Scoid"]),or=ut.a.useForm(),Xt=Object(v.a)(or,1),zt=Xt[0],jt=Object(l.useState)({}),Vt=Object(v.a)(jt,2),Yt=Vt[0],Qe=Vt[1],hr=Object(l.useState)([]),wr=Object(v.a)(hr,2),lr=wr[0],$t=wr[1],ar=Object(l.useState)([]),Kt=Object(v.a)(ar,2),Jt=Kt[0],Ar=Kt[1],At=Object(l.useState)([]),kt=Object(v.a)(At,2),Lt=kt[0],Qt=kt[1],gr=Object(l.useState)([]),Xe=Object(v.a)(gr,2),Ct=Xe[0],kr=Xe[1],Ur=Object(l.useState)(),Nt=Object(v.a)(Ur,2),ur=Nt[0],Bt=Nt[1],Et=Object(l.useState)(),Mt=Object(v.a)(Et,2),Zt=Mt[0],Gt=Mt[1],dt=Object(l.useState)(),ft=Object(v.a)(dt,2),It=ft[0],_t=ft[1],Er=Object(l.useState)(),Gr=Object(v.a)(Er,2),Vr=Gr[0],br=Gr[1],Hr=Object(l.useState)(),Sr=Object(v.a)(Hr,2),qr=Sr[0],Mr=Sr[1];Object(l.useEffect)(function(){en()},[]),Object(l.useEffect)(function(){Object(h.a)(a.a.mark(function Ue(){var Ne;return a.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:if(vt){ot.next=2;break}return ot.abrupt("return");case 2:return ot.next=4,Mn(vt);case 4:Ne=ot.sent,Qt(Ne==null?void 0:Ne.departments);case 6:case"end":return ot.stop()}},Ue)}))()},[vt]);var en=function(){var Ue=Object(h.a)(a.a.mark(function Ne(){var ze;return a.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,ct({type:"account/getSchoolOption"});case 2:ze=xt.sent,$t(ze==null?void 0:ze.schools);case 4:case"end":return xt.stop()}},Ne)}));return function(){return Ue.apply(this,arguments)}}(),Mn=function(Ne){return ct({type:"account/getDepartmentOption",payload:{id:Ne}})};Object(l.useEffect)(function(){if(!Ot.basicInfo)return;var Ue=Ot.basicInfo,Ne={identity:Ue.identity,school:Ue.school_name,department:Ue.department_name,studentNo:Ue.student_id,jobTitle:Ue.identity=="teacher"?Ue.technical_title:"\u6559\u6388",manager:Ue.identity=="professional"?Ue.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};zt.setFieldsValue(Ne),Qe(Ne)},[Ot.basicInfo]);var Ae=function(){br(!0)},Fe=function(){if(!lr.find(function(Ne){return Ne.name===Yt.school})){p.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Mr(!0)},We=function(Ne){if(Qe(Object(D.a)({},zt.getFieldsValue())),"school"in Ne){Ar(lr.filter(function(ot){return ot.name.includes(Ne.school)}));var ze=(lr.find(function(ot){return ot.name===Ne.school})||{}).id;ze?Le(Ne.school):(zt.setFieldsValue({department:""}),Qe(Object(D.a)(Object(D.a)({},Yt),{school:Ne.school,department:""})))}},Le=function(){var Ue=Object(h.a)(a.a.mark(function Ne(ze,ot){var xt,wt,Ft,xr,jr,Nr;return a.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return xr=(xt=lr.find(function(Kr){return Kr.name===ze}))===null||xt===void 0?void 0:xt.id,Dr.next=3,Mn(xr);case 3:if(Dr.t0=Dr.sent,Dr.t0){Dr.next=6;break}Dr.t0={};case 6:jr=Dr.t0,Qt(jr==null?void 0:jr.departments),Nr=ot||(jr==null||((wt=jr.departments)===null||wt===void 0||((Ft=wt[0])===null||Ft===void 0))?void 0:Ft.name),zt.setFieldsValue({department:Nr}),Qe(Object(D.a)(Object(D.a)({},Yt),{school:ze,department:Nr}));case 11:case"end":return Dr.stop()}},Ne)}));return function(ze,ot){return Ue.apply(this,arguments)}}(),he=function(){var Ue=Object(h.a)(a.a.mark(function Ne(ze){return a.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,en();case 2:zt.setFieldsValue({school:ze,department:""}),Qe(Object(D.a)(Object(D.a)({},Yt),{school:ze,department:""}));case 4:case"end":return xt.stop()}},Ne)}));return function(ze){return Ue.apply(this,arguments)}}(),Ce=function(Ne){if(Ne.file.status==="uploading"){_t(!0);return}if(Ne.file.status==="done"){var ze;console.log(Ne.file,Ne.file.response),Gt((ze=Ne.file.response)===null||ze===void 0?void 0:ze.id),Object(Rt.E)(Ne.file.originFileObj,function(ot){Bt(ot),_t(!1)})}},ye=function(){var Ue=Object(h.a)(a.a.mark(function Ne(ze){var ot,xt,wt,Ft,xr,jr,Nr,Wr,Dr,Kr,zr,rn,$r,vn,Yr,Tr;return a.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(xr=ze||{},jr=xr.school,Nr=xr.department,Wr=xr.identity,Dr=xr.studentNo,Kr=xr.jobTitle,zr=xr.manager,ur){Xr.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Xr.abrupt("return");case 4:return rn=(ot=lr.find(function(tn){return tn.name===jr}))===null||ot===void 0?void 0:ot.id,$r=(xt=Lt.find(function(tn){return tn.name===Nr}))===null||xt===void 0?void 0:xt.id,Wr==="student"?vn=Dr:Wr==="teacher"?vn=Kr:vn=zr,Xr.next=9,ct({type:"account/applyProfessionalAuth",payload:{id:((wt=Ot.basicInfo)===null||wt===void 0?void 0:wt.id)||((Ft=Ht.userInfo)===null||Ft===void 0?void 0:Ft.login),school_id:rn,department_id:$r,identity:Wr,extra:vn,attachment_ids:[Zt]}});case 9:Yr=Xr.sent,Pe(),Yr&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ct({type:"account/getBasicInfo",payload:{login:(Tr=Ht.userInfo)===null||Tr===void 0?void 0:Tr.login}}));case 12:case"end":return Xr.stop()}},Ne)}));return function(ze){return Ue.apply(this,arguments)}}(),Pe=function(){ct({type:"account/setActionTabs",payload:{}})},je={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:pt.a.uploader,onChange:Ce,beforeUpload:function(Ne){var ze=Ne.type==="image/jpeg"||Ne.type==="image/png"||Ne.type==="image/jpg"||Ne.type==="image/bmp";return ze||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),ze}};return t.a.createElement(S.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:pt.a.modal,visible:Ot.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(pt.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(o.a,{spinning:!!It},t.a.createElement(ut.a,{className:pt.a.formWrap,form:zt,layout:"horizontal",onValuesChange:We,onFinish:ye},t.a.createElement(U.a,{gutter:[10,0]},t.a.createElement(at.a,{flex:"300px"},t.a.createElement(ut.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(se.a,null,t.a.createElement(fr,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(fr,{value:"student"},"\u5B66\u751F"),t.a.createElement(fr,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),Yt.identity==="student"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(ut.a.Item,{initialValue:Yt.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(B.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),Yt.identity==="teacher"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(ut.a.Item,{initialValue:Yt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(se.a,null,t.a.createElement(fr,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(fr,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(fr,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(fr,{value:"\u52A9\u6559"},"\u52A9\u6559")))),Yt.identity==="professional"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(ut.a.Item,{initialValue:Yt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(se.a,null,t.a.createElement(fr,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(fr,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(fr,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(fr,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(fr,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(ut.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:Yt.school&&!(lr!=null&&lr.find(function(Ue){return Ue.name===Yt.school}))&&t.a.createElement("div",{className:pt.a.schoolHintWrap},t.a.createElement("span",{className:pt.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",Yt.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(pt.a.color0152d9," current"),onClick:Ae},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(Qr.a,{showSearch:!0,options:Jt==null?void 0:Jt.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(ut.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:Yt.department&&!(Lt!=null&&Lt.find(function(Ue){return Ue.name===Yt.department}))&&t.a.createElement("div",{className:pt.a.schoolHintWrap},t.a.createElement("span",{className:pt.a.colorCDCDCD},Yt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(Yt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(pt.a.color0152d9," current"),onClick:Fe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(Qr.a,{showSearch:!0,onChange:function(Ne){return kr(Lt.filter(function(ze){return ze.name.includes(Ne)}))},options:Ct==null?void 0:Ct.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(ut.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:pt.a.flexRow},t.a.createElement("div",{className:"".concat(pt.a.flexColumn," ").concat(pt.a.example)},t.a.createElement("span",{className:pt.a.exampleImg},t.a.createElement("img",{src:Cr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(pt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:pt.a.flexColumn},t.a.createElement(na,Object(De.a)({},je,{accept:".png,.jpg,.bmp,.jpeg"}),ur?t.a.createElement("img",{src:ur,className:pt.a.uploadImg}):t.a.createElement("div",{className:pt.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(pt.a.uploadTipIcon)})),t.a.createElement("p",{className:pt.a.uploadTip},t.a.createElement("a",{className:pt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:pt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:pt.a.footerWrap},t.a.createElement(ut.a.Item,null,t.a.createElement(_.a,{className:"mr5",size:"large",onClick:Pe},"\u53D6\u6D88"),t.a.createElement(_.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:pt.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",!(tr!=null&&(ht=tr.setting)!==null&&ht!==void 0&&ht.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(Tt,{visible:Vr,onClose:function(){return br(!1)},schoolName:Yt.school,onSuccess:he}),t.a.createElement(_a,{visible:qr,onClose:function(){return Mr(!1)},schoolId:(bt=lr.find(function(Ue){return Ue.name===Yt.school}))===null||bt===void 0?void 0:bt.id,schoolName:Yt.school,departmentName:Yt.department,onSuccess:function(Ne){return Le(Yt.school,Ne)}}))},Sa=Object(s.a)(function(mt){var Ze=mt.user,ht=mt.account,bt=mt.loading,Ht=mt.globalSetting;return{user:Ze,account:ht,globalSetting:Ht,loading:bt.effects}})(ha),ya=M("aCH8"),In=M.n(ya);function _r(mt){var Ze=mt.type,ht=mt.dispatch,bt=mt.userid,Ht=mt.isshow,Ot=mt.setPhoneshow,tr=mt.setEmailshow,Pt="79e33abd4b6588941ab7622aed1e67e8",ct=Object(l.useState)(""),vt=Object(v.a)(ct,2),yt=vt[0],or=vt[1],Xt=Object(l.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),zt=Object(v.a)(Xt,2),jt=zt[0],Vt=zt[1],Yt=Object(l.useState)(60),Qe=Object(v.a)(Yt,2),hr=Qe[0],wr=Qe[1],lr=Object(l.useState)(!1),$t=Object(v.a)(lr,2),ar=$t[0],Kt=$t[1],Jt=Object(l.useState)(""),Ar=Object(v.a)(Jt,2),At=Ar[0],kt=Ar[1];function Lt(){return Qt.apply(this,arguments)}function Qt(){return Qt=Object(h.a)(a.a.mark(function Nt(){var ur;return a.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(yt){Et.next=3;break}return Ze===3?p.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):p.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Et.abrupt("return");case 3:return Et.next=5,ht({type:"competitions/getVerification",payload:{type:Ze,login:yt,smscode:In()(Pt+yt)}});case 5:ur=Et.sent,ur.status===1&&(p.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),gr(),Kt(!0));case 7:case"end":return Et.stop()}},Nt)})),Qt.apply(this,arguments)}function gr(){wr(60);var Nt=setInterval(function(){--hr,hr>-1?wr(hr):(clearInterval(Nt),Kt(!1))},1e3)}function Xe(){return Ct.apply(this,arguments)}function Ct(){return Ct=Object(h.a)(a.a.mark(function Nt(){var ur;return a.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,ht({type:"competitions/PhoneBind",payload:{userid:bt,code:At,phone:yt}});case 2:ur=Et.sent,ur.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),Ot("none"));case 4:case"end":return Et.stop()}},Nt)})),Ct.apply(this,arguments)}function kr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(h.a)(a.a.mark(function Nt(){var ur;return a.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,ht({type:"competitions/EmailBind",payload:{userid:bt,code:At,email:yt}});case 2:ur=Et.sent,ur.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),tr("none"));case 4:case"end":return Et.stop()}},Nt)})),Ur.apply(this,arguments)}return t.a.createElement("div",{style:{display:Ht}},t.a.createElement("p",null,t.a.createElement(B.a,{value:yt,onChange:function(ur){return or(ur.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(B.a,{value:At,onChange:function(ur){return kt(ur.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(_.a,{disabled:ar,onClick:function(){return Lt()},type:"primary",style:{marginLeft:"20px",width:"100px"}},ar?"\u91CD\u65B0\u53D1\u9001".concat(hr,"s"):jt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(_.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!At){p.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}Ze===3?Xe():kr()}},"\u786E\u8BA4"),t.a.createElement(_.a,{style:{marginLeft:"20px"},onClick:function(){Ze===3?Ot("none"):tr("none")}},"\u53D6\u6D88")))}var aa=_r;function Yn(mt){var Ze=mt.dispatch,ht=mt.userid,bt={wrapperCol:{offset:3,span:21}},Ht=ut.a.useForm(),Ot=Object(v.a)(Ht,1),tr=Ot[0],Pt=Object(C.i)(),ct=Pt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(ut.a,{form:tr,name:"basic"},t.a.createElement(ut.a.Item,Object(De.a)({},bt,{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(B.a,null)),t.a.createElement(ut.a.Item,Object(De.a)({},bt,{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(B.a,null)),t.a.createElement(ut.a.Item,Object(De.a)({},bt,{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(B.a,null)),t.a.createElement(ut.a.Item,null,t.a.createElement(_.a,{type:"primary",htmlType:"submit",onClick:Object(h.a)(a.a.mark(function vt(){return a.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:tr.validateFields().then(function(){var Xt=Object(h.a)(a.a.mark(function zt(jt){var Vt;return a.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Ze({type:"competitions/setleader",payload:Object(D.a)({identifier:ct,user_id:ht},jt)});case 2:Vt=Qe.sent,Vt.status===0&&p.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return Qe.stop()}},zt)}));return function(zt){return Xt.apply(this,arguments)}}());case 1:case"end":return or.stop()}},vt)}))},"\u63D0\u4EA4"))))}var zn=Yn,On={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Va(mt){var Ze,ht,bt,Ht,Ot,tr,Pt,ct,vt=mt.Prize,yt=mt.Accounts,or=mt.dispatch,Xt=mt.userid,zt=Object(l.useState)("none"),jt=Object(v.a)(zt,2),Vt=jt[0],Yt=jt[1],Qe=Object(l.useState)("none"),hr=Object(v.a)(Qe,2),wr=hr[0],lr=hr[1];function $t(Kt){return ar.apply(this,arguments)}function ar(){return ar=Object(h.a)(a.a.mark(function Kt(Jt){var Ar;return a.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(!(Jt==="1")){kt.next=6;break}return kt.next=3,or({type:"competitions/Authentication"});case 3:Ar=kt.sent,kt.next=9;break;case 6:return kt.next=8,or({type:"competitions/Professional"});case 8:Ar=kt.sent;case 9:Ar.status===0&&p.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return kt.stop()}},Kt)})),ar.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"),(yt==null?void 0:yt.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,(yt==null?void 0:yt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){or({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,yt==null?void 0:yt.name),(yt==null?void 0:yt.authentication)==="uncertified"?null:(yt==null?void 0:yt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(_.a,{type:"primary",onClick:function(){return $t("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,(yt==null?void 0:yt.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"),(yt==null?void 0:yt.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,(yt==null?void 0:yt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){or({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,yt&&yt.identity&&On[yt.identity]),(yt==null?void 0:yt.authentication)==="uncertified"?null:(yt==null?void 0:yt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(_.a,{type:"primary",onClick:function(){return $t("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(_.a,{type:"primary",onClick:function(){or({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,(yt==null?void 0:yt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(yt==null?void 0:yt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(yt==null?void 0:yt.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"}},(yt==null?void 0:yt.phone)||"--"),Vt==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){Yt("block")}},"\u66F4\u6362"):null),t.a.createElement(aa,{type:3,dispatch:or,userid:yt==null?void 0:yt.id,isshow:Vt,setPhoneshow:Yt,setEmailshow:lr}),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"}},(yt==null?void 0:yt.mail)||"--"),wr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){lr("block")}},"\u66F4\u6362"):null),t.a.createElement(aa,{type:4,dispatch:or,userid:yt==null?void 0:yt.id,isshow:wr,setEmailshow:lr,setPhoneshow:Yt})),vt!=null&&vt.leader&&vt!==null&&vt!==void 0&&vt.teams&&vt!==null&&vt!==void 0&&(Ze=vt.teams[0])!==null&&Ze!==void 0&&(ht=Ze.bank_account)!==null&&ht!==void 0&&ht.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(zn,{dispatch:or,userid:Xt})),vt!=null&&vt.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,(vt==null?void 0:vt.teams)&&(vt==null||((bt=vt.teams[0])===null||bt===void 0||((Ht=bt.bank_account)===null||Ht===void 0))?void 0:Ht.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,(vt==null?void 0:vt.teams)&&(vt==null||((Ot=vt.teams[0])===null||Ot===void 0||((tr=Ot.bank_account)===null||tr===void 0))?void 0:tr.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,(vt==null?void 0:vt.teams)&&(vt==null||((Pt=vt.teams[0])===null||Pt===void 0||((ct=Pt.bank_account)===null||ct===void 0))?void 0:ct.card_no)||"--"))):null,t.a.createElement(Sa,{Scoid:yt==null?void 0:yt.school_id}),t.a.createElement(Jr,null))}var Ma=Va,Dt=fe.a.TabPane;function Za(mt){var Ze=mt.Prize,ht=mt.Accounts,bt=mt.getAccounts,Ht=mt.dispatch,Ot=mt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(fe.a,{defaultActiveKey:"1",onChange:function(Pt){Pt==="2"&&bt()}},t.a.createElement(Dt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(we,{Prize:Ze})),t.a.createElement(Dt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Ma,{userid:Ot,dispatch:Ht,Prize:Ze,Accounts:ht})))))}var oi=Za,Ia=M("xKgJ"),bn=M("wd/R"),Fn=M.n(bn),Ka=fe.a.TabPane;function qa(mt){var Ze,ht,bt,Ht,Ot,tr,Pt=mt.ChartRules,ct=mt.ItemData,vt=mt.getCharts,yt=mt.Selectkey,or=mt.HeaderDetail,Xt=mt.getChartRules,zt=mt.userinfo,jt=mt.Editable,Vt=mt.dispatch,Yt=mt.StaffDetail,Qe=Object(l.useState)(!1),hr=Object(v.a)(Qe,2),wr=hr[0],lr=hr[1],$t=Object(l.useState)(""),ar=Object(v.a)($t,2),Kt=ar[0],Jt=ar[1],Ar=Object(l.useState)(!0),At=Object(v.a)(Ar,2),kt=At[0],Lt=At[1],Qt=Object(l.useState)(),gr=Object(v.a)(Qt,2),Xe=gr[0],Ct=gr[1],kr=Object(l.useState)(),Ur=Object(v.a)(kr,2),Nt=Ur[0],ur=Ur[1],Bt=Object(C.i)(),Et=Bt.identifier;Object(l.useEffect)(function(){if(kt){var dt,ft,It,_t,Er=Pt==null||((dt=Pt.stages)===null||dt===void 0)?void 0:dt[0];Ct(Er);var Gr=Pt==null||((ft=Pt.stages)===null||ft===void 0||((It=ft[0])===null||It===void 0||((_t=It.children)===null||_t===void 0)))?void 0:_t[0];if(ur(Gr),Er!=null&&Er.id){var Vr,br,Hr;vt(Er==null?void 0:Er.id),Jt(((Vr=Pt.rule_contents)===null||Vr===void 0||((br=Vr.filter(function(en){return parseInt(en.competition_stage_id)===parseInt(Er==null?void 0:Er.id)}))===null||br===void 0||((Hr=br[0])===null||Hr===void 0))?void 0:Hr.content)||"")}else{var Sr,qr,Mr;vt(0),Jt(((Sr=Pt.rule_contents)===null||Sr===void 0||((qr=Sr.filter(function(en){return parseInt(en.competition_stage_id)===0}))===null||qr===void 0||((Mr=qr[0])===null||Mr===void 0))?void 0:Mr.content)||"")}}},[Pt]);function Mt(){return Zt.apply(this,arguments)}function Zt(){return Zt=Object(h.a)(a.a.mark(function dt(){var ft,It,_t,Er,Gr,Vr,br,Hr,Sr;return a.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:if(Kt){Mr.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Mr.abrupt("return");case 3:if(Lt(!1),ft=Xe==null?void 0:Xe.id,!ft){Mr.next=12;break}return Mr.next=8,Object(ee.a)("/api/competitions/".concat(Et,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:Kt,md_content_id:(It=Pt.rule_contents)===null||It===void 0||((_t=It.filter(function(en){return parseInt(en.competition_stage_id)===parseInt(ft)}))===null||_t===void 0||((Er=_t[0])===null||Er===void 0))?void 0:Er.id,stage_id:Xe==null?void 0:Xe.id}});case 8:Gr=Mr.sent,Gr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),lr(!1),Xt()),Mr.next=16;break;case 12:return Mr.next=14,Object(ee.a)("/api/competitions/".concat(Et,"/update_md_content.json"),{method:"post",body:{competition_module_id:yt,content:Kt,md_content_id:(Vr=Pt.rule_contents)===null||Vr===void 0||((br=Vr.filter(function(en){return parseInt(en.competition_stage_id)===0}))===null||br===void 0||((Hr=br[0])===null||Hr===void 0))?void 0:Hr.id,stage_id:Xe==null?void 0:Xe.id}});case 14:Sr=Mr.sent,Sr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),lr(!1),Xt());case 16:case"end":return Mr.stop()}},dt)})),Zt.apply(this,arguments)}var Gt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(ft,It,_t){return t.a.createElement("span",null,ft)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(ft){return t.a.createElement(Ve.a,{title:ft},t.a.createElement("span",{title:ft},ft&&(ft==null?void 0:ft.length)>=10?(ft==null?void 0:ft.substr(0,10))+"...":ft||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(ft){return t.a.createElement("span",{title:ft},ft&&(ft==null?void 0:ft.length)>=6?(ft==null?void 0:ft.substr(0,6))+"...":ft||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(ft){return t.a.createElement("span",null,ft===1?"\u8BA1\u7B97\u4E2D":ft===2?"\u5B8C\u6210":ft===0?"\u5F85\u8BA1\u7B97":ft===3&&"\u9519\u8BEF")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(ft){return t.a.createElement("span",null,ft||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(ft){return(ft==null?void 0:ft.length)>0?ft==null?void 0:ft.map(function(It,_t){return t.a.createElement("span",null,It==null?void 0:It.name,"\uFF1A",It==null?void 0:It.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(Xe==null?void 0:Xe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(ft){return t.a.createElement("span",null,ft||"--")}},(Xe==null?void 0:Xe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="score"}))===null||It===void 0)?void 0:It.value)||"--")}},(Xe==null?void 0:Xe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="fid"}))===null||It===void 0)?void 0:It.value)||"--")}},(Xe==null?void 0:Xe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="total_score"}))===null||It===void 0)?void 0:It.value)||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){return t.a.createElement("span",null,ft||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="Coffee"}))===null||It===void 0)?void 0:It.value)||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="Easyship"}))===null||It===void 0)?void 0:It.value)||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="Scar"}))===null||It===void 0)?void 0:It.value)||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="Scarf"}))===null||It===void 0)?void 0:It.value)||"--")}},!(Xe!=null&&Xe.display_four_indicators)&&(Xe==null?void 0:Xe.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(ft){var It;return t.a.createElement("span",null,(ft==null||((It=ft.find(function(_t){return(_t==null?void 0:_t.name)==="Total"}))===null||It===void 0)?void 0:It.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(ft){return t.a.createElement("a",{href:ft,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(dt){return!!dt});return t.a.createElement("div",null,(Pt==null||((Ze=Pt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(He,null),(Pt==null||((ht=Pt.stages)===null||ht===void 0)?void 0:ht.length)>0&&t.a.createElement(fe.a,{animated:!0,tabBarExtraContent:zt!=null&&zt.admin||zt!=null&&zt.business||jt?t.a.createElement(_.a,{onClick:function(){lr(!0)}},"\u7F16\u8F91"):Yt.enrolled&&(Xe==null?void 0:Xe.start_time)&&(Xe==null?void 0:Xe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Fn()(Xe==null?void 0:Xe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",Fn()(Xe==null?void 0:Xe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(_.a,{style:{marginLeft:"20px"},disabled:Fn()(Xe==null?void 0:Xe.start_time).unix()>Fn()(Fn()().format("YYYY-MM-DD HH:mm:s")).unix()||Fn()(Fn()().format("YYYY-MM-DD HH:mm:s")).unix()>Fn()(Xe==null?void 0:Xe.end_time).unix(),onClick:function(){Vt({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(Nt==null?void 0:Nt.id)||(Xe==null?void 0:Xe.id),id:or==null?void 0:or.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(ft){var It,_t,Er,Gr,Vr;lr(!1);var br=Pt==null||((It=Pt.stages)===null||It===void 0)?void 0:It.filter(function(Sr){return parseInt(ft)===parseInt(Sr==null?void 0:Sr.id)})[0],Hr=br==null||((_t=br.children)===null||_t===void 0)?void 0:_t[0];ur(Hr),Ct(br),Jt(((Er=Pt.rule_contents)===null||Er===void 0||((Gr=Er.filter(function(Sr){return parseInt(Sr.competition_stage_id)===parseInt(br==null?void 0:br.id)}))===null||Gr===void 0||((Vr=Gr[0])===null||Vr===void 0))?void 0:Vr.content)||""),vt((Hr==null?void 0:Hr.id)||ft)}},Pt&&Pt.stages.map(function(dt,ft){return t.a.createElement(Ka,{tab:dt.name,key:dt.id===null?0:dt.id},wr===!1&&Pt&&Pt.rule_contents.map(function(It,_t){if(dt.id===It.competition_stage_id)return t.a.createElement(H.a,{key:_t,value:It.content===void 0||It.content===null?"":It.content});if(dt.id===null&&It.competition_stage_id===0)return t.a.createElement(H.a,{key:_t,value:It.content===void 0||It.content===null?"":It.content})}))})),(Xe==null||((bt=Xe.children)===null||bt===void 0)?void 0:bt.length)>0&&t.a.createElement(fe.a,{activeKey:(Nt==null?void 0:Nt.id)+"",onChange:function(ft){var It,_t=Xe==null||((It=Xe.children)===null||It===void 0)?void 0:It.filter(function(Er){return parseInt(ft)===parseInt(Er==null?void 0:Er.id)})[0];ur(_t),vt(ft)}},Xe==null||((Ht=Xe.children)===null||Ht===void 0)?void 0:Ht.map(function(dt,ft){return t.a.createElement(Ka,{tab:dt.name,key:dt.id===null?0:dt.id})})),wr&&t.a.createElement("div",null,t.a.createElement(q.a,{defaultValue:Kt,onChange:function(ft){Jt(ft)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(_.a,{style:{width:"90px"},type:"primary",onClick:function(){return Mt()}},"\u63D0\u4EA4"),t.a.createElement(_.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return lr(!1)}},"\u53D6\u6D88"))),((Ot=or.competition_modules.filter(function(dt){return dt.id===yt}))===null||Ot===void 0||((tr=Ot[0])===null||tr===void 0)?void 0:tr.show_leaderboard)&&t.a.createElement($.a,{dataSource:ct==null?void 0:ct.results,columns:Gt}))}var Gn=qa,_i=M("DjyN"),ei=M("NUBc"),qn=fe.a.TabPane;function Ca(mt){var Ze,ht,bt,Ht,Ot,tr,Pt=mt.loading,ct=mt.ChartRules,vt=mt.ItemData,yt=mt.getCharts,or=mt.Selectkey,Xt=mt.HeaderDetail,zt=mt.getChartRules,jt=mt.userinfo,Vt=mt.Editable,Yt=mt.dispatch,Qe=mt.StaffDetail,hr=Object(l.useState)(!1),wr=Object(v.a)(hr,2),lr=wr[0],$t=wr[1],ar=Object(l.useState)(""),Kt=Object(v.a)(ar,2),Jt=Kt[0],Ar=Kt[1],At=Object(l.useState)(!0),kt=Object(v.a)(At,2),Lt=kt[0],Qt=kt[1],gr=Object(l.useState)(),Xe=Object(v.a)(gr,2),Ct=Xe[0],kr=Xe[1],Ur=Object(l.useState)(),Nt=Object(v.a)(Ur,2),ur=Nt[0],Bt=Nt[1],Et=Object(C.i)(),Mt=Et.identifier,Zt=Object(l.useState)({page:1,limit:10,sort:"desc"}),Gt=Object(v.a)(Zt,2),dt=Gt[0],ft=Gt[1];Object(l.useEffect)(function(){var _t;Lt&&ct!==null&&ct!==void 0&&(_t=ct.stages)!==null&&_t!==void 0&&_t[0]&&It()},[ct==null||((Ze=ct.stages)===null||Ze===void 0)?void 0:Ze[0]]);var It=function(){var _t=Object(h.a)(a.a.mark(function Er(){var Gr,Vr,br,Hr,Sr,qr;return a.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return Sr=ct==null||((Gr=ct.stages)===null||Gr===void 0)?void 0:Gr[0],kr(Sr),qr=ct==null||((Vr=ct.stages)===null||Vr===void 0||((br=Vr[0])===null||br===void 0||((Hr=br.children)===null||Hr===void 0)))?void 0:Hr[0],Bt(qr),dt.id=(qr==null?void 0:qr.id)||(Sr==null?void 0:Sr.id),ft(Object(D.a)({},dt)),en.next=7,yt(Object(D.a)(Object(D.a)({},dt),{},{stage_id:dt.id}));case 7:case"end":return en.stop()}},Er)}));return function(){return _t.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((ht=ct.stages)===null||ht===void 0)?void 0:ht.length)>0?null:t.a.createElement(He,null),(ct==null||((bt=ct.stages)===null||bt===void 0)?void 0:bt.length)>0&&t.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var _t=Object(h.a)(a.a.mark(function Er(Gr){var Vr,br,Hr,Sr,qr,Mr,en;return a.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return $t(!1),Mr=ct==null||((Vr=ct.stages)===null||Vr===void 0)?void 0:Vr.filter(function(Fe){return parseInt(Gr)===parseInt(Fe==null?void 0:Fe.id)})[0],en=Mr==null||((br=Mr.children)===null||br===void 0)?void 0:br[0],Bt(en),kr(Mr),Ar(((Hr=ct.rule_contents)===null||Hr===void 0||((Sr=Hr.filter(function(Fe){return parseInt(Fe.competition_stage_id)===parseInt(Mr==null?void 0:Mr.id)}))===null||Sr===void 0||((qr=Sr[0])===null||qr===void 0))?void 0:qr.content)||""),dt.page=1,dt.limit=10,dt.id=(en==null?void 0:en.id)||Gr,ft(Object(D.a)({},dt)),Ae.next=9,yt(Object(D.a)({},dt));case 9:case"end":return Ae.stop()}},Er)}));return function(Er){return _t.apply(this,arguments)}}()},ct&&ct.stages.map(function(_t,Er){return t.a.createElement(qn,{tab:_t.name,key:_t.id===null?0:_t.id})})),(Ct==null||((Ht=Ct.children)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(fe.a,{activeKey:(ur==null?void 0:ur.id)+"",onChange:function(){var _t=Object(h.a)(a.a.mark(function Er(Gr){var Vr,br;return a.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return br=Ct==null||((Vr=Ct.children)===null||Vr===void 0)?void 0:Vr.filter(function(qr){return parseInt(Gr)===parseInt(qr==null?void 0:qr.id)})[0],Bt(br),dt.page=1,dt.limit=10,dt.id=Gr,ft(Object(D.a)({},dt)),Sr.next=5,yt(Object(D.a)({},dt));case 5:case"end":return Sr.stop()}},Er)}));return function(Er){return _t.apply(this,arguments)}}()},Ct==null||((Ot=Ct.children)===null||Ot===void 0)?void 0:Ot.map(function(_t,Er){return t.a.createElement(qn,{tab:_t.name,key:_t.id===null?0:_t.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(){dt.page=1,dt.sort=dt.sort==="desc"?"asc":"desc",ft(Object(D.a)({},dt)),yt(Object(D.a)({},dt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",dt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(dt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(B.a.Search,{onSearch:function(Er){dt.page=1,dt.search=Er,ft(Object(D.a)({},dt)),yt(Object(D.a)({},dt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(o.a,{spinning:Pt},vt==null||((tr=vt.results)===null||tr===void 0)?void 0:tr.map(function(_t,Er){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Er===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/"+(_t==null?void 0:_t.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"}},_t==null?void 0:_t.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"}},(_t==null?void 0:_t.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"}},(_t==null?void 0:_t.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",_t==null?void 0:_t.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(_t==null?void 0:_t.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(_t==null?void 0:_t.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(_t==null?void 0:_t.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(ei.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:dt.page,onChange:function(Er,Gr){dt.page=Er,ft(Object(D.a)({},dt)),yt(Object(D.a)({},dt))}})))}var mi=Ca,za=function(Ze){var ht=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],bt=["","\u5341","\u767E","\u5343","\u4E07"];Ze=parseInt(Ze);var Ht=function(ct){for(var vt=ct.toString().split("").reverse(),yt="",or=0;or<vt.length;or++)yt=(or==0&&vt[or]==0||or>0&&vt[or]==0&&vt[or-1]==0?"":ht[vt[or]]+(vt[or]==0?bt[0]:bt[or]))+yt;return yt},Ot=Math.floor(Ze/1e4),tr=Ze%1e4;return tr.toString().length<4&&(tr="0"+tr),Ot?Ht(Ot)+"\u4E07"+Ht(tr):Ht(Ze)};function ba(mt){var Ze,ht=mt.item,bt=mt.index,Ht=mt.StaffDetail,Ot=Object(l.useState)(!0),tr=Object(v.a)(Ot,2),Pt=tr[0],ct=tr[1],vt=Object(l.useState)(!0),yt=Object(v.a)(vt,2),or=yt[0],Xt=yt[1],zt=Object(l.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+"/"+(ht==null?void 0:ht.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",za(bt+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},ht==null?void 0:ht.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},ht==null?void 0:ht.challenges_count)," ")),t.a.createElement("div",{ref:zt},t.a.createElement(H.a,{style:{maxHeight:Pt&&100},value:ht==null?void 0:ht.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ct(!Pt)}},Pt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Pt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:or&&58,overflow:"hidden"}},ht==null||((Ze=ht.challenges)===null||Ze===void 0)?void 0:Ze.map(function(jt,Vt){return t.a.createElement("div",{style:{marginTop:Vt===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",Vt+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(){Xt(!or)}},or?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(or?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Ht==null?void 0:Ht.enrolled)&&t.a.createElement(_.a,{onClick:function(){window.open("/shixuns/".concat(ht==null?void 0:ht.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Ga=ba,ka=fe.a.TabPane;function vi(mt){var Ze,ht,bt,Ht,Ot,tr,Pt=mt.loading,ct=mt.ChartRules,vt=mt.ItemData,yt=mt.getCharts,or=mt.Selectkey,Xt=mt.HeaderDetail,zt=mt.getChartRules,jt=mt.userinfo,Vt=mt.Editable,Yt=mt.dispatch,Qe=mt.StaffDetail,hr=Object(l.useState)(!1),wr=Object(v.a)(hr,2),lr=wr[0],$t=wr[1],ar=Object(l.useState)(""),Kt=Object(v.a)(ar,2),Jt=Kt[0],Ar=Kt[1],At=Object(l.useState)(!0),kt=Object(v.a)(At,2),Lt=kt[0],Qt=kt[1],gr=Object(l.useState)(),Xe=Object(v.a)(gr,2),Ct=Xe[0],kr=Xe[1],Ur=Object(l.useState)(),Nt=Object(v.a)(Ur,2),ur=Nt[0],Bt=Nt[1],Et=Object(C.i)(),Mt=Et.identifier,Zt=Object(l.useState)({page:1,limit:10}),Gt=Object(v.a)(Zt,2),dt=Gt[0],ft=Gt[1],It=Object(l.useState)(),_t=Object(v.a)(It,2),Er=_t[0],Gr=_t[1];Object(l.useEffect)(function(){var br;Lt&&ct!==null&&ct!==void 0&&(br=ct.stages)!==null&&br!==void 0&&br[0]&&Vr()},[ct==null||((Ze=ct.stages)===null||Ze===void 0)?void 0:Ze[0]]);var Vr=function(){var br=Object(h.a)(a.a.mark(function Hr(){var Sr,qr,Mr,en,Mn,Ae;return a.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return Mn=ct==null||((Sr=ct.stages)===null||Sr===void 0)?void 0:Sr[0],kr(Mn),Ae=ct==null||((qr=ct.stages)===null||qr===void 0||((Mr=qr[0])===null||Mr===void 0||((en=Mr.children)===null||en===void 0)))?void 0:en[0],Bt(Ae),dt.id=(Ae==null?void 0:Ae.id)||(Mn==null?void 0:Mn.id),ft(Object(D.a)({},dt)),We.next=7,yt(Object(D.a)(Object(D.a)({},dt),{},{stage_id:dt.id}));case 7:case"end":return We.stop()}},Hr)}));return function(){return br.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((ht=ct.stages)===null||ht===void 0)?void 0:ht.length)>0?null:t.a.createElement(He,null),(ct==null||((bt=ct.stages)===null||bt===void 0)?void 0:bt.length)>0&&t.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var br=Object(h.a)(a.a.mark(function Hr(Sr){var qr,Mr,en,Mn,Ae,Fe,We;return a.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return $t(!1),Fe=ct==null||((qr=ct.stages)===null||qr===void 0)?void 0:qr.filter(function(Ce){return parseInt(Sr)===parseInt(Ce==null?void 0:Ce.id)})[0],We=Fe==null||((Mr=Fe.children)===null||Mr===void 0)?void 0:Mr[0],Bt(We),kr(Fe),Ar(((en=ct.rule_contents)===null||en===void 0||((Mn=en.filter(function(Ce){return parseInt(Ce.competition_stage_id)===parseInt(Fe==null?void 0:Fe.id)}))===null||Mn===void 0||((Ae=Mn[0])===null||Ae===void 0))?void 0:Ae.content)||""),dt.page=1,dt.limit=10,dt.id=(We==null?void 0:We.id)||Sr,ft(Object(D.a)({},dt)),he.next=9,yt(Object(D.a)({},dt));case 9:case"end":return he.stop()}},Hr)}));return function(Hr){return br.apply(this,arguments)}}()},ct&&ct.stages.map(function(br,Hr){return t.a.createElement(ka,{tab:br.name,key:br.id===null?0:br.id})})),(Ct==null||((Ht=Ct.children)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(fe.a,{activeKey:(ur==null?void 0:ur.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var br=Object(h.a)(a.a.mark(function Hr(Sr){var qr,Mr;return a.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mr=Ct==null||((qr=Ct.children)===null||qr===void 0)?void 0:qr.filter(function(Ae){return parseInt(Sr)===parseInt(Ae==null?void 0:Ae.id)})[0],Bt(Mr),dt.page=1,dt.limit=10,dt.id=Sr,ft(Object(D.a)({},dt)),Mn.next=5,yt(Object(D.a)({},dt));case 5:case"end":return Mn.stop()}},Hr)}));return function(Hr){return br.apply(this,arguments)}}()},Ct==null||((Ot=Ct.children)===null||Ot===void 0)?void 0:Ot.map(function(br,Hr){return t.a.createElement(ka,{tab:br.name,key:br.id===null?0:br.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}},vt==null?void 0:vt.start_time,"~",vt==null?void 0:vt.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(vt==null?void 0:vt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(o.a,{spinning:Pt},vt==null||((tr=vt.results)===null||tr===void 0)?void 0:tr.map(function(br,Hr){return t.a.createElement(Ga,{StaffDetail:Qe,item:br,index:Hr})})),t.a.createElement(ei.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:dt.page,onChange:function(Hr,Sr){dt.page=Hr,ft(Object(D.a)({},dt)),yt(Object(D.a)({},dt))}})))}var gi=vi,Na=M("UfjD"),la=M("qHvr"),si=function(Ze){var ht,bt,Ht,Ot,tr,Pt,ct,vt,yt=Ze.globalSetting,or=Ze.loading,Xt=Ze.dispatch,zt=Ze.user,jt=Object(g.a)(Ze,["globalSetting","loading","dispatch","user"]),Vt=Object(l.useState)({avatar_url:""}),Yt=Object(v.a)(Vt,2),Qe=Yt[0],hr=Yt[1],wr=Object(l.useState)([]),lr=Object(v.a)(wr,2),$t=lr[0],ar=lr[1],Kt=Object(C.i)(),Jt=Kt.identifier,Ar=Object(l.useState)([]),At=Object(v.a)(Ar,2),kt=At[0],Lt=At[1],Qt=Object(l.useState)(!0),gr=Object(v.a)(Qt,2),Xe=gr[0],Ct=gr[1],kr=Object(l.useState)([]),Ur=Object(v.a)(kr,2),Nt=Ur[0],ur=Ur[1],Bt=Object(l.useState)([]),Et=Object(v.a)(Bt,2),Mt=Et[0],Zt=Et[1],Gt=Object(l.useState)(!1),dt=Object(v.a)(Gt,2),ft=dt[0],It=dt[1],_t=Object(l.useState)(!1),Er=Object(v.a)(_t,2),Gr=Er[0],Vr=Er[1],br=Object(l.useState)(!1),Hr=Object(v.a)(br,2),Sr=Hr[0],qr=Hr[1],Mr=Object(l.useState)([]),en=Object(v.a)(Mr,2),Mn=en[0],Ae=en[1],Fe=Object(l.useState)([]),We=Object(v.a)(Fe,2),Le=We[0],he=We[1],Ce=Object(l.useState)([]),ye=Object(v.a)(Ce,2),Pe=ye[0],je=ye[1],Ue=Object(l.useState)(!1),Ne=Object(v.a)(Ue,2),ze=Ne[0],ot=Ne[1],xt=Object(l.useState)([]),wt=Object(v.a)(xt,2),Ft=wt[0],xr=wt[1],jr=Object(l.useState)(),Nr=Object(v.a)(jr,2),Wr=Nr[0],Dr=Nr[1],Kr=Object(l.useState)(!0),zr=Object(v.a)(Kr,2),rn=zr[0],$r=zr[1],vn=Object(l.useState)(!1),Yr=Object(v.a)(vn,2),Tr=Yr[0],Or=Yr[1],Xr=Object(l.useState)(!1),tn=Object(v.a)(Xr,2),mr=tn[0],an=tn[1],An=Object(l.useState)(!1),un=Object(v.a)(An,2),En=un[0],dn=un[1],kn=Object(l.useState)(!1),Xn=Object(v.a)(kn,2),Rn=Xn[0],ea=Xn[1],ja=Object(l.useState)(!1),ua=Object(v.a)(ja,2),Vn=ua[0],xn=ua[1],_n=Object(l.useState)(!0),Dn=Object(v.a)(_n,2),Cn=Dn[0],Un=Dn[1],pa=Object(C.h)(),$a=Object(l.useRef)(null);Object(l.useEffect)(function(){Jt&&hn(),Object(Rt.Z)("\u7ADE\u8D5B")},[Jt]);function hn(){return Oa.apply(this,arguments)}function Oa(){return Oa=Object(h.a)(a.a.mark(function dr(){var vr;return a.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.t0=ar,on.next=3,Xt({type:"competitions/getStaff",payload:{identifier:Jt}});case 3:return on.t1=on.sent,(0,on.t0)(on.t1),on.next=7,Xt({type:"competitions/getHeader",payload:{identifier:Jt}});case 7:vr=on.sent,hr(vr),Object(Rt.Z)((vr==null?void 0:vr.name)||"\u7ADE\u8D5B");case 10:case"end":return on.stop()}},dr)})),Oa.apply(this,arguments)}Object(l.useEffect)(function(){var dr;Dr(parseInt(pa==null||((dr=pa.query)===null||dr===void 0)?void 0:dr.type)===1)},[pa]),Object(l.useEffect)(function(){var dr;if((Qe==null||((dr=Qe.competition_modules)===null||dr===void 0)?void 0:dr.length)>0){var vr,rr;if((pa==null||((vr=pa.query)===null||vr===void 0)?void 0:vr.active)==="\u8D5B\u9898\u53D1\u5E03"){var on,ir=Qe==null||((on=Qe.competition_modules)===null||on===void 0)?void 0:on.find(function(ci){return ci.name==="\u8D5B\u9898\u53D1\u5E03"});if(ir){Aa(ir);return}}Aa(Qe==null||((rr=Qe.competition_modules)===null||rr===void 0)?void 0:rr[0])}},[Qe]);function Aa(dr){return gn.apply(this,arguments)}function gn(){return gn=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(je(vr.id),Pe=vr.id,ur(vr),!(vr.module_type==="entrance")){ir.next=9;break}return ir.next=6,Xt({type:"competitions/getItem",payload:{url:vr.module_url,module_type:"entrance"}});case 6:rr=ir.sent,ir.next=12;break;case 9:return ir.next=11,Xt({type:"competitions/getItem",payload:{url:vr.module_url}});case 11:rr=ir.sent;case 12:It(!1),qr(!1),ot(!1),Lt(rr),Or(!1),an(!1),Zt(vr.module_type),vr.module_type==="chart"?(It(!0),Ct(!1),Bi()):vr.module_type==="certificate"?(qr(!0),It(!1),Ct(!1),yi()):vr.module_type==="md_tab"?(ot(!0),Ct(!1),localStorage.setItem("issee","2"),It(!1),qr(!1),ni()):vr.module_type==="md_shixun"?(Or(!0),Ct(!1),ni()):vr.module_type==="entrance"?(an(!0),Ct(!1),ni()):(Ct(!0),localStorage.setItem("issee","1"));case 20:case"end":return ir.stop()}},dr)})),gn.apply(this,arguments)}function fn(dr,vr,rr){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(h.a)(a.a.mark(function dr(vr,rr,on){var ir,ci;return a.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(vr.stopPropagation(),Object(ie.e)(Xt)){Tn.next=3;break}return Tn.abrupt("return");case 3:if(!(Qe!=null&&Qe.is_authentication&&!(zt!=null&&(ir=zt.userInfo)!==null&&ir!==void 0&&ir.authentication))){Tn.next=6;break}return Xt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Tn.abrupt("return");case 6:if(!(Qe!=null&&Qe.enroll_url)){Tn.next=9;break}return Object(Rt.U)(Qe==null?void 0:Qe.enroll_url),Tn.abrupt("return");case 9:if(!(on==="ismodel")){Tn.next=23;break}if(!(rr.member_of_course===!0)){Tn.next=14;break}Object(Rt.U)("/classrooms/".concat(rr.course_id)),Tn.next=21;break;case 14:if(rr.invite_code){Tn.next=17;break}return p.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,Xt({type:"competitions/addApplytojoincourse",payload:{invite_code:rr.invite_code,student:1}});case 19:ci=Tn.sent,ci.status===0&&Object(Rt.U)("/classrooms/".concat(rr.course_id));case 21:Tn.next=27;break;case 23:if(!($t.enrolled===!0)){Tn.next=26;break}return Object(Rt.U)(on),Tn.abrupt("return");case 26:dn(!0);case 27:case"end":return Tn.stop()}},dr)})),Bn.apply(this,arguments)}function Bi(){return wi.apply(this,arguments)}function wi(){return wi=Object(h.a)(a.a.mark(function dr(){return a.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.t0=Vr,rr.next=3,Xt({type:"competitions/ChartRules",payload:{identifier:Jt}});case 3:return rr.t1=rr.sent,rr.next=6,(0,rr.t0)(rr.t1);case 6:case"end":return rr.stop()}},dr)})),wi.apply(this,arguments)}function ti(dr){return ri.apply(this,arguments)}function ri(){return ri=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Xt({type:"competitions/Charts",payload:{identifier:Jt,stage_id:vr}});case 2:rr=ir.sent,Lt(rr);case 4:case"end":return ir.stop()}},dr)})),ri.apply(this,arguments)}function Li(dr){return Ti.apply(this,arguments)}function Ti(){return Ti=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return $r(!0),ir.next=3,Xt({type:"competitions/Results",payload:Object(D.a)({identifier:Jt,stage_id:vr==null?void 0:vr.id},vr)});case 3:rr=ir.sent,Lt(rr),$r(!1);case 6:case"end":return ir.stop()}},dr)})),Ti.apply(this,arguments)}function Mi(dr){return Wi.apply(this,arguments)}function Wi(){return Wi=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return $r(!0),ir.next=3,Xt({type:"competitions/Results",payload:Object(D.a)({identifier:Jt,stage_id:vr==null?void 0:vr.id,module_type:"entrance"},vr)});case 3:rr=ir.sent,Lt(rr),$r(!1);case 6:case"end":return ir.stop()}},dr)})),Wi.apply(this,arguments)}function Vi(dr){return Ii.apply(this,arguments)}function Ii(){return Ii=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Xt({type:"competitions/Results",payload:{identifier:Jt,stage_id:vr}});case 2:if(rr=ir.sent,!(localStorage.getItem("issee")==="1")){ir.next=5;break}return ir.abrupt("return");case 5:Lt(rr);case 6:case"end":return ir.stop()}},dr)})),Ii.apply(this,arguments)}function ni(){return Si.apply(this,arguments)}function Si(){return Si=Object(h.a)(a.a.mark(function dr(){return a.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.t0=xr,rr.next=3,Xt({type:"competitions/TabResults",payload:{identifier:Jt,competition_module_id:Pe}});case 3:rr.t1=rr.sent,(0,rr.t0)(rr.t1);case 5:case"end":return rr.stop()}},dr)})),Si.apply(this,arguments)}function yi(){return ai.apply(this,arguments)}function ai(){return ai=Object(h.a)(a.a.mark(function dr(){var vr,rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Xt({type:"competitions/Prize",payload:{identifier:Jt,user_id:zt==null||((vr=zt.userInfo)===null||vr===void 0)?void 0:vr.user_id}});case 2:rr=ir.sent,Ae(rr);case 4:case"end":return ir.stop()}},dr)})),ai.apply(this,arguments)}function co(){return bi.apply(this,arguments)}function bi(){return bi=Object(h.a)(a.a.mark(function dr(){var vr,rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Xt({type:"competitions/Accounts",payload:{id:zt==null||((vr=zt.userInfo)===null||vr===void 0)?void 0:vr.user_id}});case 2:rr=ir.sent,he(rr);case 4:case"end":return ir.stop()}},dr)})),bi.apply(this,arguments)}function Ci(dr){return ii.apply(this,arguments)}function ii(){return ii=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(Cn){ir.next=2;break}return ir.abrupt("return");case 2:if(Un(!1),!ui()){ir.next=5;break}return ir.abrupt("return");case 5:return ir.next=7,Xt({type:"competitions/AddTeam",payload:{identifier:Jt,name:vr}});case 7:rr=ir.sent,rr&&rr.status===0?(p.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),hn(),ea(!1)):Un(!0);case 9:case"end":return ir.stop()}},dr)})),ii.apply(this,arguments)}function ui(){var dr,vr;if(zt!=null&&(dr=zt.userInfo)!==null&&dr!==void 0&&dr.is_teacher){var rr;if($t!=null&&(rr=$t.teacher_staff)!==null&&rr!==void 0&&rr.mutiple_limited&&($t!=null&&$t.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Un(!0),!0}else{var on;if($t!=null&&(on=$t.member_staff)!==null&&on!==void 0&&on.mutiple_limited&&($t!=null&&$t.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Un(!0),!0}if($t!=null&&$t.enroll_ended)return p.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Un(!0),!0;if(zt!=null&&(vr=zt.userInfo)!==null&&vr!==void 0&&vr.is_teacher){if(!$t.teacher_staff)return p.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Un(!0),!0}else if(!($t!=null&&$t.member_staff))return p.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Un(!0),!0}function Fa(dr){return Ya.apply(this,arguments)}function Ya(){return Ya=Object(h.a)(a.a.mark(function dr(vr){var rr;return a.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(Cn){ir.next=2;break}return ir.abrupt("return");case 2:if(!ui()){ir.next=4;break}return ir.abrupt("return");case 4:return Un(!1),ir.next=7,Xt({type:"competitions/JoinTeam",payload:{identifier:Jt,invite_code:vr}});case 7:rr=ir.sent,rr&&rr.status===0?(p.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),xn(!1),Un(!0),hn()):Un(!0);case 9:case"end":return ir.stop()}},dr)})),Ya.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(w.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,Qe.name,Qe.sub_title?"-"+Qe.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(o.a,{spinning:or.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(Qe==null?void 0:Qe.avatar_url)&&(Qe==null?void 0:Qe.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/"+(Qe==null?void 0:Qe.avatar_url)}),!(Qe!=null&&Qe.avatar_url)&&(Qe==null?void 0:Qe.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)},Qe.name,Qe.sub_title?"-"+Qe.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"),Qe!=null&&Qe.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(Qe&&Qe.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(Qe&&Qe.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(Qe&&Qe.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"),Qe.start_time,"~",Qe.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),Qe.enroll_end_time),Qe.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,Qe.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,Qe.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"}},(Qe==null?void 0:Qe.mode)<=2&&$t.enrolled&&t.a.createElement(_.a,{onClick:function(vr){if((Qe==null?void 0:Qe.mode)===1){var rr;Aa((rr=Qe.competition_modules)===null||rr===void 0?void 0:rr.find(function(on){return on.module_type==="entrance"}))}else fn(vr,Qe,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(Qe==null?void 0:Qe.mode)===2||(Qe==null?void 0:Qe.mode)===1&&((ht=Qe.competition_modules)===null||ht===void 0||((bt=ht.filter(function(dr){return dr.module_type==="entrance"}))===null||bt===void 0)?void 0:bt.length)>0?"":"none"},className:O.a.buttonsize},(Qe==null?void 0:Qe.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(Qe==null?void 0:Qe.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),Qe.competition_status==="ended"?t.a.createElement(_.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,Qe.competition_status==="nearly_published"?t.a.createElement(_.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,Qe.competition_status!=="nearly_published"&&Qe.enroll_end&&Qe.competition_status!=="ended"?t.a.createElement(_.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,Qe.competition_status==="progressing"&&Qe.enroll_end!=!0?t.a.createElement(_.a,{type:"primary",disabled:$t.enrolled&&!Qe.need_attachment,className:O.a.buttonsize,onClick:function(vr){if($t.enrolled&&Qe.need_attachment){var rr;(rr=$a.current)===null||rr===void 0||rr.handleVisible();return}fn(vr,Qe,Qe.mode===2?"ismodel":Qe.personal?"personal":"/competitions/index/".concat(Qe.identifier,"/enroll"))}},$t.enrolled?Qe.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":Qe!=null&&Qe.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),zt.userInfo.real_name!="\u6E38\u5BA2"&&!(Qe!=null&&Qe.enroll_url)&&t.a.createElement("span",{onClick:function(vr){return fn(vr,Qe,Qe.mode===2?"ismodel":Qe.personal?"personal":"/competitions/index/".concat(Qe.identifier,"/enroll"))},className:O.a.myteam},Object(Ia.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(d.a,{selectedKeys:["".concat(Pe)]},Qe&&Qe.competition_modules&&Qe.competition_modules.map(function(dr,vr){if(dr.module_type!="enroll")return t.a.createElement(d.a.Item,{className:O.a.menuItem,onClick:function(){if(dr!=null&&dr.is_authentication){if(!Object(ie.e)(Xt))return;p.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Aa(dr)},key:dr.id},dr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Tr||mr)&&0}},Sr?t.a.createElement(oi,{dispatch:Xt,userid:zt==null||((Ht=zt.userInfo)===null||Ht===void 0)?void 0:Ht.user_id,Prize:Mn,Accounts:Le,getAccounts:co}):null,ft?t.a.createElement(Oe,{HeaderDetail:Qe,userinfo:zt.userInfo,Editable:Qe==null||((Ot=Qe.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:ti,getChartRules:Bi,Selectkey:Pe,ChartRules:Gr,ItemData:kt}):null,Xe?t.a.createElement(Q,{ref:$a,StaffDetail:$t,HeaderDetail:Qe,userinfo:zt.userInfo,Editable:Qe==null||((tr=Qe.permission)===null||tr===void 0)?void 0:tr.editable,ItemData:kt,setIssee:Ct,ModelType:Mt,dispatch:Xt}):null,!Xe&&!Tr&&!mr&&!ft&&!Sr&&!ze?t.a.createElement(J,{userinfo:zt.userInfo,ModelType:Mt,getrightdatas:Aa,dispatch:Xt,MenuItem:Nt,setIssee:Ct,identifier:Jt,ItemData:kt}):null,ze&&t.a.createElement(Gn,{dispatch:Xt,StaffDetail:$t,userinfo:zt.userInfo,HeaderDetail:Qe,Editable:Qe==null||((Pt=Qe.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:Vi,getChartRules:ni,Selectkey:Pe,ChartRules:Ft,ItemData:kt}),Tr&&t.a.createElement(mi,{loading:rn,dispatch:Xt,StaffDetail:$t,userinfo:zt.userInfo,HeaderDetail:Qe,Editable:Qe==null||((ct=Qe.permission)===null||ct===void 0)?void 0:ct.editable,getCharts:Li,getChartRules:ni,Selectkey:Pe,ChartRules:Ft,ItemData:kt}),mr&&t.a.createElement(gi,{loading:rn,dispatch:Xt,StaffDetail:$t,userinfo:zt.userInfo,HeaderDetail:Qe,Editable:Qe==null||((vt=Qe.permission)===null||vt===void 0)?void 0:vt.editable,getCharts:Mi,getChartRules:ni,Selectkey:Pe,ChartRules:Ft,ItemData:kt}))),t.a.createElement(x.a,null),t.a.createElement(W,{getResults:Vi}),t.a.createElement(S.a,{visible:Wr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Dr(!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(_.a,{type:"primary",onClick:function(){return Object(Rt.U)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(S.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(_.a,{type:"primary",style:{height:40},onClick:function(){xn(!0),dn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(_.a,{style:{height:40},onClick:function(){ea(!0),dn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),Vn?t.a.createElement(Na.a,{isjoin:Vn,setJoin:xn,JoinTeams:Fa}):null,Rn?t.a.createElement(la.a,{isAddmodle:Rn,setIsAdd:ea,createTeam:Ci}):null)},li=Y.default=Object(s.a)(function(mt){var Ze=mt.loading,ht=mt.globalSetting,bt=mt.user;return{globalSetting:ht,loading:Ze,user:bt}})(si)},GRuw:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("lPiR"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=m.algo,f=d.SHA256,_=d.SHA224=f.extend({_doReset:function(){this._hash=new P.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=f._doFinalize.call(this);return c.sigBytes-=4,c}});m.SHA224=f._createHelper(_),m.HmacSHA224=f._createHmacHelper(_)}(),D.SHA224})},GfqC:function(j,Y,M){"use strict";var D=M("cDcd"),m=M.n(D),S=M("TSYQ"),P=M.n(S);function d(z,B){var H="cannot "+z.method+" "+z.action+" "+B.status+"'",G=new Error(H);return G.status=B.status,G.method=z.method,G.url=z.action,G}function f(z){var B=z.responseText||z.response;if(!B)return B;try{return JSON.parse(B)}catch(H){return B}}function _(z){var B=new XMLHttpRequest;z.onProgress&&B.upload&&(B.upload.onprogress=function(ie){ie.total>0&&(ie.percent=ie.loaded/ie.total*100),z.onProgress(ie)});var H=new FormData;z.data&&Object.keys(z.data).forEach(function(ee){var ie=z.data[ee];if(Array.isArray(ie)){ie.forEach(function(ue){H.append(ee+"[]",ue)});return}H.append(ee,z.data[ee])}),z.file instanceof Blob?H.append(z.filename,z.file,z.file.name):H.append(z.filename,z.file),B.onerror=function(ie){z.onError(ie)},B.onload=function(){return B.status<200||B.status>=300?z.onError(d(z,B),f(B)):z.onSuccess(f(B),B)},B.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var G=z.headers||{};return G["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(ee){G[ee]!==null&&B.setRequestHeader(ee,G[ee])}),B.send(H),{abort:function(){B.abort()}}}var c=+new Date,o=0;function i(){return"rc-upload-"+c+"-"+ ++o}function n(z,B){return z.indexOf(B,z.length-B.length)!==-1}var u=function(z,B){if(z&&B){var H=Array.isArray(B)?B:B.split(","),G=z.name||"",ee=z.type||"",ie=ee.replace(/\/.*$/,"");return H.some(function(ue){var xe=ue.trim();return xe.charAt(0)==="."?n(G.toLowerCase(),xe.toLowerCase()):/\/\*$/.test(xe)?ie===xe.replace(/\/.*$/,""):ee===xe})}return!0};function p(z,B){var H=z.createReader(),G=[];function ee(){H.readEntries(function(ie){var ue=Array.prototype.slice.apply(ie);G=G.concat(ue);var xe=!ue.length;xe?B(G):ee()})}ee()}var h=function(B,H,G){var ee=function ie(ue,xe){xe=xe||"",ue.isFile?ue.file(function(Te){G(Te)&&(ue.fullPath&&!Te.webkitRelativePath&&(Object.defineProperties(Te,{webkitRelativePath:{writable:!0}}),Te.webkitRelativePath=ue.fullPath.replace(/^\//,""),Object.defineProperties(Te,{webkitRelativePath:{writable:!1}})),H([Te]))}):ue.isDirectory&&p(ue,function(Te){Te.forEach(function(se){ie(se,""+xe+ue.name+"/")})})};B.forEach(function(ie){ee(ie.webkitGetAsEntry())})},v=h,g=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var H=arguments[B];for(var G in H)Object.prototype.hasOwnProperty.call(H,G)&&(z[G]=H[G])}return z},E=function(){function z(B,H){var G=[],ee=!0,ie=!1,ue=void 0;try{for(var xe=B[Symbol.iterator](),Te;!(ee=(Te=xe.next()).done)&&!(G.push(Te.value),H&&G.length===H);ee=!0);}catch(se){ie=!0,ue=se}finally{try{!ee&&xe.return&&xe.return()}finally{if(ie)throw ue}}return G}return function(B,H){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return z(B,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function z(B,H){for(var G=0;G<H.length;G++){var ee=H[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(B,ee.key,ee)}}return function(B,H,G){return H&&z(B.prototype,H),G&&z(B,G),B}}();function l(z,B,H){return B in z?Object.defineProperty(z,B,{value:H,enumerable:!0,configurable:!0,writable:!0}):z[B]=H,z}function t(z,B){var H={};for(var G in z){if(B.indexOf(G)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,G))continue;H[G]=z[G]}return H}function C(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function w(z,B){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:z}function s(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(z,B):z.__proto__=B)}var L=function(B){return Object.keys(B).reduce(function(H,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(H[G]=B[G]),H},{})},O=function(z){s(B,z);function B(){var H,G,ee,ie;C(this,B);for(var ue=arguments.length,xe=Array(ue),Te=0;Te<ue;Te++)xe[Te]=arguments[Te];return ie=(G=(ee=w(this,(H=B.__proto__||Object.getPrototypeOf(B)).call.apply(H,[this].concat(xe))),ee),ee.state={uid:i()},ee.reqs={},ee.onChange=function(se){var ve=se.target.files;ee.uploadFiles(ve),ee.reset()},ee.onClick=function(se){var ve=ee.fileInput;if(!ve)return;var de=ee.props,ne=de.children,ae=de.onClick;ne&&ne.type==="button"&&(ve.parentNode.focus(),ve.parentNode.querySelector("button").blur()),ve.click(),ae&&ae(se)},ee.onKeyDown=function(se){se.key==="Enter"&&ee.onClick()},ee.onFileDrop=function(se){var ve=ee.props.multiple;if(se.preventDefault(),se.type==="dragover")return;if(ee.props.directory)v(Array.prototype.slice.call(se.dataTransfer.items),ee.uploadFiles,function(ne){return u(ne,ee.props.accept)});else{var de=Array.prototype.slice.call(se.dataTransfer.files).filter(function(ne){return u(ne,ee.props.accept)});ve===!1&&(de=de.slice(0,1)),ee.uploadFiles(de)}},ee.uploadFiles=function(se){var ve=Array.prototype.slice.call(se);ve.map(function(de){return de.uid=i(),de}).forEach(function(de){ee.upload(de,ve)})},ee.saveFileInput=function(se){ee.fileInput=se},G),w(ee,ie)}return a(B,[{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,ue=this.props;if(!ue.beforeUpload)return setTimeout(function(){return ie.post(G)},0);var xe=ue.beforeUpload(G,ee);xe&&xe.then?xe.then(function(Te){var se=Object.prototype.toString.call(Te);return se==="[object File]"||se==="[object Blob]"?ie.post(Te):ie.post(G)}).catch(function(Te){console.log(Te)}):xe!==!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,ue=ie.onStart,xe=ie.onProgress,Te=ie.transformFile,se=Te===void 0?function(ve){return ve}:Te;new Promise(function(ve){var de=ie.action;return typeof de=="function"&&(de=de(G)),ve(de)}).then(function(ve){var de=G.uid,ne=ie.customRequest||_,ae=Promise.resolve(se(G)).then(function(Z){var le=ie.data;return typeof le=="function"&&(le=le(Z)),Promise.all([Z,le])}).catch(function(Z){console.error(Z)});ae.then(function(Z){var le=E(Z,2),Q=le[0],q=le[1],be={action:ve,filename:ie.name,data:q,file:Q,headers:ie.headers,withCredentials:ie.withCredentials,method:ie.method||"post",onProgress:xe?function(te){xe(te,G)}:null,onSuccess:function(J,X){delete ee.reqs[de],ie.onSuccess(J,G,X)},onError:function(J,X){delete ee.reqs[de],ie.onError(J,X,G)}};ue(G),ee.reqs[de]=ne(be)})})}},{key:"reset",value:function(){this.setState({uid:i()})}},{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(ue){ee[ue]&&ee[ue].abort&&ee[ue].abort(),delete ee[ue]})}},{key:"render",value:function(){var G,ee=this.props,ie=ee.component,ue=ee.prefixCls,xe=ee.className,Te=ee.disabled,se=ee.id,ve=ee.style,de=ee.multiple,ne=ee.accept,ae=ee.children,Z=ee.directory,le=ee.openFileDialogOnClick,Q=ee.onMouseEnter,q=ee.onMouseLeave,be=t(ee,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),te=P()((G={},l(G,ue,!0),l(G,ue+"-disabled",Te),l(G,xe,xe),G)),J=Te?{}:{onClick:le?this.onClick:function(){},onKeyDown:le?this.onKeyDown:function(){},onMouseEnter:Q,onMouseLeave:q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return m.a.createElement(ie,g({},J,{className:te,role:"button",style:ve}),m.a.createElement("input",g({},L(be),{id:se,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ne,directory:Z?"directory":null,webkitdirectory:Z?"webkitdirectory":null,multiple:de,onChange:this.onChange})),ae)}}]),B}(D.Component),x=O,b=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var H=arguments[B];for(var G in H)Object.prototype.hasOwnProperty.call(H,G)&&(z[G]=H[G])}return z},y=function(){function z(B,H){for(var G=0;G<H.length;G++){var ee=H[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(B,ee.key,ee)}}return function(B,H,G){return H&&z(B.prototype,H),G&&z(B,G),B}}();function T(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function k(z,B){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:z}function N(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(z,B):z.__proto__=B)}function I(){}var W=function(z){N(B,z);function B(){var H,G,ee,ie;T(this,B);for(var ue=arguments.length,xe=Array(ue),Te=0;Te<ue;Te++)xe[Te]=arguments[Te];return ie=(G=(ee=k(this,(H=B.__proto__||Object.getPrototypeOf(B)).call.apply(H,[this].concat(xe))),ee),ee.saveUploader=function(se){ee.uploader=se},G),k(ee,ie)}return y(B,[{key:"abort",value:function(G){this.uploader.abort(G)}},{key:"render",value:function(){return m.a.createElement(x,b({},this.props,{ref:this.saveUploader}))}}]),B}(D.Component);W.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:I,onError:I,onSuccess:I,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=W,U=Y.a=K},H38U:function(j,Y,M){var D=M("f4xo"),m=M("rcnY"),S=M("wU8J"),P=M("Iq15"),d=M("dWSS");function f(c,o){this.typeNumber=c,this.errorCorrectLevel=o,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var _=f.prototype;_.addData=function(c){var o=new D(c);this.dataList.push(o),this.dataCache=null},_.isDark=function(c,o){if(c<0||this.moduleCount<=c||o<0||this.moduleCount<=o)throw new Error(c+","+o);return this.modules[c][o]},_.getModuleCount=function(){return this.moduleCount},_.make=function(){if(this.typeNumber<1){var c=1;for(c=1;c<40;c++){for(var o=m.getRSBlocks(c,this.errorCorrectLevel),i=new S,n=0,u=0;u<o.length;u++)n+=o[u].dataCount;for(var u=0;u<this.dataList.length;u++){var p=this.dataList[u];i.put(p.mode,4),i.put(p.getLength(),P.getLengthInBits(p.mode,c)),p.write(i)}if(i.getLengthInBits()<=n*8)break}this.typeNumber=c}this.makeImpl(!1,this.getBestMaskPattern())},_.makeImpl=function(c,o){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[i][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(c,o),this.typeNumber>=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=f.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},_.setupPositionProbePattern=function(c,o){for(var i=-1;i<=7;i++){if(c+i<=-1||this.moduleCount<=c+i)continue;for(var n=-1;n<=7;n++){if(o+n<=-1||this.moduleCount<=o+n)continue;0<=i&&i<=6&&(n==0||n==6)||0<=n&&n<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=n&&n<=4?this.modules[c+i][o+n]=!0:this.modules[c+i][o+n]=!1}}},_.getBestMaskPattern=function(){for(var c=0,o=0,i=0;i<8;i++){this.makeImpl(!0,i);var n=P.getLostPoint(this);(i==0||c>n)&&(c=n,o=i)}return o},_.createMovieClip=function(c,o,i){var n=c.createEmptyMovieClip(o,i),u=1;this.make();for(var p=0;p<this.modules.length;p++)for(var h=p*u,v=0;v<this.modules[p].length;v++){var g=v*u,E=this.modules[p][v];E&&(n.beginFill(0,100),n.moveTo(g,h),n.lineTo(g+u,h),n.lineTo(g+u,h+u),n.lineTo(g,h+u),n.endFill())}return n},_.setupTimingPattern=function(){for(var c=8;c<this.moduleCount-8;c++){if(this.modules[c][6]!=null)continue;this.modules[c][6]=c%2==0}for(var o=8;o<this.moduleCount-8;o++){if(this.modules[6][o]!=null)continue;this.modules[6][o]=o%2==0}},_.setupPositionAdjustPattern=function(){for(var c=P.getPatternPosition(this.typeNumber),o=0;o<c.length;o++)for(var i=0;i<c.length;i++){var n=c[o],u=c[i];if(this.modules[n][u]!=null)continue;for(var p=-2;p<=2;p++)for(var h=-2;h<=2;h++)p==-2||p==2||h==-2||h==2||p==0&&h==0?this.modules[n+p][u+h]=!0:this.modules[n+p][u+h]=!1}},_.setupTypeNumber=function(c){for(var o=P.getBCHTypeNumber(this.typeNumber),i=0;i<18;i++){var n=!c&&(o>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=n}for(var i=0;i<18;i++){var n=!c&&(o>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=n}},_.setupTypeInfo=function(c,o){for(var i=this.errorCorrectLevel<<3|o,n=P.getBCHTypeInfo(i),u=0;u<15;u++){var p=!c&&(n>>u&1)==1;u<6?this.modules[u][8]=p:u<8?this.modules[u+1][8]=p:this.modules[this.moduleCount-15+u][8]=p}for(var u=0;u<15;u++){var p=!c&&(n>>u&1)==1;u<8?this.modules[8][this.moduleCount-u-1]=p:u<9?this.modules[8][15-u-1+1]=p:this.modules[8][15-u-1]=p}this.modules[this.moduleCount-8][8]=!c},_.mapData=function(c,o){for(var i=-1,n=this.moduleCount-1,u=7,p=0,h=this.moduleCount-1;h>0;h-=2)for(h==6&&h--;;){for(var v=0;v<2;v++)if(this.modules[n][h-v]==null){var g=!1;p<c.length&&(g=(c[p]>>>u&1)==1);var E=P.getMask(o,n,h-v);E&&(g=!g),this.modules[n][h-v]=g,u--,u==-1&&(p++,u=7)}if(n+=i,n<0||this.moduleCount<=n){n-=i,i=-i;break}}},f.PAD0=236,f.PAD1=17,f.createData=function(c,o,i){for(var n=m.getRSBlocks(c,o),u=new S,p=0;p<i.length;p++){var h=i[p];u.put(h.mode,4),u.put(h.getLength(),P.getLengthInBits(h.mode,c)),h.write(u)}for(var v=0,p=0;p<n.length;p++)v+=n[p].dataCount;if(u.getLengthInBits()>v*8)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+v*8+")");for(u.getLengthInBits()+4<=v*8&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=v*8);){if(u.put(f.PAD0,8),u.getLengthInBits()>=v*8)break;u.put(f.PAD1,8)}return f.createBytes(u,n)},f.createBytes=function(c,o){for(var i=0,n=0,u=0,p=new Array(o.length),h=new Array(o.length),v=0;v<o.length;v++){var g=o[v].dataCount,E=o[v].totalCount-g;n=Math.max(n,g),u=Math.max(u,E),p[v]=new Array(g);for(var a=0;a<p[v].length;a++)p[v][a]=255&c.buffer[a+i];i+=g;var l=P.getErrorCorrectPolynomial(E),t=new d(p[v],l.getLength()-1),C=t.mod(l);h[v]=new Array(l.getLength()-1);for(var a=0;a<h[v].length;a++){var w=a+C.getLength()-h[v].length;h[v][a]=w>=0?C.get(w):0}}for(var s=0,a=0;a<o.length;a++)s+=o[a].totalCount;for(var L=new Array(s),O=0,a=0;a<n;a++)for(var v=0;v<o.length;v++)a<p[v].length&&(L[O++]=p[v][a]);for(var a=0;a<u;a++)for(var v=0;v<o.length;v++)a<h[v].length&&(L[O++]=h[v][a]);return L},j.exports=f},HmJG:function(j,Y,M){},IBYe:function(j,Y,M){"use strict";function D(m){return null}Y.a=D},Ib8C:function(j,Y,M){(function(D){(function(m,S){j.exports=Y=S()})(this,function(){var m=m||function(S,P){var d;if(typeof window!="undefined"&&window.crypto&&(d=window.crypto),typeof self!="undefined"&&self.crypto&&(d=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(d=globalThis.crypto),!d&&typeof window!="undefined"&&window.msCrypto&&(d=window.msCrypto),!d&&typeof D!="undefined"&&D.crypto&&(d=D.crypto),!d&&!0)try{d=M(4)}catch(l){}var f=function(){if(d){if(typeof d.getRandomValues=="function")try{return d.getRandomValues(new Uint32Array(1))[0]}catch(l){}if(typeof d.randomBytes=="function")try{return d.randomBytes(4).readInt32LE()}catch(l){}}throw new Error("Native crypto module could not be used to get secure random number.")},_=Object.create||function(){function l(){}return function(t){var C;return l.prototype=t,C=new l,l.prototype=null,C}}(),c={},o=c.lib={},i=o.Base=function(){return{extend:function(l){var t=_(this);return l&&t.mixIn(l),(!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 l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var t in l)l.hasOwnProperty(t)&&(this[t]=l[t]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=o.WordArray=i.extend({init:function(l,t){l=this.words=l||[],t!=P?this.sigBytes=t:this.sigBytes=l.length*4},toString:function(l){return(l||p).stringify(this)},concat:function(l){var t=this.words,C=l.words,w=this.sigBytes,s=l.sigBytes;if(this.clamp(),w%4)for(var L=0;L<s;L++){var O=C[L>>>2]>>>24-L%4*8&255;t[w+L>>>2]|=O<<24-(w+L)%4*8}else for(var x=0;x<s;x+=4)t[w+x>>>2]=C[x>>>2];return this.sigBytes+=s,this},clamp:function(){var l=this.words,t=this.sigBytes;l[t>>>2]&=4294967295<<32-t%4*8,l.length=S.ceil(t/4)},clone:function(){var l=i.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var t=[],C=0;C<l;C+=4)t.push(f());return new n.init(t,l)}}),u=c.enc={},p=u.Hex={stringify:function(l){for(var t=l.words,C=l.sigBytes,w=[],s=0;s<C;s++){var L=t[s>>>2]>>>24-s%4*8&255;w.push((L>>>4).toString(16)),w.push((L&15).toString(16))}return w.join("")},parse:function(l){for(var t=l.length,C=[],w=0;w<t;w+=2)C[w>>>3]|=parseInt(l.substr(w,2),16)<<24-w%8*4;return new n.init(C,t/2)}},h=u.Latin1={stringify:function(l){for(var t=l.words,C=l.sigBytes,w=[],s=0;s<C;s++){var L=t[s>>>2]>>>24-s%4*8&255;w.push(String.fromCharCode(L))}return w.join("")},parse:function(l){for(var t=l.length,C=[],w=0;w<t;w++)C[w>>>2]|=(l.charCodeAt(w)&255)<<24-w%4*8;return new n.init(C,t)}},v=u.Utf8={stringify:function(l){try{return decodeURIComponent(escape(h.stringify(l)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(l){return h.parse(unescape(encodeURIComponent(l)))}},g=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=v.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var t,C=this._data,w=C.words,s=C.sigBytes,L=this.blockSize,O=L*4,x=s/O;l?x=S.ceil(x):x=S.max((x|0)-this._minBufferSize,0);var b=x*L,y=S.min(b*4,s);if(b){for(var T=0;T<b;T+=L)this._doProcessBlock(w,T);t=w.splice(0,b),C.sigBytes-=y}return new n.init(t,y)},clone:function(){var l=i.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),E=o.Hasher=g.extend({cfg:i.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(l){return function(t,C){return new l.init(C).finalize(t)}},_createHmacHelper:function(l){return function(t,C){return new a.HMAC.init(l,C).finalize(t)}}}),a=c.algo={};return c}(Math);return m})}).call(this,M("IyRk"))},Iq15:function(j,Y,M){var D=M("nVVt"),m=M("dWSS"),S=M("dQei"),P={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},d={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(f){for(var _=f<<10;d.getBCHDigit(_)-d.getBCHDigit(d.G15)>=0;)_^=d.G15<<d.getBCHDigit(_)-d.getBCHDigit(d.G15);return(f<<10|_)^d.G15_MASK},getBCHTypeNumber:function(f){for(var _=f<<12;d.getBCHDigit(_)-d.getBCHDigit(d.G18)>=0;)_^=d.G18<<d.getBCHDigit(_)-d.getBCHDigit(d.G18);return f<<12|_},getBCHDigit:function(f){for(var _=0;f!=0;)_++,f>>>=1;return _},getPatternPosition:function(f){return d.PATTERN_POSITION_TABLE[f-1]},getMask:function(f,_,c){switch(f){case P.PATTERN000:return(_+c)%2==0;case P.PATTERN001:return _%2==0;case P.PATTERN010:return c%3==0;case P.PATTERN011:return(_+c)%3==0;case P.PATTERN100:return(Math.floor(_/2)+Math.floor(c/3))%2==0;case P.PATTERN101:return _*c%2+_*c%3==0;case P.PATTERN110:return(_*c%2+_*c%3)%2==0;case P.PATTERN111:return(_*c%3+(_+c)%2)%2==0;default:throw new Error("bad maskPattern:"+f)}},getErrorCorrectPolynomial:function(f){for(var _=new m([1],0),c=0;c<f;c++)_=_.multiply(new m([1,S.gexp(c)],0));return _},getLengthInBits:function(f,_){if(1<=_&&_<10)switch(f){case D.MODE_NUMBER:return 10;case D.MODE_ALPHA_NUM:return 9;case D.MODE_8BIT_BYTE:return 8;case D.MODE_KANJI:return 8;default:throw new Error("mode:"+f)}else if(_<27)switch(f){case D.MODE_NUMBER:return 12;case D.MODE_ALPHA_NUM:return 11;case D.MODE_8BIT_BYTE:return 16;case D.MODE_KANJI:return 10;default:throw new Error("mode:"+f)}else if(_<41)switch(f){case D.MODE_NUMBER:return 14;case D.MODE_ALPHA_NUM:return 13;case D.MODE_8BIT_BYTE:return 16;case D.MODE_KANJI:return 12;default:throw new Error("mode:"+f)}else throw new Error("type:"+_)},getLostPoint:function(f){for(var _=f.getModuleCount(),c=0,o=0;o<_;o++)for(var i=0;i<_;i++){for(var n=0,u=f.isDark(o,i),p=-1;p<=1;p++){if(o+p<0||_<=o+p)continue;for(var h=-1;h<=1;h++){if(i+h<0||_<=i+h)continue;if(p==0&&h==0)continue;u==f.isDark(o+p,i+h)&&n++}}n>5&&(c+=3+n-5)}for(var o=0;o<_-1;o++)for(var i=0;i<_-1;i++){var v=0;f.isDark(o,i)&&v++,f.isDark(o+1,i)&&v++,f.isDark(o,i+1)&&v++,f.isDark(o+1,i+1)&&v++,(v==0||v==4)&&(c+=3)}for(var o=0;o<_;o++)for(var i=0;i<_-6;i++)f.isDark(o,i)&&!f.isDark(o,i+1)&&f.isDark(o,i+2)&&f.isDark(o,i+3)&&f.isDark(o,i+4)&&!f.isDark(o,i+5)&&f.isDark(o,i+6)&&(c+=40);for(var i=0;i<_;i++)for(var o=0;o<_-6;o++)f.isDark(o,i)&&!f.isDark(o+1,i)&&f.isDark(o+2,i)&&f.isDark(o+3,i)&&f.isDark(o+4,i)&&!f.isDark(o+5,i)&&f.isDark(o+6,i)&&(c+=40);for(var g=0,i=0;i<_;i++)for(var o=0;o<_;o++)f.isDark(o,i)&&g++;var E=Math.abs(100*g/_/_-50)/5;return c+=E*10,c}};j.exports=d},K3mO:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("3y9D"),M("WYAk"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Base,d=S.WordArray,f=m.algo,_=f.MD5,c=f.EvpKDF=P.extend({cfg:P.extend({keySize:128/32,hasher:_,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,i){for(var n,u=this.cfg,p=u.hasher.create(),h=d.create(),v=h.words,g=u.keySize,E=u.iterations;v.length<g;){n&&p.update(n),n=p.update(o).finalize(i),p.reset();for(var a=1;a<E;a++)n=p.finalize(n),p.reset();h.concat(n)}return h.sigBytes=g*4,h}});m.EvpKDF=function(o,i,n){return c.create(n).compute(o,i)}}(),D.EvpKDF})},KXlV:function(j,Y,M){j.exports=M.p+"static/job.65c6034f.png"},KeDT:function(j,Y,M){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,Y,M){"use strict";M.d(Y,"a",function(){return s}),M.d(Y,"c",function(){return x});var D=M("0Owb"),m=M("miYZ"),S=M("tsqr"),P=M("oBTY"),d=M("tJVT"),f=M("PpiC"),_=M("k1fw"),c=M("9og8"),o=M("DZo9"),i=M("8z0m"),n=M("WmNS"),u=M.n(n),p=M("cDcd"),h=M.n(p),v=M("ErOA"),g=M("NFKh"),E=M.n(g),a=M("7Cbv"),l=M("9kvl"),t=M("mxV5"),C=M.n(t),w=i.a.Dragger,s=function(T){var k="bf3c199c2470cb477d907b1e0917c17b",N="5183666c72eec9e4",I=E.a.enc.Utf8.parse(k),W=E.a.enc.Utf8.parse(N),K=E.a.AES.decrypt(T,I,{iv:W,mode:E.a.mode.CBC});return K.toString(E.a.enc.Utf8)},L,O=function(){var y=Object(c.a)(u.a.mark(function T(k){var N,I,W,K,U,z,B,H,G,ee,ie;return u.a.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return B=k.identifier,H=k.oldFilename,G=k.newFilename,xe.next=3,Object(v.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ee=xe.sent,ee.data=JSON.parse(s(ee.data)),ie=new C.a({endpoint:ee==null||((N=ee.data)===null||N===void 0)?void 0:N.end_point,region:ee==null||((I=ee.data)===null||I===void 0)?void 0:I.region,accessKeyId:ee==null||((W=ee.data)===null||W===void 0)?void 0:W.access_key_id,accessKeySecret:ee==null||((K=ee.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:ee==null||((U=ee.data)===null||U===void 0)?void 0:U.bucket,stsToken:ee==null||((z=ee.data)===null||z===void 0)?void 0:z.security_token}),xe.abrupt("return",new Promise(function(Te,se){console.log(11111,"".concat(B,"/").concat(H),"".concat(B,"/").concat(G),ee.data),ie.copy("/".concat(B,"/").concat(H),"/".concat(B,"/").concat(G)).then(function(ve){console.log("\u62F7\u8D1D\u6210\u529F",ve)}).catch(function(ve){console.log(ve);debugger})}));case 7:case"end":return xe.stop()}},T)}));return function(k){return y.apply(this,arguments)}}(),x=function(){var y=Object(c.a)(u.a.mark(function T(k,N,I){var W,K,U,z,B,H,G,ee,ie,ue;return u.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return N.file_name=k.name,Te.next=3,Object(v.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return G=Te.sent,console.log("decrypt(res.data):",s(G.data)),G.data=JSON.parse(s(G.data)),ee=k.name.split("."),ee.pop(),ie=N.realFileName?ee:Object(a.a)(),ue=new C.a({endpoint:G==null||((W=G.data)===null||W===void 0)?void 0:W.end_point,region:G==null||((K=G.data)===null||K===void 0)?void 0:K.region,accessKeyId:G==null||((U=G.data)===null||U===void 0)?void 0:U.access_key_id,accessKeySecret:G==null||((z=G.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:G==null||((B=G.data)===null||B===void 0)?void 0:B.bucket,stsToken:G==null||((H=G.data)===null||H===void 0)?void 0:H.security_token}),Te.abrupt("return",new Promise(function(se,ve){var de;ue.multipartUpload("".concat(ie),new Blob([k],{type:k.type}),Object(_.a)(Object(_.a)({timeout:200*1e3,partSize:102400},I),{},{callback:{url:G==null||((de=G.data)===null||de===void 0)?void 0:de.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)(N)}})).then(function(ne){var ae;k.response=(ae=ne.data)===null||ae===void 0?void 0:ae.data,se(ne==null?void 0:ne.data)}).catch(function(ne){ve(ne),console.log("err:",ne)})}));case 11:case"end":return Te.stop()}},T)}));return function(k,N,I){return y.apply(this,arguments)}}(),b=function(T){var k=T.user,N=T.cancelUpload,I=Object(f.a)(T,["user","cancelUpload"]),W=Object(p.useState)([]),K=Object(d.a)(W,2),U=K[0],z=K[1],B=Object(p.useState)(),H=Object(d.a)(B,2),G=H[0],ee=H[1],ie={onRemove:function(Te){z(Object(P.a)(U.filter(function(se){return se.name!==Te.name}))),I.onChange(U.filter(function(se){return se.name!==Te.name}))},disabled:I.disabled,multiple:!0,fileList:U==null?void 0:U.map(function(xe){return xe.file}),customRequest:function(){},beforeUpload:function(){var xe=Object(c.a)(u.a.mark(function se(ve){var de;return u.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(de=I.maxSize||1024*1024*1024*1,!U.filter(function(Z){return Z.name===ve.name}).length){ae.next=4;break}return S.b.info("".concat(ve.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ae.abrupt("return");case 4:if(!((ve==null?void 0:ve.size)>de)){ae.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(de/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ae.abrupt("return",!1);case 7:return U.push({name:ve.name,file:ve}),z(Object(P.a)(U)),I.onChange(U),ae.abrupt("return",!1);case 11:case"end":return ae.stop()}},se)}));function Te(se){return xe.apply(this,arguments)}return Te}()},ue=function(){var xe=Object(c.a)(u.a.mark(function Te(se,ve){var de,ne,ae,Z,le,Q,q,be,te,J;return u.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return ve.file_name=se.name,q=se.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(s(be.data)),!((be==null?void 0:be.status)!==0)){$.next=12;break}return U[U.findIndex(function(ge){return ge.name===q})].status="error",U[U.findIndex(function(ge){return ge.name===q})].file.status="error",I.onChange(U),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return G=new C.a({endpoint:be==null||((de=be.data)===null||de===void 0)?void 0:de.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||((Z=be.data)===null||Z===void 0)?void 0:Z.access_key_secret,bucket:be==null||((le=be.data)===null||le===void 0)?void 0:le.bucket,stsToken:be==null||((Q=be.data)===null||Q===void 0)?void 0:Q.security_token}),console.log(se,"file"),ee(G),te=se.name.split("."),te.pop(),J=ve.realFileName?te:Object(a.a)(),$.abrupt("return",new Promise(function(ge,fe){try{var _e;G.multipartUpload("".concat(I.identifier,"/").concat(J).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([se.file],{type:se.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function($e,Ve,et){try{console.log("\u8FDB\u5EA6",$e,Ve,et);var at=U.findIndex(function(st){return st.name===q});U[at].file.percent=$e*100,U[at].tempCheckpoint=Ve,z(Object(P.a)(U))}catch(st){}},checkpoint:U[U.findIndex(function(He){return He.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:be==null||((_e=be.data)===null||_e===void 0)?void 0:_e.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)(ve)}}).then(function(He){var $e,Ve=U.findIndex(function(Se){return Se.name===q}),et="done";if((($e=He.data)===null||$e===void 0?void 0:$e.status)===0){var at;se.response=(at=He.data)===null||at===void 0?void 0:at.data;var st=U.findIndex(function(Se){return Se.name===q});U[st].status="done",U[st].file.status="done"}else{var Me;S.b.warn((Me=He.data)===null||Me===void 0?void 0:Me.message),et="error"}U[Ve].status=et,U[Ve].file.status=et,I.onChange(U),ge(He==null?void 0:He.data)}).catch(function(He){U[U.findIndex(function($e){return $e.name===q})].status="error",U[U.findIndex(function($e){return $e.name===q})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),z(Object(P.a)(U)),I.onChange(U),fe(He),console.log("err:",He)})}catch(He){}}));case 19:case"end":return $.stop()}},Te)}));return function(se,ve){return xe.apply(this,arguments)}}();return Object(p.useEffect)(function(){U.every(function(xe){return xe==="done"||xe==="error"})&&I.onComplete(U)},[U]),Object(p.useEffect)(function(){if(N){var xe;(xe=G)===null||xe===void 0||xe.cancel()}},[N]),Object(p.useEffect)(function(){I.uploading&&U.map(function(){var xe=Object(c.a)(u.a.mark(function Te(se){var ve,de;return u.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!((!se.status||se.status==="error")&&!N)){ae.next=6;break}return se.status="uploading",se.file.status="uploading",ae.next=5,ue(se,{login:k==null||((ve=k.userInfo)===null||ve===void 0)?void 0:ve.login,container_type:I.container_type,container_id:I.container_id,description:I.description,realFileName:I.realFileName});case 5:de=ae.sent;case 6:case"end":return ae.stop()}},Te)}));return function(Te){return xe.apply(this,arguments)}}())},[I.uploading]),h.a.createElement(w,Object(D.a)({},ie,{height:I.height,className:I.className}),h.a.createElement("p",{className:"ant-upload-hint"},I.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(l.a)(function(y){var T=y.loading,k=y.globalSetting,N=y.user;return{globalSetting:k,loading:T.models.competitions,user:N}})(b)},KmYQ:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.ZeroPadding={pad:function(m,S){var P=S*4;m.clamp(),m.sigBytes+=P-(m.sigBytes%P||P)},unpad:function(m){for(var S=m.words,P=m.sigBytes-1,P=m.sigBytes-1;P>=0;P--)if(S[P>>>2]>>>24-P%4*8&255){m.sigBytes=P+1;break}}},D.pad.ZeroPadding})},LdHM:function(j,Y,M){"use strict";M.d(Y,"b",function(){return t}),M.d(Y,"a",function(){return w});var D=M("1OyB"),m=M("vuIU"),S=M("Ji7U"),P=M("LK+K"),d=M("cDcd"),f=M("rePB"),_=M("Ff2n"),c=M("ODXe"),o=M("4IlW"),i=M("bX4T"),n=M("YrtM"),u=M("TSYQ"),p=M.n(u),h=M("+nKL"),v=M("8OUc"),g=function(G,ee){var ie=G.prefixCls,ue=G.id,xe=G.flattenOptions,Te=G.childrenAsData,se=G.values,ve=G.searchValue,de=G.multiple,ne=G.defaultActiveFirstOption,ae=G.height,Z=G.itemHeight,le=G.notFoundContent,Q=G.open,q=G.menuItemSelectedIcon,be=G.virtual,te=G.onSelect,J=G.onToggleOpen,X=G.onActiveValue,$=G.onScroll,ge=G.onMouseEnter,fe="".concat(ie,"-item"),_e=Object(n.a)(function(){return xe},[Q,xe],function(qe,ke){return ke[0]&&qe[1]!==ke[1]}),He=d.useRef(null),$e=function(ke){ke.preventDefault()},Ve=function(ke){He.current&&He.current.scrollTo({index:ke})},et=function(ke){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Re=_e.length,pe=0;pe<Re;pe+=1){var Ee=(ke+pe*Oe+Re)%Re,we=_e[Ee],De=we.group,Ge=we.data;if(!De&&!Ge.disabled)return Ee}return-1},at=d.useState(function(){return et(0)}),st=Object(c.a)(at,2),Me=st[0],Se=st[1],Ye=function(ke){Se(ke);var Oe=_e[ke];if(!Oe){X(null,-1);return}X(Oe.data.value,ke)};d.useEffect(function(){Ye(ne!==!1?et(0):-1)},[_e.length,ve]),d.useEffect(function(){var qe=setTimeout(function(){if(!de&&Q&&se.size===1){var ke=Array.from(se)[0],Oe=_e.findIndex(function(Re){var pe=Re.data;return pe.value===ke});Ye(Oe),Ve(Oe)}});return function(){return clearTimeout(qe)}},[Q]);var it=function(ke){ke!==void 0&&te(ke,{selected:!se.has(ke)}),de||J(!1)};if(d.useImperativeHandle(ee,function(){return{onKeyDown:function(ke){var Oe=ke.which;switch(Oe){case o.a.UP:case o.a.DOWN:{var Re=0;if(Oe===o.a.UP?Re=-1:Oe===o.a.DOWN&&(Re=1),Re!==0){var pe=et(Me+Re,Re);Ve(pe),Ye(pe)}break}case o.a.ENTER:{var Ee=_e[Me];Ee&&!Ee.data.disabled?it(Ee.data.value):it(void 0),Q&&ke.preventDefault();break}case o.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(ke){Ve(ke)}}}),_e.length===0)return d.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),className:"".concat(fe,"-empty"),onMouseDown:$e},le);function Ke(qe){var ke=_e[qe];if(!ke)return null;var Oe=ke.data||{},Re=Oe.value,pe=Oe.label,Ee=Oe.children,we=Object(i.a)(Oe,!0),De=Te?Ee:pe;return ke?d.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},we,{key:qe,role:"option",id:"".concat(ue,"_list_").concat(qe),"aria-selected":se.has(Re)}),Re):null}return d.createElement(d.Fragment,null,d.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ke(Me-1),Ke(Me),Ke(Me+1)),d.createElement(h.a,{itemKey:"key",ref:He,data:_e,height:ae,itemHeight:Z,fullHeight:!1,onMouseDown:$e,onScroll:$,virtual:be,onMouseEnter:ge},function(qe,ke){var Oe,Re=qe.group,pe=qe.groupOption,Ee=qe.data,we=Ee.label,De=Ee.key;if(Re)return d.createElement("div",{className:p()(fe,"".concat(fe,"-group"))},we!==void 0?we:De);var Ge=Ee.disabled,nt=Ee.value,lt=Ee.title,ut=Ee.children,Rt=Ee.style,tt=Ee.className,nr=Object(_.a)(Ee,["disabled","value","title","children","style","className"]),Wt=se.has(nt),pt="".concat(fe,"-option"),Rr=p()(fe,pt,tt,(Oe={},Object(f.a)(Oe,"".concat(pt,"-grouped"),pe),Object(f.a)(Oe,"".concat(pt,"-active"),Me===ke&&!Ge),Object(f.a)(Oe,"".concat(pt,"-disabled"),Ge),Object(f.a)(Oe,"".concat(pt,"-selected"),Wt),Oe)),Ir=Te?ut:we,Lr=!q||typeof q=="function"||Wt;return d.createElement("div",Object.assign({},nr,{"aria-selected":Wt,className:Rr,title:lt,onMouseMove:function(){if(Me===ke||Ge)return;Ye(ke)},onClick:function(){Ge||it(nt)},style:Rt}),d.createElement("div",{className:"".concat(pt,"-content")},Ir||nt),d.isValidElement(q)||Wt,Lr&&d.createElement(v.a,{className:"".concat(fe,"-option-state"),customizeIcon:q,customizeIconProps:{isSelected:Wt}},Wt?"\u2713":null))}))},E=d.forwardRef(g);E.displayName="OptionList";var a=E,l=function(){return null};l.isSelectOption=!0;var t=l,C=function(){return null};C.isSelectOptGroup=!0;var w=C,s=M("VTBJ"),L=M("Zm9Q");function O(H){var G=H.key,ee=H.props,ie=ee.children,ue=ee.value,xe=Object(_.a)(ee,["children","value"]);return Object(s.a)({key:G,value:ue!==void 0?ue:G,children:ie},xe)}function x(H){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(H).map(function(ee,ie){if(!d.isValidElement(ee)||!ee.type)return null;var ue=ee.type.isSelectOptGroup,xe=ee.key,Te=ee.props,se=Te.children,ve=Object(_.a)(Te,["children"]);return G||!ue?O(ee):Object(s.a)(Object(s.a)({key:"__RC_SELECT_GRP__".concat(xe===null?ie:xe,"__"),label:xe},ve),{},{options:x(se)})}).filter(function(ee){return ee})}var b=M("2Qr1"),y=M("qNPg"),T=M("U8pU"),k=M("Kwbf"),N=M("WKfj");function I(H){var G=H.mode,ee=H.options,ie=H.children,ue=H.backfill,xe=H.allowClear,Te=H.placeholder,se=H.getInputElement,ve=H.showSearch,de=H.onSearch,ne=H.defaultOpen,ae=H.autoFocus,Z=H.labelInValue,le=H.value,Q=H.inputValue,q=H.optionLabelProp,be=G==="multiple"||G==="tags",te=ve!==void 0?ve:be||G==="combobox",J=ee||x(ie);if(Object(k.a)(G!=="tags"||J.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var X=J.some(function(fe){return fe.options?fe.options.some(function(_e){return typeof("value"in _e?_e.value:_e.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(k.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(G!=="combobox"||!q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(G==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(k.a)(G==="combobox"||!se,"`getInputElement` only work with `combobox` mode."),Object(k.b)(G!=="combobox"||!se||!xe||!Te,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),de&&!te&&G!=="combobox"&&G!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!ne||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),le!=null){var $=Object(N.d)(le);Object(k.a)(!Z||$.every(function(fe){return Object(T.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!be||Array.isArray(le),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var ge=null;Object(L.a)(ie).some(function(fe){if(!d.isValidElement(fe)||!fe.type)return!1;var _e=fe.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var He=Object(L.a)(fe.props.children).every(function($e){return!d.isValidElement($e)||!fe.type||$e.type.isSelectOption?!0:(ge=$e.type,!1)});return!He}return ge=_e,!0}),ge&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ge.displayName||ge.name||ge,"`.")),Object(k.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var W=I,K=Object(y.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:x,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:W,fillOptionsWithMissingValue:b.a}),U=function(H){Object(S.a)(ee,H);var G=Object(P.a)(ee);function ee(){var ie;return Object(D.a)(this,ee),ie=G.apply(this,arguments),ie.selectRef=d.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(m.a)(ee,[{key:"render",value:function(){return d.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),ee}(d.Component);U.Option=t,U.OptGroup=w;var z=U,B=Y.c=z},M8RZ:function(j,Y,M){"use strict";M.d(Y,"a",function(){return o});var D=M("fWQN"),m=M("mtLc"),S=M("yKVA"),P=M("879j"),d=M("cDcd"),f=M.n(d),_=M("faye"),c=M.n(_),o=function(i){Object(S.a)(u,i);var n=Object(P.a)(u);function u(p){var h;Object(D.a)(this,u),h=n.call(this,p);var v=window.document;return h.node=v.createElement("div"),v.body.appendChild(h.node),h}return Object(m.a)(u,[{key:"render",value:function(){var h=this.props.children;return Object(_.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(f.a.Component)},MlIO:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,d=P.Base,f=P.WordArray,_=S.x64={},c=_.Word=d.extend({init:function(i,n){this.high=i,this.low=n}}),o=_.WordArray=d.extend({init:function(i,n){i=this.words=i||[],n!=m?this.sigBytes=n:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,n=i.length,u=[],p=0;p<n;p++){var h=i[p];u.push(h.high),u.push(h.low)}return f.create(u,this.sigBytes)},clone:function(){for(var i=d.clone.call(this),n=i.words=this.words.slice(0),u=n.length,p=0;p<u;p++)n[p]=n[p].clone();return i}})}(),D})},NFKh:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("MlIO"),M("F+F2"),M("qM6L"),M("ETIr"),M("wbyO"),M("cv67"),M("3y9D"),M("lPiR"),M("GRuw"),M("1uat"),M("uGsb"),M("5hvy"),M("ELcG"),M("WYAk"),M("e7zE"),M("K3mO"),M("OLod"),M("ALsQ"),M("9OqN"),M("qu8F"),M("S6kV"),M("gb/T"),M("qBft"),M("oRuE"),M("jO9C"),M("KmYQ"),M("uGxW"),M("bQjk"),M("wZgz"),M("pA7S"),M("w7YG"),M("E4JC"),M("PVpz"))})(this,function(D){return D})},NLgs:function(j,Y,M){"use strict";M.d(Y,"e",function(){return t}),M.d(Y,"f",function(){return C}),M.d(Y,"d",function(){return s}),M.d(Y,"c",function(){return L}),M.d(Y,"a",function(){return O}),M.d(Y,"b",function(){return x});var D=M("miYZ"),m=M("tsqr"),S=M("9og8"),P=M("2qtc"),d=M("kLXV"),f=M("WmNS"),_=M.n(f),c=M("cDcd"),o=M.n(c),i=M("9kvl"),n=M("xKgJ"),u=M("1vsH"),p=M("RCxd"),h=M("mOS8"),v=M.n(h),g=M("1ZF9"),E=M.n(g),a=M("NoGO"),l=M.n(a),t=function(y){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(C(y)&&w(T))},C=function(y){return Object(n.p)()?!0:(y({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},w=function(){var y,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,k=Object(i.c)()._store.getState(),N=k.user;return(y=N.userInfo)!==null&&y!==void 0&&y.profile_completed?!0:(d.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(){i.d.push("/account/profile/edit")}}),!1)},s=function(){var y,T=Object(i.c)()._store.getState(),k=T.user;return(y=k.userInfo)!==null&&y!==void 0&&y.professional_certification?!0:(d.a.confirm({title:"\u63D0\u793A",centered:!0,content:o.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(u.U)("/account/certification")}}),!1)},L=function(){return Object(n.a)()?!0:(d.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),o.a.createElement("img",{src:l.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},O=function(y,T){return y?!0:(d.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:o.a.createElement("div",null,o.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"),o.a.createElement("div",{style:{marginLeft:"110px"}},o.a.createElement("img",{src:E.a,width:200}),o.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(u.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]:"",k=Object(i.c)()._store.getState(),N=k.shixunsDetail.detail;return(N==null?void 0:N.public)===2||(N==null?void 0:N.public)===1||(N==null?void 0:N.shixun_status)===3?(d.a.info({centered:!0,icon:o.a.createElement(p.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc",style:{marginLeft:-38}},o.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(N==null?void 0:N.public)===2?"\u5DF2\u516C\u5F00":(N==null?void 0:N.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",T,"\u3002"),o.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),o.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:v.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(N==null?void 0:N.shixun_status)===2?(d.a.confirm({centered:!0,icon:o.a.createElement(p.a,null),title:"\u63D0\u793A",content:o.a.createElement("div",null,o.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",T,"\u3002"),o.a.createElement("br",null),o.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){d.a.confirm({width:440,centered:!0,icon:o.a.createElement(p.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var W=Object(S.a)(_.a.mark(function U(){var z;return _.a.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,y({type:"shixunsDetail/cancelRelease",payload:{id:N==null?void 0:N.identifier}});case 2:z=H.sent,z.status!==401&&(m.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:N==null?void 0:N.identifier}}),y({type:"practiceSetting/getCommonData",payload:{id:N==null?void 0:N.identifier}}));case 4:case"end":return H.stop()}},U)}));function K(){return W.apply(this,arguments)}return K}()})}}),!0):!1}},NnUe:function(j,Y,M){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,Y,M){j.exports=M.p+"static/newqrcode.9bae6615.png"},NvD2:function(j,Y,M){"use strict";M.d(Y,"a",function(){return f});var D=M("Kwbf");function m(_,c){var o=new Set;return _.forEach(function(i){c.has(i)||o.add(i)}),o}function S(_){var c=_||{},o=c.disabled,i=c.disableCheckbox,n=c.checkable;return!!(o||i)||n===!1}function P(_,c,o,i){for(var n=new Set(_),u=new Set,p=0;p<=o;p+=1){var h=c.get(p)||new Set;h.forEach(function(a){var l=a.key,t=a.node,C=a.children,w=C===void 0?[]:C;n.has(l)&&!i(t)&&w.filter(function(s){return!i(s.node)}).forEach(function(s){n.add(s.key)})})}for(var v=new Set,g=o;g>=0;g-=1){var E=c.get(g)||new Set;E.forEach(function(a){var l=a.parent,t=a.node;if(i(t)||!a.parent||v.has(a.parent.key))return;if(i(a.parent.node)){v.add(l.key);return}var C=!0,w=!1;(l.children||[]).filter(function(s){return!i(s.node)}).forEach(function(s){var L=s.key,O=n.has(L);C&&!O&&(C=!1),!w&&(O||u.has(L))&&(w=!0)}),C&&n.add(l.key),w&&u.add(l.key),v.add(l.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(m(u,n))}}function d(_,c,o,i,n){for(var u=new Set(_),p=new Set(c),h=0;h<=i;h+=1){var v=o.get(h)||new Set;v.forEach(function(l){var t=l.key,C=l.node,w=l.children,s=w===void 0?[]:w;!u.has(t)&&!p.has(t)&&!n(C)&&s.filter(function(L){return!n(L.node)}).forEach(function(L){u.delete(L.key)})})}p=new Set;for(var g=new Set,E=i;E>=0;E-=1){var a=o.get(E)||new Set;a.forEach(function(l){var t=l.parent,C=l.node;if(n(C)||!l.parent||g.has(l.parent.key))return;if(n(l.parent.node)){g.add(t.key);return}var w=!0,s=!1;(t.children||[]).filter(function(L){return!n(L.node)}).forEach(function(L){var O=L.key,x=u.has(O);w&&!x&&(w=!1),!s&&(x||p.has(O))&&(s=!0)}),w||u.delete(t.key),s&&p.add(t.key),g.add(t.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(m(p,u))}}function f(_,c,o,i){var n=[],u;i?u=i:u=S;var p=new Set(_.filter(function(E){var a=!!o[E];return a||n.push(E),a})),h=new Map,v=0;Object.keys(o).forEach(function(E){var a=o[E],l=a.level,t=h.get(l);t||(t=new Set,h.set(l,t)),t.add(a),v=Math.max(v,l)}),Object(D.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(E){return"'".concat(E,"'")}).join(", ")));var g;return c===!0?g=P(p,h,v,u):g=d(p,c.halfCheckedKeys,h,v,u),g}},OLod:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("K3mO"))})(this,function(D){D.lib.Cipher||function(m){var S=D,P=S.lib,d=P.Base,f=P.WordArray,_=P.BufferedBlockAlgorithm,c=S.enc,o=c.Utf8,i=c.Base64,n=S.algo,u=n.EvpKDF,p=P.Cipher=_.extend({cfg:d.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,k){this.cfg=this.cfg.extend(k),this._xformMode=y,this._key=T,this.reset()},reset:function(){_.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:L}return function(T){return{encrypt:function(k,N,I){return y(N).encrypt(T,k,N,I)},decrypt:function(k,N,I){return y(N).decrypt(T,k,N,I)}}}}()}),h=P.StreamCipher=p.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),v=S.mode={},g=P.BlockCipherMode=d.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(k,N){var I=this._cipher,W=I.blockSize;T.call(this,k,N,W),I.encryptBlock(k,N),this._prevBlock=k.slice(N,N+W)}}),y.Decryptor=y.extend({processBlock:function(k,N){var I=this._cipher,W=I.blockSize,K=k.slice(N,N+W);I.decryptBlock(k,N),T.call(this,k,N,W),this._prevBlock=K}});function T(k,N,I){var W,K=this._iv;K?(W=K,this._iv=m):W=this._prevBlock;for(var U=0;U<I;U++)k[N+U]^=W[U]}return y}(),a=S.pad={},l=a.Pkcs7={pad:function(y,T){for(var k=T*4,N=k-y.sigBytes%k,I=N<<24|N<<16|N<<8|N,W=[],K=0;K<N;K+=4)W.push(I);var U=f.create(W,N);y.concat(U)},unpad:function(y){var T=y.words[y.sigBytes-1>>>2]&255;y.sigBytes-=T}},t=P.BlockCipher=p.extend({cfg:p.cfg.extend({mode:E,padding:l}),reset:function(){var y;p.reset.call(this);var T=this.cfg,k=T.iv,N=T.mode;this._xformMode==this._ENC_XFORM_MODE?y=N.createEncryptor:(y=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,k&&k.words):(this._mode=y.call(N,this,k&&k.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}),C=P.CipherParams=d.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),w=S.format={},s=w.OpenSSL={stringify:function(y){var T,k=y.ciphertext,N=y.salt;return N?T=f.create([1398893684,1701076831]).concat(N).concat(k):T=k,T.toString(i)},parse:function(y){var T,k=i.parse(y),N=k.words;return N[0]==1398893684&&N[1]==1701076831&&(T=f.create(N.slice(2,4)),N.splice(0,4),k.sigBytes-=16),C.create({ciphertext:k,salt:T})}},L=P.SerializableCipher=d.extend({cfg:d.extend({format:s}),encrypt:function(y,T,k,N){N=this.cfg.extend(N);var I=y.createEncryptor(k,N),W=I.finalize(T),K=I.cfg;return C.create({ciphertext:W,key:k,iv:K.iv,algorithm:y,mode:K.mode,padding:K.padding,blockSize:y.blockSize,formatter:N.format})},decrypt:function(y,T,k,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=y.createDecryptor(k,N).finalize(T.ciphertext);return I},_parse:function(y,T){return typeof y=="string"?T.parse(y,this):y}}),O=S.kdf={},x=O.OpenSSL={execute:function(y,T,k,N){N||(N=f.random(64/8));var I=u.create({keySize:T+k}).compute(y,N),W=f.create(I.words.slice(T),k*4);return I.sigBytes=T*4,C.create({key:I,iv:W,salt:N})}},b=P.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:x}),encrypt:function(y,T,k,N){N=this.cfg.extend(N);var I=N.kdf.execute(k,y.keySize,y.ivSize);N.iv=I.iv;var W=L.encrypt.call(this,y,T,I.key,N);return W.mixIn(I),W},decrypt:function(y,T,k,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=N.kdf.execute(k,y.keySize,y.ivSize,T.salt);N.iv=I.iv;var W=L.decrypt.call(this,y,T,I.key,N);return W}})}()})},OZM5:function(j,Y,M){"use strict";M.d(Y,"b",function(){return i}),M.d(Y,"a",function(){return n}),M.d(Y,"k",function(){return u}),M.d(Y,"h",function(){return p}),M.d(Y,"i",function(){return h}),M.d(Y,"g",function(){return v}),M.d(Y,"c",function(){return g}),M.d(Y,"d",function(){return E}),M.d(Y,"j",function(){return t}),M.d(Y,"e",function(){return C}),M.d(Y,"f",function(){return w});var D=M("KQm4"),m=M("U8pU"),S=M("Ff2n"),P=M("cDcd"),d=M.n(P),f=M("Kwbf"),_=M("WaYH"),c=.25,o=2;function i(s,L){var O=s.slice(),x=O.indexOf(L);return x>=0&&O.splice(x,1),O}function n(s,L){var O=s.slice();return O.indexOf(L)===-1&&O.push(L),O}function u(s){return s.split("-")}function p(s,L){return"".concat(s,"-").concat(L)}function h(s){return s&&s.type&&s.type.isTreeNode}function v(s,L){var O=[s],x=L[s];function b(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(T){var k=T.key,N=T.children;O.push(k),b(N)})}return b(x.children),O}function g(s,L){var O=s.clientY,x=L.selectHandle.getBoundingClientRect(),b=x.top,y=x.bottom,T=x.height,k=Math.max(T*c,o);return O<=b+k?-1:O>=y-k?1:0}function E(s,L){if(!s)return;var O=L.multiple;return O?s.slice():s.length?[s[0]]:s}var a=function(L){return L};function l(s,L){if(!s)return[];var O=L||{},x=O.processProps,b=x===void 0?a:x,y=Array.isArray(s)?s:[s];return y.map(function(T){var k=T.children,N=Object(S.a)(T,["children"]),I=l(k,L);return d.a.createElement(_.a,Object.assign({},b(N)),I)})}function t(s){if(!s)return null;var L;if(Array.isArray(s))L={checkedKeys:s,halfCheckedKeys:void 0};else if(Object(m.a)(s)==="object")L={checkedKeys:s.checked||void 0,halfCheckedKeys:s.halfChecked||void 0};else return Object(f.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function C(s,L){var O=new Set;function x(b){if(O.has(b))return;var y=L[b];if(!y)return;O.add(b);var T=y.parent,k=y.node;if(k.disabled)return;T&&x(T.key)}return(s||[]).forEach(function(b){x(b)}),Object(D.a)(O)}function w(s){var L={};return Object.keys(s).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(L[O]=s[O])}),L}},Ot1p:function(j,Y,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("rAM+"),P=M("miYZ"),d=M("tsqr"),f=M("9og8"),_=M("tJVT"),c=M("jrin"),o=M("WmNS"),i=M.n(o),n=M("cDcd"),u=M.n(n),p=M("VrN/"),h=M.n(p),v=M("bdgK"),g=M("p77/"),E=M("Bd2K"),a=M("ELLl"),l=M("19Vz"),t=M("lZu9"),C=M("+NIl"),w=M("kSUc"),s=M("9Bee"),L=function(tt){var nr=tt.value,Wt=nr===void 0?"":nr,pt=tt.className,Rr=tt.showTextOnly,Ir=tt.showLines,Lr=tt.style,Jr=Lr===void 0?{}:Lr,pr=Object(n.useMemo)(function(){return""},[Wt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:pr}}))},O=M("Q9mQ"),x=M("diRs"),b=M("0Owb"),y=M("dejd"),T=M("C+DQ"),k=M("D1Df"),N=M.n(k),I=M("1vsH"),W=M("m3rI"),K=[{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 U(tt){var nr=tt.onActionCallback,Wt=tt.title,pt=tt.icon,Rr=tt.actionName,Ir=tt.className,Lr=Ir===void 0?"":Ir,Jr=tt.children;function pr(){nr(Rr)}return u.a.createElement("a",{title:Wt,className:Lr,onClick:pr},u.a.createElement("i",{className:"md-iconfont ".concat(pt)}),Jr)}var z=function(tt){var nr=tt.watch,Wt=tt.showNullButton,pt=tt.onActionCallback,Rr=tt.fullScreen,Ir=tt.insertTemp,Lr=tt.hidetoolBar,Jr=tt.uuid,pr=tt.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(I.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(I.G)("_educoder_session"),"&key=").concat(Jr,"&api=").concat(encodeURIComponent(W.a.PROXY_SERVER)));var Qr=[].concat(K,[{title:"".concat(nr?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(nr?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!Lr&&Qr.map(function(Br,Cr){return u.a.createElement("li",{key:Cr},Br.actionName?u.a.createElement(U,Object(b.a)({},Br,{onActionCallback:pt})):u.a.createElement("span",{className:"v-line"}))}),Wt?u.a.createElement("li",null,u.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pt},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ir&&u.a.createElement("li",null,u.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ir),onActionCallback:pt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",null,u.a.createElement(x.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:u.a.createElement("div",null,u.a.createElement(N.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(I.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(I.G)("_educoder_session"),"&key=").concat(Jr,"&api=").concat(encodeURIComponent(W.a.PROXY_SERVER))}))},u.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return pr(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(U,{icon:"".concat(Rr?"icon-shrink":"icon-enlarge"),title:Rr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pt})))},B=M("M8RZ"),H=M("+L6B"),G=M("2/Rp"),ee=M("y8nQ"),ie=M("Vl3Y"),ue=M("5NDa"),xe=M("5rEg"),Te={labelCol:{span:4},wrapperCol:{span:20}},se=function(tt){var nr=tt.callback,Wt=tt.onCancel;function pt(Rr){nr(Rr)}return u.a.createElement(ie.a,Object(b.a)({},Te,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pt}),u.a.createElement(ie.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(xe.a,null)),u.a.createElement(ie.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(xe.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(G.a,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},ve=M("7ahc"),de=M("k1fw"),ne=M("HmJG"),ae=M("BjJ7"),Z=ie.a.useForm,le={width:280,marginRight:10},Q={labelCol:{span:5},wrapperCol:{span:19}},q=function(tt){var nr=tt.callback,Wt=tt.onCancel,pt=Z(),Rr=Object(_.a)(pt,1),Ir=Rr[0],Lr=useRef();function Jr(Br){nr(Object(de.a)(Object(de.a)({},Br),{},{name:Lr.current}))}function pr(Br,Cr){if(Br.status===-1){d.b.error(Br.message);return}Ir.setFieldsValue({src:"/api/attachments/".concat(Br.id),type:Cr.type})}function Qr(Br){var Cr=Br.target.files[0];Lr.current=Cr.name,te(Cr,pr)}return u.a.createElement(ie.a,Object(b.a)({form:Ir},Q,{className:"upload-image-panel",onFinish:Jr}),u.a.createElement(ie.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(ie.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},u.a.createElement(xe.a,{style:le})),u.a.createElement(be,{onFileChange:Qr}))),u.a.createElement(ie.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(xe.a,{style:{width:264}})),u.a.createElement(ie.a.Item,{style:{textAlign:"right"}},u.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(G.a,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))};function be(tt){var nr=tt.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:nr}))}function te(tt,nr){if(!tt)throw new String("\u6CA1\u6709\u6587\u4EF6");var Wt=new FormData;Wt.append("editormd-image-file",tt),Wt.append("file_param_name","editormd-image-file"),Wt.append("byxhr","true");var pt=new window.XMLHttpRequest;pt.withCredentials=!0,pt.addEventListener("load",function(Rr){nr(JSON.parse(Rr.target.responseText),tt)},!1),pt.addEventListener("error",function(Rr){console.error(Rr)},!1),pt.open("POST","".concat(ae.a,"/api/attachments.json")),pt.send(Wt)}var J=M("giR+"),X=M("fyUT"),$=M("7Kak"),ge=M("9yH6"),fe=ge.a.Group,_e={margin:"0 8px"},He=function(tt){var nr=tt.callback,Wt=tt.onCancel;function pt(Rr){nr(Rr)}return u.a.createElement(ie.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pt},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:_e},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:_e},"\u884C\u6570"),u.a.createElement(ie.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(X.a,null)),u.a.createElement("span",{style:_e},"\u5217\u6570"),u.a.createElement(ie.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(X.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:_e},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(ie.a.Item,{name:"align"},u.a.createElement(fe,null,u.a.createElement(ge.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(ge.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(ge.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(ge.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(G.a,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},$e=M("ErOA"),Ve=M("7Cbv"),et="link",at="upload-image",st="code-block",Me="add-table",Se="------------",Ye={default:Se,left:":".concat(Se),center:":".concat(Se,":"),right:"".concat(Se,":")},it=M("9VGf"),Ke,qe;function ke(){}var Oe=0,Re=1e4,pe="\u2581",Ee=`
**\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 we(tt){return/^\d+$/.test(tt)?"".concat(tt,"px"):tt}var De=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ge=De?"Cmd":"Ctrl",nt=["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"],lt=(Ke={},Object(c.a)(Ke,Ge+"-B","bold"),Object(c.a)(Ke,Ge+"-I","italic"),Ke),ut=(qe={},Object(c.a)(qe,et,"\u6DFB\u52A0\u94FE\u63A5"),Object(c.a)(qe,st,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(c.a)(qe,at,"\u6DFB\u52A0\u6587\u4EF6"),Object(c.a)(qe,Me,"\u6DFB\u52A0\u8868\u683C"),qe),Rt=Y.a=function(tt){var nr=tt.defaultValue,Wt=nr===void 0?"":nr,pt=tt.onChange,Rr=tt.width,Ir=Rr===void 0?"100%":Rr,Lr=tt.height,Jr=Lr===void 0?400:Lr,pr=tt.miniToolbar,Qr=pr===void 0?!1:pr,Br=tt.isFocus,Cr=Br===void 0?!1:Br,cn=tt.watch,wn=tt.insertTemp,Hn=tt.mode,sn=Hn===void 0?"markdown":Hn,_a=tt.id,wa=_a===void 0?"markdown-editor-id":_a,mn=tt.showResizeBar,sr=mn===void 0?!1:mn,Kn=tt.noStorage,Ta=Kn===void 0?!1:Kn,jn=tt.showNullButton,Zr=jn===void 0?!1:jn,Ln=tt.hidetoolBar,ga=Ln===void 0?!1:Ln,fa=tt.fullScreen,Tt=fa===void 0?!1:fa,fr=tt.onBlur,na=tt.onCMBeforeChange,ha=tt.onFullScreen,Sa=tt.className,ya=Sa===void 0?"":Sa,In=tt.disablePaste,_r=In===void 0?!1:In,aa=tt.placeholder,Yn=aa===void 0?"":aa,zn=tt.values,On=zn===void 0?"":zn,Va=Object(n.useState)(null),Ma=Object(_.a)(Va,2),Dt=Ma[0],Za=Ma[1],oi=Object(n.useState)(Wt),Ia=Object(_.a)(oi,2),bn=Ia[0],Fn=Ia[1],Ka=Object(n.useState)(cn),qa=Object(_.a)(Ka,2),Gn=qa[0],_i=qa[1],ei=Object(n.useState)(Tt),qn=Object(_.a)(ei,2),Ca=qn[0],mi=qn[1],za=Object(n.useState)(""),ba=Object(_.a)(za,2),Ga=ba[0],ka=ba[1],vi=Object(n.useState)(0),gi=Object(_.a)(vi,2),Na=gi[0],la=gi[1],si=Object(n.useState)(Jr),li=Object(_.a)(si,2),mt=li[0],Ze=li[1],ht=Object(n.useState)(!1),bt=Object(_.a)(ht,2),Ht=bt[0],Ot=bt[1],tr=Object(n.useRef)(Object(Ve.a)()),Pt=Object(n.useRef)(!1),ct=Object(n.useRef)(),vt=Object(n.useRef)(),yt=Object(n.useRef)(),or=Object(n.useRef)(),Xt=Object(n.useRef)(),zt=function(){var At=Object(f.a)(i.a.mark(function kt(){var Lt,Qt;return i.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.next=2,Object($e.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tr.current}});case 2:Qt=Xe.sent,Qt!=null&&(Lt=Qt.attachments)!==null&&Lt!==void 0&&Lt.length&&(console.log("cm:",Dt,vt),Qt.attachments.map(function(Ct){Ct.content_type.indexOf("image")>-1?Dt.replaceSelection("![,](/api/attachments/".concat(Ct.id,"?type=").concat(Ct.content_type,")")):Ct.content_type.indexOf("video")>-1?Dt.replaceSelection('<video width="100%" controls src="'.concat(W.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Ct.content_type.indexOf("pdf")>-1?Dt.replaceSelection('<a href="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,'&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):Dt.replaceSelection("[".concat(Ct.name,"](").concat(W.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,")"))}));case 4:case"end":return Xe.stop()}},kt)}));return function(){return At.apply(this,arguments)}}();Object(n.useEffect)(function(){Fn(On),Dt==null||Dt.setValue(On)},[On]),Object(n.useEffect)(function(){ha==null||ha(Ca)},[Ca]),Object(n.useEffect)(function(){if(vt.current){var At=h.a.fromTextArea(vt.current,{mode:sn,lineNumbers:!Qr,lineWrapping:!0,value:Wt,autoCloseTags:!0,autoCloseBrackets:!0});Cr&&At.focus();function kt(Lt,Qt){if(_r){Qt.preventDefault();return}var gr=Qt.clipboardData;if(gr){var Xe=gr.types.toString(),Ct=gr.items;if(Xe==="Files"||gr.types.indexOf("Files")>-1){if(Qt.preventDefault(),sn=="stex")return;try{var kr,Ur=Ct[1];((kr=Ct[0])===null||kr===void 0?void 0:kr.kind)==="file"&&(Ur=Ct[0]);var Nt=Ur.getAsFile(),ur=Nt.name.split(".").pop();te(Nt,function(Bt){if(Bt.id){var Et,Mt,Zt;(Nt==null||((Et=Nt.type)===null||Et===void 0)?void 0:Et.indexOf("image"))>-1?At.replaceSelection("![,](/api/attachments/".concat(Bt.id,"?type=").concat(Bt.content_type,")")):(Nt==null||((Mt=Nt.type)===null||Mt===void 0)?void 0:Mt.indexOf("video"))>-1?At.replaceSelection('<video width="100%" controls src="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,'"></video>')):(Nt==null||((Zt=Nt.type)===null||Zt===void 0)?void 0:Zt.indexOf("pdf"))>-1?At.replaceSelection('<a href="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Nt.type,'&disposition=inline" target="_blank">').concat(Nt.name,"</a>")):nt.includes(ur)?At.replaceSelection('<a href="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,'?type=office&disposition=inline" target="_blank">').concat(Nt.name,"</a>")):At.replaceSelection("[".concat(Nt.name,"](").concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Bt.content_type,")"))}else(Bt==null?void 0:Bt.status)===401&&(document.location.href="/user/login")})}catch(Bt){d.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return At.on("paste",kt),At.on("dragleave",function(Lt,Qt){yt.current.classList.remove("mouse-hover-md")}),At.on("dragover",function(Lt,Qt){yt.current.classList.add("mouse-hover-md")}),At.on("drop",function(Lt,Qt){yt.current.classList.add("mouse-hover-md");var gr;if(gr=Qt.dataTransfer.files,gr.length>0){Qt.preventDefault(),Qt.stopPropagation();for(var Xe=function(Ur){var Nt=gr[Ur],ur=Nt.name.split(".").pop();te(Nt,function(Bt){if(Bt.id){var Et,Mt,Zt;(Nt==null||((Et=Nt.type)===null||Et===void 0)?void 0:Et.indexOf("image"))>-1?At.replaceSelection("![,](/api/attachments/".concat(Bt.id,"?type=").concat(Bt.content_type,")")):(Nt==null||((Mt=Nt.type)===null||Mt===void 0)?void 0:Mt.indexOf("video"))>-1?At.replaceSelection('<video width="100%" controls src="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,'"></video>')):(Nt==null||((Zt=Nt.type)===null||Zt===void 0)?void 0:Zt.indexOf("pdf"))>-1?At.replaceSelection('<a href="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Nt.type,'&disposition=inline" target="_blank">').concat(Nt.name,"</a>")):nt.includes(ur)?At.replaceSelection('<a href="'.concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,'?type=office&disposition=inline" target="_blank">').concat(Nt.name,"</a>")):At.replaceSelection("[".concat(Nt.name,"](").concat(W.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Bt.content_type,")"))}else(Bt==null?void 0:Bt.status)===401&&(document.location.href="/user/login")})},Ct=0;Ct<gr.length;Ct++)Xe(Ct)}}),Za(At),function(){At.off("paste",kt)}}},[]);var jt=Object(n.useCallback)(function(){if(yt.current)try{}catch(At){console.log(At,"---- to set md editor body height")}},[mt,yt,Ca]);Object(n.useEffect)(function(){function At(){var Lt=new v.default(function(Qt){var gr=Object(S.a)(Qt),Xe;try{for(gr.s();!(Xe=gr.n()).done;){var Ct=Xe.value;(Ct.target.offsetHeight>0||Ct.target.offsetWidth>0)&&(jt(),Dt.setSize("100%","100%"),Dt.refresh())}}catch(kr){gr.e(kr)}finally{gr.f()}});return Lt.observe(vt.current.parentElement),Lt}if(Dt){var kt=At();return function(){kt.unobserve(vt.current.parentElement)}}},[Dt,jt]),Object(n.useEffect)(function(){if(Dt){for(var At=[],kt=function(){var Ct=Qt[Lt];gr=Object(_.a)(Ct,2);var kr=gr[0],Ur=gr[1],Nt=Object(c.a)({},kr,function(){Vt(Ur)});At.push(Nt),Dt.addKeyMap(Nt)},Lt=0,Qt=Object.entries(lt);Lt<Qt.length;Lt++){var gr;kt()}return ct.current=setInterval(function(){Pt.current&&zt()},4e3),function(){clearInterval(ct.current);var Xe=Object(S.a)(At),Ct;try{for(Xe.s();!(Ct=Xe.n()).done;){var kr=Ct.value;Dt.removeKeyMap(kr)}}catch(Ur){Xe.e(Ur)}finally{Xe.f()}}}},[Dt]),Object(n.useEffect)(function(){Tt!==Ca&&mi(Tt)},[Tt]),Object(it.a)(function(){if(!Ta&&Na>0){var At=new Date().getTime(),kt=window.sessionStorage.getItem(wa);At>=Na+Re&&(!kt||kt!==bn)&&(window.sessionStorage.setItem(wa,bn),Ot(!0))}},Re),Object(n.useEffect)(function(){_i(cn)},[Dt,cn]),Object(n.useEffect)(function(){Dt&&(Cr&&Dt.focus())},[Dt,Cr]),Object(n.useEffect)(function(){if(Gn&&Dt){var At=Dt.getScrollerElement();function kt(Lt){var Qt=Lt.target;if(Xt.current){var gr=Qt.scrollTop/Qt.scrollHeight;Xt.current.scrollTop=Xt.current.scrollHeight*gr}}return At.addEventListener("scroll",kt),function(){At.removeEventListener("scroll",kt)}}},[Dt,Gn]),Object(n.useEffect)(function(){if(Dt&&na){function At(kt,Lt){na(kt,Lt)}return Dt.on("beforeChange",At),function(){Dt.off("beforeChange",At)}}},[Dt,na]),Object(n.useEffect)(function(){if(Dt&&fr){function At(){fr(Dt.getValue())}return Dt.on("blur",At),function(){Dt.off("blur",At)}}},[Dt,fr]),Object(n.useEffect)(function(){if(Dt){function At(kt){var Lt=kt.getValue();Fn(Lt),la(new Date().getTime()),kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pt&&pt(Lt)}return Dt.on("change",At),function(){Dt.off("change",At)}}},[Dt,pt]),Object(n.useEffect)(function(){Dt&&(Wt==null?(Dt.setValue(""),Fn("")):Wt!==Dt.getValue()&&(Dt.setValue(Wt),Fn(Wt),Dt.setCursor(Dt.lineCount(),0)))},[Dt,Wt]);var Vt=Object(n.useCallback)(function(At){var kt=Dt.getCursor(),Lt=Dt.getSelection(),Qt=Lt.split(`
`);switch(At){case"bold":return Dt.replaceSelection("**"+Lt+"**"),Lt===""&&Dt.setCursor(kt.line,kt.ch+2),Dt.focus();case"italic":return Dt.replaceSelection("*"+Lt+"*"),Lt===""&&Dt.setCursor(kt.line,kt.ch+1),Dt.focus();case"code":return Dt.replaceSelection("`"+Lt+"`"),Lt===""&&Dt.setCursor(kt.line,kt.ch+1),Dt.focus();case"inline-latex":return Dt.replaceSelection("`$$"+Lt+"$$`"),Lt===""&&Dt.setCursor(kt.line,kt.ch+3),Dt.focus();case"latex":return Dt.replaceSelection("```latex\n"+Lt+"\n```"),Dt.setCursor(kt.line+1,Lt.length+1),Dt.focus();case"line-break":return Dt.replaceSelection(`<br/>
`),Dt.focus();case"list-ul":return Lt===""?Dt.replaceSelection("- "+Lt):Dt.replaceSelection(Qt.map(function(gr){return gr===""?"":"- ".concat(gr)}).join(`
`)),Dt.focus();case"list-ol":return Lt===""?Dt.replaceSelection("1. "+Lt):Dt.replaceSelection(Qt.map(function(gr,Xe){return gr===""?"":"".concat(Xe+1,". ").concat(gr)}).join(`
`)),Dt.focus();case"add-null-ch":return Lt===""&&Dt.setCursor(kt.line,kt.ch+1),Dt.replaceSelection(pe),Dt.focus();case"inster-template-1":return Lt===""&&Dt.setCursor(kt.line,kt.ch),Dt.replaceSelection(Ee),Dt.focus();case"eraser":return Dt.setValue(""),Dt.focus();case"trigger-watch":return _i(!Gn),Dt.focus();case"trigger-full-screen":return mi(!Ca),Dt.focus();case et:ka(et);return;case st:ka(st);return;case at:ka(at);return;case Me:ka(Me);return;default:throw new Error}},[Dt,Gn,Ca]),Yt=Object(n.useCallback)(function(At){ka("");switch(Ga){case et:var kt=At.title,Lt=At.link;return Dt.replaceSelection("[".concat(kt,"](").concat(Lt,")")),Dt.focus();case st:var Qt=At.language,gr=At.content;return Dt.replaceSelection(["```"+Qt,gr,"```"].join(`
`)),Dt.focus();case at:var Xe=At.src,Ct=At.alt;return Ct?Dt.replaceSelection("![ ".concat(Ct," ]( ").concat(Xe,' "').concat(Ct,'" )')):Dt.replaceSelection("![,](".concat(Xe,")")),Dt.focus();case Me:for(var kr=At.row,Ur=At.col,Nt=At.align,ur=`
`,Bt=0;Bt<kr;Bt++){for(var Et=[],Mt=[],Zt=0;Zt<Ur;Zt++)Bt===1&&Mt.push(Ye[Nt]),Et.push(" ");Bt===1&&(ur+="| ".concat(Mt.join(" | "),` |
`)),ur+="| ".concat(Et.join(Ur===1?"":" | "),` |
`)}return Dt.replaceSelection(ur+`
`),Dt.focus();default:throw new Error}},[Dt,Ga]),Qe=Object(n.useMemo)(function(){switch(Ga){case et:return u.a.createElement(se,{callback:Yt,onCancel:hr});case st:return u.a.createElement(ve.b,{callback:Yt,onCancel:hr});case at:return u.a.createElement(q,{callback:Yt,onCancel:hr});case Me:return u.a.createElement(He,{callback:Yt,onCancel:hr});default:return null}},[Ga]);function hr(){ka("")}Object(n.useEffect)(function(){if(or.current){var At=or.current,kt=!1,Lt=0;function Qt(Ct){kt=!0,Lt=Ct.pageY}function gr(){kt=!1}function Xe(Ct){if(kt){var kr=Ct.pageY-Lt;kr<0&&(kr=0),kr>300&&(kr=300);var Ur=Jr+kr+"px";Ze(Ur)}}return At.addEventListener("mousedown",Qt),document.addEventListener("mousemove",Xe),document.addEventListener("mouseup",gr),function(){At.removeEventListener("mousedown",Qt),document.removeEventListener("mousemove",Xe),document.removeEventListener("mouseup",gr)}}},[Dt,or]),Object(n.useEffect)(function(){Ze(Jr)},[Jr]);var wr=we(Ir),lr=we(mt),$t={width:wr,height:lr},ar=Object(n.useMemo)(function(){if(Na){var At=new Date(Na),kt=At.getHours(),Lt=At.getMinutes(),Qt=At.getSeconds();return kt=kt<10?"0"+kt:kt,Lt=Lt<10?"0"+Lt:Lt,Qt=Qt<10?"0"+Qt:Qt,"".concat(kt,":").concat(Lt,":").concat(Qt)}return 0},[Na]);function Kt(){window.sessionStorage.removeItem(wa),Ot(!1),la(0)}function Jt(){Ot(!1),la(0),Dt.setValue(window.sessionStorage.getItem(wa))}function Ar(At,kt){var Lt=Dt.getValue();Lt=Lt.replace(At,kt),Fn(Lt),Dt==null||Dt.setValue(Lt)}return u.a.createElement(n.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:yt},u.a.createElement("div",{className:"markdown-editor-container ".concat(ya," ").concat(Gn?"on-preview":""," ").concat(Qr?"mini":""," ").concat(Ca?"full-screen":""),style:$t},u.a.createElement(z,{insertTemp:wn,watch:Gn,fullScreen:Ca,showNullButton:Zr,onActionCallback:Vt,hidetoolBar:ga,uuid:tr.current,setOpenPhones:function(){Pt.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:vt,placeholder:Yn})),Gn?u.a.createElement("div",{ref:Xt,className:"preview-container"},sn==="stex"&&u.a.createElement(L,{value:bn}),sn!=="stex"&&u.a.createElement(s.a,{edit:!0,value:bn,replaces:Ar})):null))),sr?u.a.createElement("a",{ref:or,className:"editor-resize"}):null,u.a.createElement(B.a,null,ut[Ga]?u.a.createElement(m.a,{centered:!0,title:ut[Ga],visible:!0,onCancel:hr,footer:null,className:"markdown-popup-form"},Qe):null))}},PVpz:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,d=m.algo,f=[],_=[],c=[],o=d.RabbitLegacy=P.extend({_doReset:function(){var n=this._key.words,u=this.cfg.iv,p=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],h=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var v=0;v<4;v++)i.call(this);for(var v=0;v<8;v++)h[v]^=p[v+4&7];if(u){var g=u.words,E=g[0],a=g[1],l=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,t=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,C=l>>>16|t&4294901760,w=t<<16|l&65535;h[0]^=l,h[1]^=C,h[2]^=t,h[3]^=w,h[4]^=l,h[5]^=C,h[6]^=t,h[7]^=w;for(var v=0;v<4;v++)i.call(this)}},_doProcessBlock:function(n,u){var p=this._X;i.call(this),f[0]=p[0]^p[5]>>>16^p[3]<<16,f[1]=p[2]^p[7]>>>16^p[5]<<16,f[2]=p[4]^p[1]>>>16^p[7]<<16,f[3]=p[6]^p[3]>>>16^p[1]<<16;for(var h=0;h<4;h++)f[h]=(f[h]<<8|f[h]>>>24)&16711935|(f[h]<<24|f[h]>>>8)&4278255360,n[u+h]^=f[h]},blockSize:128/32,ivSize:64/32});function i(){for(var n=this._X,u=this._C,p=0;p<8;p++)_[p]=u[p];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<_[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<_[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<_[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<_[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<_[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<_[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<_[6]>>>0?1:0)|0,this._b=u[7]>>>0<_[7]>>>0?1:0;for(var p=0;p<8;p++){var h=n[p]+u[p],v=h&65535,g=h>>>16,E=((v*v>>>17)+v*g>>>15)+g*g,a=((h&4294901760)*h|0)+((h&65535)*h|0);c[p]=E^a}n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}m.RabbitLegacy=P._createHelper(o)}(),D.RabbitLegacy})},RxwV:function(j,Y,M){"use strict";var D=M("cDcd"),m=M("uciX"),S=M("2W6z"),P=M.n(S),d=M("4IlW"),f=M("uK0f"),_=M.n(f);function c(ve,de){if(ve===de)return!0;if(!ve||!de)return!1;var ne=ve.length;if(de.length!==ne)return!1;for(var ae=0;ae<ne;ae++)if(ve[ae]!==de[ae])return!1;return!0}function o(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(ne){return typeof ne}:o=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},o(ve)}function i(ve,de){if(!(ve instanceof de))throw new TypeError("Cannot call a class as a function")}function n(ve,de){for(var ne=0;ne<de.length;ne++){var ae=de[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(ve,ae.key,ae)}}function u(ve,de,ne){return de&&n(ve.prototype,de),ne&&n(ve,ne),ve}function p(ve,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");ve.prototype=Object.create(de&&de.prototype,{constructor:{value:ve,writable:!0,configurable:!0}}),de&&h(ve,de)}function h(ve,de){return h=Object.setPrototypeOf||function(ae,Z){return ae.__proto__=Z,ae},h(ve,de)}function v(ve){var de=a();return function(){var ne=l(ve),ae;if(de){var Z=l(this).constructor;ae=Reflect.construct(ne,arguments,Z)}else ae=ne.apply(this,arguments);return g(this,ae)}}function g(ve,de){return de&&(o(de)==="object"||typeof de=="function")?de:E(ve)}function E(ve){if(ve===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve}function a(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ve){return!1}}function l(ve){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},l(ve)}var t=function(){var ve=function(de){p(ae,de);var ne=v(ae);function ae(){var Z;return i(this,ae),Z=ne.apply(this,arguments),Z.menuItems={},Z.saveMenuItem=function(le){return function(Q){Z.menuItems[le]=Q}},Z}return u(ae,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(le){!le.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(le){var Q=this.props,q=Q.fieldNames,be=Q.defaultFieldNames;return q[le]||be[le]}},{key:"getOption",value:function(le,Q){var q=this.props,be=q.prefixCls,te=q.expandTrigger,J=q.expandIcon,X=q.loadingIcon,$=this.props.onSelect.bind(this,le,Q),ge=this.props.onItemDoubleClick.bind(this,le,Q),fe={onClick:$,onDoubleClick:ge},_e="".concat(be,"-menu-item"),He=null,$e=le[this.getFieldName("children")]&&le[this.getFieldName("children")].length>0;($e||le.isLeaf===!1)&&(_e+=" ".concat(be,"-menu-item-expand"),le.loading||(He=D.createElement("span",{className:"".concat(be,"-menu-item-expand-icon")},J))),te==="hover"&&($e||le.isLeaf===!1)&&(fe={onMouseEnter:this.delayOnSelect.bind(this,$),onMouseLeave:this.delayOnSelect.bind(this),onClick:$}),this.isActiveOption(le,Q)&&(_e+=" ".concat(be,"-menu-item-active"),fe.ref=this.saveMenuItem(Q)),le.disabled&&(_e+=" ".concat(be,"-menu-item-disabled"));var Ve=null;le.loading&&(_e+=" ".concat(be,"-menu-item-loading"),Ve=X||null);var et="";return"title"in le?et=le.title:typeof le[this.getFieldName("label")]=="string"&&(et=le[this.getFieldName("label")]),D.createElement("li",Object.assign({key:le[this.getFieldName("value")],className:_e,title:et},fe,{role:"menuitem",onMouseDown:function(st){return st.preventDefault()}}),le[this.getFieldName("label")],He,Ve)}},{key:"getActiveOptions",value:function(le){var Q=this,q=this.props.options,be=le||this.props.activeValue;return _()(q,function(te,J){return te[Q.getFieldName("value")]===be[J]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var le=this,Q=this.props.options,q=this.getActiveOptions().map(function(be){return be[le.getFieldName("children")]}).filter(function(be){return!!be});return q.unshift(Q),q}},{key:"delayOnSelect",value:function(le){for(var Q=this,q=arguments.length,be=new Array(q>1?q-1:0),te=1;te<q;te++)be[te-1]=arguments[te];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof le=="function"&&(this.delayTimer=window.setTimeout(function(){le(be),Q.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var le=this.getShowOptions().length,Q=0;Q<le;Q++){var q=this.menuItems[Q];q&&q.parentElement&&(q.parentElement.scrollTop=q.offsetTop)}}},{key:"isActiveOption",value:function(le,Q){var q=this.props.activeValue,be=q===void 0?[]:q;return be[Q]===le[this.getFieldName("value")]}},{key:"render",value:function(){var le=this,Q=this.props,q=Q.prefixCls,be=Q.dropdownMenuColumnStyle;return D.createElement("div",null,this.getShowOptions().map(function(te,J){return D.createElement("ul",{className:"".concat(q,"-menu"),key:J,style:be},te.map(function(X){return le.getOption(X,J)}))}))}}]),ae}(D.Component);return ve.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},ve}(),C=t,w={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},s=w;function L(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(ne){return typeof ne}:L=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},L(ve)}function O(ve,de){if(ve==null)return{};var ne=x(ve,de),ae,Z;if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(ve);for(Z=0;Z<le.length;Z++){if(ae=le[Z],de.indexOf(ae)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ve,ae))continue;ne[ae]=ve[ae]}}return ne}function x(ve,de){if(ve==null)return{};var ne={},ae=Object.keys(ve),Z,le;for(le=0;le<ae.length;le++){if(Z=ae[le],de.indexOf(Z)>=0)continue;ne[Z]=ve[Z]}return ne}function b(ve){return N(ve)||k(ve)||T(ve)||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(ve,de){if(!ve)return;if(typeof ve=="string")return I(ve,de);var ne=Object.prototype.toString.call(ve).slice(8,-1);if(ne==="Object"&&ve.constructor&&(ne=ve.constructor.name),ne==="Map"||ne==="Set")return Array.from(ve);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return I(ve,de)}function k(ve){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(ve))return Array.from(ve)}function N(ve){if(Array.isArray(ve))return I(ve)}function I(ve,de){(de==null||de>ve.length)&&(de=ve.length);for(var ne=0,ae=new Array(de);ne<de;ne++)ae[ne]=ve[ne];return ae}function W(ve,de){if(!(ve instanceof de))throw new TypeError("Cannot call a class as a function")}function K(ve,de){for(var ne=0;ne<de.length;ne++){var ae=de[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(ve,ae.key,ae)}}function U(ve,de,ne){return de&&K(ve.prototype,de),ne&&K(ve,ne),ve}function z(ve,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");ve.prototype=Object.create(de&&de.prototype,{constructor:{value:ve,writable:!0,configurable:!0}}),de&&B(ve,de)}function B(ve,de){return B=Object.setPrototypeOf||function(ae,Z){return ae.__proto__=Z,ae},B(ve,de)}function H(ve){var de=ie();return function(){var ne=ue(ve),ae;if(de){var Z=ue(this).constructor;ae=Reflect.construct(ne,arguments,Z)}else ae=ne.apply(this,arguments);return G(this,ae)}}function G(ve,de){return de&&(L(de)==="object"||typeof de=="function")?de:ee(ve)}function ee(ve){if(ve===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve}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(ve){return!1}}function ue(ve){return ue=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},ue(ve)}var xe=function(){var ve=function(de){z(ae,de);var ne=H(ae);function ae(Z){var le;W(this,ae),le=ne.call(this,Z),le.setPopupVisible=function(q){var be=le.state.value;"popupVisible"in le.props||le.setState({popupVisible:q}),q&&!le.state.popupVisible&&le.setState({activeValue:be}),le.props.onPopupVisibleChange(q)},le.handleChange=function(q,be,te){var J=be.visible;(te.type!=="keydown"||te.keyCode===d.a.ENTER)&&(le.props.onChange(q.map(function(X){return X[le.getFieldName("value")]}),q),le.setPopupVisible(J))},le.handlePopupVisibleChange=function(q){le.setPopupVisible(q)},le.handleMenuSelect=function(q,be,te){var J=le.trigger.getRootDomNode();J&&J.focus&&J.focus();var X=le.props,$=X.changeOnSelect,ge=X.loadData,fe=X.expandTrigger;if(!q||q.disabled)return;var _e=le.state.activeValue;_e=_e.slice(0,be+1),_e[be]=q[le.getFieldName("value")];var He=le.getActiveOptions(_e);if(q.isLeaf===!1&&!q[le.getFieldName("children")]&&ge){$&&le.handleChange(He,{visible:!0},te),le.setState({activeValue:_e}),ge(He);return}var $e={};!q[le.getFieldName("children")]||!q[le.getFieldName("children")].length?(le.handleChange(He,{visible:!1},te),$e.value=_e):$&&(te.type==="click"||te.type==="keydown")&&(fe==="hover"?le.handleChange(He,{visible:!1},te):le.handleChange(He,{visible:!0},te),$e.value=_e),$e.activeValue=_e,("value"in le.props||te.type==="keydown"&&te.keyCode!==d.a.ENTER)&&delete $e.value,le.setState($e)},le.handleItemDoubleClick=function(){var q=le.props.changeOnSelect;q&&le.setPopupVisible(!1)},le.handleKeyDown=function(q){var be=le.props.children;if(be&&be.props.onKeyDown){be.props.onKeyDown(q);return}var te=b(le.state.activeValue),J=te.length-1<0?0:te.length-1,X=le.getCurrentLevelOptions(),$=X.map(function(He){return He[le.getFieldName("value")]}).indexOf(te[J]);if(q.keyCode!==d.a.DOWN&&q.keyCode!==d.a.UP&&q.keyCode!==d.a.LEFT&&q.keyCode!==d.a.RIGHT&&q.keyCode!==d.a.ENTER&&q.keyCode!==d.a.SPACE&&q.keyCode!==d.a.BACKSPACE&&q.keyCode!==d.a.ESC&&q.keyCode!==d.a.TAB)return;if(!le.state.popupVisible&&q.keyCode!==d.a.BACKSPACE&&q.keyCode!==d.a.LEFT&&q.keyCode!==d.a.RIGHT&&q.keyCode!==d.a.ESC&&q.keyCode!==d.a.TAB){le.setPopupVisible(!0);return}if(q.keyCode===d.a.DOWN||q.keyCode===d.a.UP){q.preventDefault();var ge=$;ge!==-1?q.keyCode===d.a.DOWN?(ge+=1,ge=ge>=X.length?0:ge):(ge-=1,ge=ge<0?X.length-1:ge):ge=0,te[J]=X[ge][le.getFieldName("value")]}else if(q.keyCode===d.a.LEFT||q.keyCode===d.a.BACKSPACE)q.preventDefault(),te.splice(te.length-1,1);else if(q.keyCode===d.a.RIGHT)q.preventDefault(),X[$]&&X[$][le.getFieldName("children")]&&te.push(X[$][le.getFieldName("children")][0][le.getFieldName("value")]);else if(q.keyCode===d.a.ESC||q.keyCode===d.a.TAB){le.setPopupVisible(!1);return}(!te||te.length===0)&&le.setPopupVisible(!1);var fe=le.getActiveOptions(te),_e=fe[fe.length-1];le.handleMenuSelect(_e,fe.length-1,q),le.props.onKeyDown&&le.props.onKeyDown(q)},le.saveTrigger=function(q){le.trigger=q};var Q=[];return"value"in Z?Q=Z.value||[]:"defaultValue"in Z&&(Q=Z.defaultValue||[]),P()(!("filedNames"in Z),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),le.state={popupVisible:Z.popupVisible,activeValue:Q,value:Q,prevProps:Z},le.defaultFieldNames={label:"label",value:"value",children:"children"},le}return U(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(le){var Q=this.defaultFieldNames,q=this.props,be=q.fieldNames,te=q.filedNames;return"filedNames"in this.props?te[le]||Q[le]:be[le]||Q[le]}},{key:"getFieldNames",value:function(){var le=this.props,Q=le.fieldNames,q=le.filedNames;return"filedNames"in this.props?q:Q}},{key:"getCurrentLevelOptions",value:function(){var le=this,Q=this.props.options,q=Q===void 0?[]:Q,be=this.state.activeValue,te=be===void 0?[]:be,J=_()(q,function(X,$){return X[le.getFieldName("value")]===te[$]},{childrenKeyName:this.getFieldName("children")});return J[J.length-2]?J[J.length-2][this.getFieldName("children")]:b(q).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(le){var Q=this;return _()(this.props.options||[],function(q,be){return q[Q.getFieldName("value")]===le[be]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var le=this.props,Q=le.prefixCls,q=le.transitionName,be=le.popupClassName,te=le.options,J=te===void 0?[]:te,X=le.disabled,$=le.builtinPlacements,ge=le.popupPlacement,fe=le.children,_e=le.dropdownRender,He=O(le,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),$e=D.createElement("div",null),Ve="";J&&J.length>0?$e=D.createElement(C,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ve=" ".concat(Q,"-menus-empty");var et=$e;return _e&&(et=_e($e)),D.createElement(m.a,Object.assign({ref:this.saveTrigger},He,{popupPlacement:ge,builtinPlacements:$,popupTransitionName:q,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Q,"-menus"),popupClassName:be+Ve,popup:et}),D.cloneElement(fe,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(le,Q){var q=Q.prevProps,be=q===void 0?{}:q,te={prevProps:le};return"value"in le&&!c(be.value,le.value)&&(te.value=le.value||[],"loadData"in le||(te.activeValue=le.value||[])),"popupVisible"in le&&(te.popupVisible=le.popupVisible),te}}]),ae}(D.Component);return ve.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:s,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},ve}(),Te=xe,se=Y.a=Te},S6kV:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.OFB=function(){var m=D.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(P,d){var f=this._cipher,_=f.blockSize,c=this._iv,o=this._keystream;c&&(o=this._keystream=c.slice(0),this._iv=void 0),f.encryptBlock(o,0);for(var i=0;i<_;i++)P[d+i]^=o[i]}});return m.Decryptor=S,m}(),D.mode.OFB})},"SA+Z":function(j,Y,M){var D=M("wTVA"),m=M("EbDI"),S=M("ZhPi"),P=M("wkBT");function d(f){return D(f)||m(f)||S(f)||P()}j.exports=d,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,Y){/**
* @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 M,D,m,S=!1,P,d;window.PR_SHOULD_USE_CONTINUATION=!0;var f,_;(function(){var c=window,o=["break,continue,do,else,for,if,return,while"],i=[o,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[i,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[n,"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"],p=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[n,"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=[n,"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",a=[o,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[o,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[u,h,p,g,E,a,l,t],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,s="str",L="kwd",O="com",x="typ",b="lit",y="pun",T="pln",k="tag",N="dec",I="src",W="atn",K="atv",U="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(te){for(var J=0,X=!1,$=!1,ge=0,fe=te.length;ge<fe;++ge){var _e=te[ge];if(_e.ignoreCase)$=!0;else if(/[a-z]/i.test(_e.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,$=!1;break}}var He={b:8,t:9,n:10,v:11,f:12,r:13};function $e(Me){var Se=Me.charCodeAt(0);if(Se!==92)return Se;var Ye=Me.charAt(1);return Se=He[Ye],Se||("0"<=Ye&&Ye<="7"?parseInt(Me.substring(1),8):Ye==="u"||Ye==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Ve(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Se=String.fromCharCode(Me);return Se==="\\"||Se==="-"||Se==="]"||Se==="^"?"\\"+Se:Se}function et(Me){var Se=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=[],it=Se[0]==="^",Ke=["["];it&&Ke.push("^");for(var qe=it?1:0,ke=Se.length;qe<ke;++qe){var Oe=Se[qe];if(/\\[bdsw]/i.test(Oe))Ke.push(Oe);else{var Re=$e(Oe),pe;qe+2<ke&&Se[qe+1]==="-"?(pe=$e(Se[qe+2]),qe+=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(Ge,nt){return Ge[0]-nt[0]||nt[1]-Ge[1]});for(var Ee=[],we=[],qe=0;qe<Ye.length;++qe){var De=Ye[qe];De[0]<=we[1]+1?we[1]=Math.max(we[1],De[1]):Ee.push(we=De)}for(var qe=0;qe<Ee.length;++qe){var De=Ee[qe];Ke.push(Ve(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&Ke.push("-"),Ke.push(Ve(De[1])))}return Ke.push("]"),Ke.join("")}function at(Me){for(var Se=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=Se.length,it=[],Ke=0,qe=0;Ke<Ye;++Ke){var ke=Se[Ke];if(ke==="(")++qe;else if(ke.charAt(0)==="\\"){var Oe=+ke.substring(1);Oe&&(Oe<=qe?it[Oe]=-1:Se[Ke]=Ve(Oe))}}for(var Ke=1;Ke<it.length;++Ke)it[Ke]===-1&&(it[Ke]=++J);for(var Ke=0,qe=0;Ke<Ye;++Ke){var ke=Se[Ke];if(ke==="(")++qe,it[qe]||(Se[Ke]="(?:");else if(ke.charAt(0)==="\\"){var Oe=+ke.substring(1);Oe&&Oe<=qe&&(Se[Ke]="\\"+it[Oe])}}for(var Ke=0;Ke<Ye;++Ke)Se[Ke]==="^"&&Se[Ke+1]!=="^"&&(Se[Ke]="");if(Me.ignoreCase&&X)for(var Ke=0;Ke<Ye;++Ke){var ke=Se[Ke],Re=ke.charAt(0);ke.length>=2&&Re==="["?Se[Ke]=et(ke):Re!=="\\"&&(Se[Ke]=ke.replace(/[a-zA-Z]/g,function(we){var De=we.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Se.join("")}for(var st=[],ge=0,fe=te.length;ge<fe;++ge){var _e=te[ge];if(_e.global||_e.multiline)throw new Error(""+_e);st.push("(?:"+at(_e)+")")}return new RegExp(st.join("|"),$?"gi":"g")}function H(te,J){var X=/(?:^|\s)nocode(?:\s|$)/,$=[],ge=0,fe=[],_e=0;function He($e){var Ve=$e.nodeType;if(Ve==1){if(X.test($e.className))return;for(var et=$e.firstChild;et;et=et.nextSibling)He(et);var at=$e.nodeName.toLowerCase();(at==="br"||at==="li")&&($[_e]=`
`,fe[_e<<1]=ge++,fe[_e++<<1|1]=$e)}else if(Ve==3||Ve==4){var st=$e.nodeValue;st.length&&(J?st=st.replace(/\r\n?/g,`
`):st=st.replace(/[ \t\r\n]+/g," "),$[_e]=st,fe[_e<<1]=ge,ge+=st.length,fe[_e++<<1|1]=$e)}}return He(te),{sourceCode:$.join("").replace(/\n$/,""),spans:fe}}function G(te,J,X,$,ge){if(!X)return;var fe={sourceNode:te,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:J,decorations:null};$(fe),ge.push.apply(ge,fe.decorations)}var ee=/\S/;function ie(te){for(var J=void 0,X=te.firstChild;X;X=X.nextSibling){var $=X.nodeType;J=$===1?J?te:X:$===3&&ee.test(X.nodeValue)?te:J}return J===te?void 0:J}function ue(te,J){var X={},$;(function(){for(var _e=te.concat(J),He=[],$e={},Ve=0,et=_e.length;Ve<et;++Ve){var at=_e[Ve],st=at[3];if(st)for(var Me=st.length;--Me>=0;)X[st.charAt(Me)]=at;var Se=at[1],Ye=""+Se;$e.hasOwnProperty(Ye)||(He.push(Se),$e[Ye]=null)}He.push(/[\0-\uffff]/),$=B(He)})();var ge=J.length,fe=function(_e){for(var He=_e.sourceCode,$e=_e.basePos,Ve=_e.sourceNode,et=[$e,T],at=0,st=He.match($)||[],Me={},Se=0,Ye=st.length;Se<Ye;++Se){var it=st[Se],Ke=Me[it],qe=void 0,ke;if(typeof Ke=="string")ke=!1;else{var Oe=X[it.charAt(0)];if(Oe)qe=it.match(Oe[1]),Ke=Oe[0];else{for(var Re=0;Re<ge;++Re)if(Oe=J[Re],qe=it.match(Oe[1]),qe){Ke=Oe[0];break}qe||(Ke=T)}ke=Ke.length>=5&&Ke.substring(0,5)==="lang-",ke&&!(qe&&typeof qe[1]=="string")&&(ke=!1,Ke=I),ke||(Me[it]=Ke)}var pe=at;if(at+=it.length,!ke)et.push($e+pe,Ke);else{var Ee=qe[1],we=it.indexOf(Ee),De=we+Ee.length;qe[2]&&(De=it.length-qe[2].length,we=De-Ee.length);var Ge=Ke.substring(5);G(Ve,$e+pe,it.substring(0,we),fe,et),G(Ve,$e+pe+we,Ee,ae(Ge,Ee),et),G(Ve,$e+pe+De,it.substring(De),fe,et)}}_e.decorations=et};return fe}function xe(te){var J=[],X=[];te.tripleQuotedStrings?J.push([s,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?J.push([s,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([s,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&X.push([s,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=te.hashComments;$&&(te.cStyleComments?($>1?J.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([s,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([O,/^#[^\r\n]*/,null,"#"])),te.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ge=te.regexLiterals;if(ge){var fe=ge>1?"":`
\r`,_e=fe?".":"[\\S\\s]",He="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+He+")")])}var $e=te.types;$e&&X.push([x,$e]);var Ve=(""+te.keywords).replace(/^ | $/g,"");Ve.length&&X.push([L,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([T,/^\s+/,null,` \r
\xA0`]);var et="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(et+="(?!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(et),null]),ue(J,X)}var Te=xe({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function se(te,J,X){for(var $=/(?:^|\s)nocode(?:\s|$)/,ge=/\r\n?|\n/,fe=te.ownerDocument,_e=fe.createElement("li");te.firstChild;)_e.appendChild(te.firstChild);var He=[_e];function $e(Se){var Ye=Se.nodeType;if(Ye==1&&!$.test(Se.className))if(Se.nodeName==="br")Ve(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var it=Se.firstChild;it;it=it.nextSibling)$e(it);else if((Ye==3||Ye==4)&&X){var Ke=Se.nodeValue,qe=Ke.match(ge);if(qe){var ke=Ke.substring(0,qe.index);Se.nodeValue=ke;var Oe=Ke.substring(qe.index+qe[0].length);if(Oe){var Re=Se.parentNode;Re.insertBefore(fe.createTextNode(Oe),Se.nextSibling)}Ve(Se),ke||Se.parentNode.removeChild(Se)}}}function Ve(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function Ye(qe,ke){var Oe=ke?qe.cloneNode(!1):qe,Re=qe.parentNode;if(Re){var pe=Ye(Re,1),Ee=qe.nextSibling;pe.appendChild(Oe);for(var we=Ee;we;we=Ee)Ee=we.nextSibling,pe.appendChild(we)}return Oe}for(var it=Ye(Se.nextSibling,0),Ke;(Ke=it.parentNode)&&Ke.nodeType===1;)it=Ke;He.push(it)}for(var et=0;et<He.length;++et)$e(He[et]);J===(J|0)&&He[0].setAttribute("value",J);var at=fe.createElement("ol");at.className="linenums";for(var st=Math.max(0,J-1|0)||0,et=0,Me=He.length;et<Me;++et)_e=He[et],_e.className="L"+(et+st)%10,_e.firstChild||_e.appendChild(fe.createTextNode("\xA0")),at.appendChild(_e);te.appendChild(at)}function ve(te){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var X=/\n/g,$=te.sourceCode,ge=$.length,fe=0,_e=te.spans,He=_e.length,$e=0,Ve=te.decorations,et=Ve.length,at=0;Ve[et]=ge;var st,Me;for(Me=st=0;Me<et;)Ve[Me]!==Ve[Me+2]?(Ve[st++]=Ve[Me++],Ve[st++]=Ve[Me++]):Me+=2;for(et=st,Me=st=0;Me<et;){for(var Se=Ve[Me],Ye=Ve[Me+1],it=Me+2;it+2<=et&&Ve[it+1]===Ye;)it+=2;Ve[st++]=Se,Ve[st++]=Ye,Me=it}et=Ve.length=st;var Ke=te.sourceNode,qe="";Ke&&(qe=Ke.style.display,Ke.style.display="none");try{for(var ke=null;$e<He;){var Oe=_e[$e],Re=_e[$e+2]||ge,pe=Ve[at+2]||ge,it=Math.min(Re,pe),Ee=_e[$e+1],we;if(Ee.nodeType!==1&&(we=$.substring(fe,it))){J&&(we=we.replace(X,"\r")),Ee.nodeValue=we;var De=Ee.ownerDocument,Ge=De.createElement("span");Ge.className=Ve[at+1];var nt=Ee.parentNode;nt.replaceChild(Ge,Ee),Ge.appendChild(Ee),fe<Re&&(_e[$e+1]=Ee=De.createTextNode($.substring(it,Re)),nt.insertBefore(Ee,Ge.nextSibling))}fe=it,fe>=Re&&($e+=2),fe>=pe&&(at+=2)}}finally{Ke&&(Ke.style.display=qe)}}var de={};function ne(te,J){for(var X=J.length;--X>=0;){var $=J[X];de.hasOwnProperty($)?c.console&&console.warn("cannot override language handler %s",$):de[$]=te}}function ae(te,J){return te&&de.hasOwnProperty(te)||(te=/^\s*</.test(J)?"default-markup":"default-code"),de[te]}ne(Te,["default-code"]),ne(ue([],[[T,/^[^<?]+/],[N,/^<!\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(ue([[T,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[W,/^(?!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(ue([],[[K,/^[\s\S]+/]]),["uq.val"]),ne(xe({keywords:u,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),ne(xe({keywords:"null,true,false"}),["json"]),ne(xe({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),ne(xe({keywords:p,cStyleComments:!0}),["java"]),ne(xe({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ne(xe({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ne(xe({keywords:E,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ne(xe({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ne(xe({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ne(xe({keywords:v,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ne(ue([],[[s,/^[\s\S]+/]]),["regex"]);function Z(te){var J=te.langExtension;try{var X=H(te.sourceNode,te.pre),$=X.sourceCode;te.sourceCode=$,te.spans=X.spans,te.basePos=0,ae(J,$)(te),ve(te)}catch(ge){c.console&&console.log(ge&&ge.stack||ge)}}function le(te,J,X){var $=X||!1,ge=J||null,fe=document.createElement("div");fe.innerHTML="<pre>"+te+"</pre>",fe=fe.firstChild,$&&se(fe,$,!0);var _e={langExtension:ge,numberLines:$,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Z(_e),fe.innerHTML}function Q(te,J){var X=J||document.body,$=X.ownerDocument||document;function ge(Oe){return X.getElementsByTagName(Oe)}for(var fe=[ge("pre"),ge("code"),ge("xmp")],_e=[],He=0;He<fe.length;++He)for(var $e=0,Ve=fe[He].length;$e<Ve;++$e)_e.push(fe[He][$e]);fe=null;var et=Date;et.now||(et={now:function(){return+new Date}});var at=0,st=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Se=/\bprettyprinted\b/,Ye=/pre|xmp/i,it=/^code$/i,Ke=/^(?:pre|code|xmp)$/i,qe={};function ke(){for(var Oe=c.PR_SHOULD_USE_CONTINUATION?et.now()+250:Infinity;at<_e.length&&et.now()<Oe;at++){for(var Re=_e[at],pe=qe,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(Jr,pr,Qr){pe[pr]=Qr});break}}var Ge=Re.className;if((pe!==qe||Me.test(Ge))&&!Se.test(Ge)){for(var nt=!1,lt=Re.parentNode;lt;lt=lt.parentNode){var ut=lt.tagName;if(Ke.test(ut)&&lt.className&&Me.test(lt.className)){nt=!0;break}}if(!nt){Re.className+=" prettyprinted";var Rt=pe.lang;if(!Rt){Rt=Ge.match(st);var tt;!Rt&&(tt=ie(Re))&&it.test(tt.tagName)&&(Rt=tt.className.match(st)),Rt&&(Rt=Rt[1])}var nr;if(Ye.test(Re.tagName))nr=1;else{var Wt=Re.currentStyle,pt=$.defaultView,Rr=Wt?Wt.whiteSpace:pt&&pt.getComputedStyle?pt.getComputedStyle(Re,null).getPropertyValue("white-space"):0;nr=Rr&&Rr.substring(0,3)==="pre"}var Ir=pe.linenums;(Ir=Ir==="true"||+Ir)||(Ir=Ge.match(/\blinenums\b(?::(\d+))?/),Ir=Ir?Ir[1]&&Ir[1].length?+Ir[1]:!0:!1),Ir&&se(Re,Ir,nr);var Lr={langExtension:Rt,sourceNode:Re,numberLines:Ir,pre:nr,sourceCode:null,basePos:null,spans:null,decorations:null};Z(Lr)}}}at<_e.length?c.setTimeout(ke,250):typeof te=="function"&&te()}ke()}var q=c.PR={createSimpleLexer:ue,registerLangHandler:ne,sourceDecorator:xe,PR_ATTRIB_NAME:W,PR_ATTRIB_VALUE:K,PR_COMMENT:O,PR_DECLARATION:N,PR_KEYWORD:L,PR_LITERAL:b,PR_NOCODE:U,PR_PLAIN:T,PR_PUNCTUATION:y,PR_SOURCE:I,PR_STRING:s,PR_TAG:k,PR_TYPE:x,prettyPrintOne:S?c.prettyPrintOne=le:f=le,prettyPrint:_=S?c.prettyPrint=Q:_=Q},be=c.define;typeof be=="function"&&be.amd&&be("google-code-prettify",[],function(){return q})})()},Sjjz:function(j,Y,M){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(j,Y,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("5NDa"),P=M("5rEg"),d=M("miYZ"),f=M("tsqr"),_=M("tJVT"),c=M("cDcd"),o=M.n(c),i=M("4i/N");function n(u){var p=u.isjoin,h=u.setJoin,v=u.JoinTeams,g=Object(c.useState)(""),E=Object(_.a)(g,2),a=E[0],l=E[1];return o.a.createElement(m.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),o.a.createElement(i.a,{onClick:function(){return h(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!a){f.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}v(a)},onCancel:function(){return h(!1)}},o.a.createElement("div",null,o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},o.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",o.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:a,maxLength:60,addonAfter:String(a&&a.length||0)+"/60",onChange:function(C){return l(C.target.value)}}))))}Y.a=n},"VrN/":function(j,Y,M){(function(D,m){j.exports=m()})(this,function(){"use strict";var D=navigator.userAgent,m=navigator.platform,S=/gecko\/\d/i.test(D),P=/MSIE \d/.test(D),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(D),f=/Edge\/(\d+)/.exec(D),_=P||d||f,c=_&&(P?document.documentMode||6:+(f||d)[1]),o=!f&&/WebKit\//.test(D),i=o&&/Qt\/\d+\.\d+/.test(D),n=!f&&/Chrome\//.test(D),u=/Opera\//.test(D),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(D),v=/PhantomJS/.test(D),g=!f&&/AppleWebKit/.test(D)&&/Mobile\/\w+/.test(D),E=/Android/.test(D),a=g||E||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(D),l=g||/Mac/.test(m),t=/\bCrOS\b/.test(D),C=/win/i.test(m),w=u&&D.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(u=!1,o=!0);var s=l&&(i||u&&(w==null||w<12.11)),L=S||_&&c>=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 k(e,r,R,A){var F=T(e,r,R,A);return F.setAttribute("role","presentation"),F}var N;document.createRange?N=function(e,r,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,r),F}:N=function(e,r,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(F){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",r),A};function I(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function W(){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 K(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function U(e,r){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(r)&&(r+=" "+R[A]);return r}var z=function(e){e.select()};g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_&&(z=function(e){try{e.select()}catch(r){}});function B(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function H(e,r,R){r||(r={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!r.hasOwnProperty(A))&&(r[A]=e[A]);return r}function G(e,r,R,A,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var V=A||0,re=F||0;;){var oe=e.indexOf(" ",V);if(oe<0||oe>=r)return re+(r-V);re+=oe-V,re+=R-re%R,V=oe+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=B(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 ue=50,xe={toString:function(){return"CodeMirror.Pass"}},Te={scroll:!1},se={origin:"*mouse"},ve={origin:"+move"};function de(e,r,R){for(var A=0,F=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var re=V-A;if(V==e.length||F+re>=r)return A+Math.min(re,r-F);if(F+=V-A,F+=R-F%R,A=V+1,F>=r)return A}}var ne=[""];function ae(e){for(;ne.length<=e;)ne.push(Z(ne)+" ");return ne[e]}function Z(e){return e[e.length-1]}function le(e,r){for(var R=[],A=0;A<e.length;A++)R[A]=r(e[A],A);return R}function 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 q(){}function be(e,r){var R;return Object.create?R=Object.create(e):(q.prototype=e,R=new q),r&&H(r,R),R}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&J(e)?!0:r.test(e):J(e)}function $(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ge=/[\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 fe(e){return e.charCodeAt(0)>=768&&ge.test(e)}function _e(e,r,R){for(;(R<0?r>0:r<e.length)&&fe(e.charAt(r));)r+=R;return r}function He(e,r,R){for(var A=r>R?-1:1;;){if(r==R)return r;var F=(r+R)/2,V=A<0?Math.ceil(F):Math.floor(F);if(V==r)return e(V)?r:R;e(V)?R=V:r=V+A}}function $e(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,V=0;V<e.length;++V){var re=e[V];(re.from<R&&re.to>r||r==R&&re.to==r)&&(A(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",V),F=!0)}F||A(r,R,"ltr")}var Ve=null;function et(e,r,R){var A;Ve=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:Ve=F),V.from==r&&(V.from!=V.to&&R!="before"?A=F:Ve=F)}return A!=null?A:Ve}var at=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]/,re=/[Lb1n]/,oe=/[1n]/;function ce(me,Ie,Be){this.level=me,this.from=Ie,this.to=Be}return function(me,Ie){var Be=Ie=="ltr"?"L":"R";if(me.length==0||Ie=="ltr"&&!A.test(me))return!1;for(var rt=me.length,Je=[],gt=0;gt<rt;++gt)Je.push(R(me.charCodeAt(gt)));for(var St=0,Ut=Be;St<rt;++St){var qt=Je[St];qt=="m"?Je[St]=Ut:Ut=qt}for(var cr=0,er=Be;cr<rt;++cr){var yr=Je[cr];yr=="1"&&er=="r"?Je[cr]="n":V.test(yr)&&(er=yr,yr=="r"&&(Je[cr]="R"))}for(var Fr=1,Pr=Je[0];Fr<rt-1;++Fr){var nn=Je[Fr];nn=="+"&&Pr=="1"&&Je[Fr+1]=="1"?Je[Fr]="1":nn==","&&Pr==Je[Fr+1]&&(Pr=="1"||Pr=="n")&&(Je[Fr]=Pr),Pr=nn}for(var Pn=0;Pn<rt;++Pn){var ca=Je[Pn];if(ca==",")Je[Pn]="N";else if(ca=="%"){var Wn=void 0;for(Wn=Pn+1;Wn<rt&&Je[Wn]=="%";++Wn);for(var Xa=Pn&&Je[Pn-1]=="!"||Wn<rt&&Je[Wn]=="1"?"1":"N",Ba=Pn;Ba<Wn;++Ba)Je[Ba]=Xa;Pn=Wn-1}}for(var ta=0,Wa=Be;ta<rt;++ta){var va=Je[ta];Wa=="L"&&va=="1"?Je[ta]="L":V.test(va)&&(Wa=va)}for(var sa=0;sa<rt;++sa)if(F.test(Je[sa])){var ra=void 0;for(ra=sa+1;ra<rt&&F.test(Je[ra]);++ra);for(var $n=(sa?Je[sa-1]:Be)=="L",Ha=(ra<rt?Je[ra]:Be)=="L",lo=$n==Ha?$n?"L":"R":Be,Ui=sa;Ui<ra;++Ui)Je[Ui]=lo;sa=ra-1}for(var xa=[],xi,da=0;da<rt;)if(re.test(Je[da])){var ps=da;for(++da;da<rt&&re.test(Je[da]);++da);xa.push(new ce(0,ps,da))}else{var Pi=da,Gi=xa.length,Xi=Ie=="rtl"?1:0;for(++da;da<rt&&Je[da]!="L";++da);for(var La=Pi;La<da;)if(oe.test(Je[La])){Pi<La&&(xa.splice(Gi,0,new ce(1,Pi,La)),Gi+=Xi);var uo=La;for(++La;La<da&&oe.test(Je[La]);++La);xa.splice(Gi,0,new ce(2,uo,La)),Gi+=Xi,Pi=La}else++La;Pi<da&&xa.splice(Gi,0,new ce(1,Pi,da))}return Ie=="ltr"&&(xa[0].level==1&&(xi=me.match(/^\s+/))&&(xa[0].from=xi[0].length,xa.unshift(new ce(0,0,xi[0].length))),Z(xa).level==1&&(xi=me.match(/\s+$/))&&(Z(xa).to-=xi[0].length,xa.push(new ce(0,rt-xi[0].length,rt)))),Ie=="rtl"?xa.reverse():xa}}();function st(e,r){var R=e.order;return R==null&&(R=e.order=at(e.text,r)),R}var Me=[],Se=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 it(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 Ke(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 qe(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ke(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){Se(this,r,R)},e.prototype.off=function(r,R){it(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 Ge(e){return e.target||e.srcElement}function nt(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),l&&e.ctrlKey&&r==1&&(r=3),r}var lt=function(){if(_&&c<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),ut;function Rt(e){if(ut==null){var r=T("span","\u200B");y(e,T("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ut=r.offsetWidth<=1&&r.offsetHeight>2&&!(_&&c<8))}var R=ut?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var tt;function nr(e){if(tt!=null)return tt;var r=y(e,document.createTextNode("A\u062EA")),R=N(r,0,1).getBoundingClientRect(),A=N(r,1,2).getBoundingClientRect();return b(e),!R||R.left==R.right?!1:tt=A.right-R.right<3}var Wt=`
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],A=e.length;r<=A;){var F=e.indexOf(`
`,r);F==-1&&(F=e.length);var V=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),re=V.indexOf("\r");re!=-1?(R.push(V.slice(0,re)),r+=re+1):(R.push(V),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},pt=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},Rr=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ir=null;function Lr(e){if(Ir!=null)return Ir;var r=y(e,T("span","x")),R=r.getBoundingClientRect(),A=N(r,0,1).getBoundingClientRect();return Ir=Math.abs(R.left-A.left)>1}var Jr={},pr={};function Qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),Jr[e]=r}function Br(e,r){pr[e]=r}function Cr(e){if(typeof e=="string"&&pr.hasOwnProperty(e))e=pr[e];else if(e&&typeof e.name=="string"&&pr.hasOwnProperty(e.name)){var r=pr[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 Cr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Cr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function cn(e,r){r=Cr(r);var R=Jr[r.name];if(!R)return cn(e,"text/plain");var A=R(e,r);if(wn.hasOwnProperty(r.name)){var F=wn[r.name];for(var V in F){if(!F.hasOwnProperty(V))continue;A.hasOwnProperty(V)&&(A["_"+V]=A[V]),A[V]=F[V]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)A[re]=r.modeProps[re];return A}var wn={};function Hn(e,r){var R=wn.hasOwnProperty(e)?wn[e]:wn[e]={};H(r,R)}function sn(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 _a(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function wa(e,r,R){return e.startState?e.startState(r,R):!0}var mn=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};mn.prototype.eol=function(){return this.pos>=this.string.length},mn.prototype.sol=function(){return this.pos==this.lineStart},mn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},mn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},mn.prototype.eat=function(e){var r=this.string.charAt(this.pos),R;if(typeof e=="string"?R=r==e:R=r&&(e.test?e.test(r):e(r)),R)return++this.pos,r},mn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},mn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},mn.prototype.skipToEnd=function(){this.pos=this.string.length},mn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},mn.prototype.backUp=function(e){this.pos-=e},mn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},mn.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},mn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(re){return R?re.toLowerCase():re},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return r!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&r!==!1&&(this.pos+=V[0].length),V)}},mn.prototype.current=function(){return this.string.slice(this.start,this.pos)},mn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},mn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},mn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function sr(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],V=F.chunkSize();if(r<V){R=F;break}r-=V}return R.lines[r]}function Kn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(V){var re=V.text;F==R.line&&(re=re.slice(0,R.ch)),F==r.line&&(re=re.slice(r.ch)),A.push(re),++F}),A}function Ta(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function jn(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function Zr(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 Ln(e,r){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],V=F.height;if(r<V){e=F;continue e}r-=V,R+=F.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var oe=e.lines[re],ce=oe.height;if(r<ce)break;r-=ce}return R+re}function ga(e,r){return r>=e.first&&r<e.first+e.size}function fa(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function Tt(e,r,R){if(R===void 0&&(R=null),!(this instanceof Tt))return new Tt(e,r,R);this.line=e,this.ch=r,this.sticky=R}function fr(e,r){return e.line-r.line||e.ch-r.ch}function na(e,r){return e.sticky==r.sticky&&fr(e,r)==0}function ha(e){return Tt(e.line,e.ch)}function Sa(e,r){return fr(e,r)<0?r:e}function ya(e,r){return fr(e,r)<0?e:r}function In(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function _r(e,r){if(r.line<e.first)return Tt(e.first,0);var R=e.first+e.size-1;return r.line>R?Tt(R,sr(e,R).text.length):aa(r,sr(e,r.line).text.length)}function aa(e,r){var R=e.ch;return R==null||R>r?Tt(e.line,r):R<0?Tt(e.line,0):e}function Yn(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=_r(e,r[A]);return R}var zn=function(e,r){this.state=e,this.lookAhead=r},On=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};On.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},On.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}},On.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},On.fromSaved=function(e,r,R){return r instanceof zn?new On(e,sn(e.mode,r.state),R,r.lookAhead):new On(e,sn(e.mode,r),R)},On.prototype.save=function(e){var r=e!==!1?sn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(r,this.maxLookAhead):r};function Va(e,r,R,A){var F=[e.state.modeGen],V={};qa(e,r.text,e.doc.mode,R,function(me,Ie){return F.push(me,Ie)},V,A);for(var re=R.state,oe=function(me){R.baseTokens=F;var Ie=e.state.overlays[me],Be=1,rt=0;R.state=!0,qa(e,r.text,Ie.mode,R,function(Je,gt){for(var St=Be;rt<Je;){var Ut=F[Be];Ut>Je&&F.splice(Be,1,Je,F[Be+1],Ut),Be+=2,rt=Math.min(Je,Ut)}if(!gt)return;if(Ie.opaque)F.splice(St,Be-St,Je,"overlay "+gt),Be=St+2;else for(;St<Be;St+=2){var qt=F[St+1];F[St+1]=(qt?qt+" ":"")+"overlay "+gt}},V),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ce=0;ce<e.state.overlays.length;++ce)oe(ce);return{styles:F,classes:V.bgClass||V.textClass?V:null}}function Ma(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=Dt(e,Zr(r)),F=r.text.length>e.options.maxHighlightLength&&sn(e.doc.mode,A.state),V=Va(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 Dt(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new On(A,!0,r);var V=Gn(e,r,R),re=V>A.first&&sr(A,V-1).stateAfter,oe=re?On.fromSaved(A,re,V):new On(A,wa(A.mode),V);return A.iter(V,r,function(ce){Za(e,ce.text,oe);var me=oe.line;ce.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 Za(e,r,R,A){var F=e.doc.mode,V=new mn(r,e.options.tabSize,R);for(V.start=V.pos=A||0,r==""&&oi(F,R.state);!V.eol();)Ia(F,V,R.state),V.start=V.pos}function oi(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=_a(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function Ia(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=_a(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 bn=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function Fn(e,r,R,A){var F=e.doc,V=F.mode,re;r=_r(F,r);var oe=sr(F,r.line),ce=Dt(e,r.line,R),me=new mn(oe.text,e.options.tabSize,ce),Ie;for(A&&(Ie=[]);(A||me.pos<r.ch)&&!me.eol();)me.start=me.pos,re=Ia(V,me,ce.state),A&&Ie.push(new bn(me,re,sn(F.mode,ce.state)));return A?Ie:new bn(me,re,ce.state)}function Ka(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 qa(e,r,R,A,F,V,re){var oe=R.flattenSpans;oe==null&&(oe=e.options.flattenSpans);var ce=0,me=null,Ie=new mn(r,e.options.tabSize,A),Be,rt=e.options.addModeClass&&[null];for(r==""&&Ka(oi(R,A.state),V);!Ie.eol();){if(Ie.pos>e.options.maxHighlightLength?(oe=!1,re&&Za(e,r,A,Ie.pos),Ie.pos=r.length,Be=null):Be=Ka(Ia(R,Ie,A.state,rt),V),rt){var Je=rt[0].name;Je&&(Be="m-"+(Be?Je+" "+Be:Je))}if(!oe||me!=Be){for(;ce<Ie.start;)ce=Math.min(Ie.start,ce+5e3),F(ce,me);me=Be}Ie.start=Ie.pos}for(;ce<Ie.pos;){var gt=Math.min(Ie.pos,ce+5e3);F(gt,me),ce=gt}}function Gn(e,r,R){for(var A,F,V=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),oe=r;oe>re;--oe){if(oe<=V.first)return V.first;var ce=sr(V,oe-1),me=ce.stateAfter;if(me&&(!R||oe+(me instanceof zn?me.lookAhead:0)<=V.modeFrontier))return oe;var Ie=G(ce.text,null,e.options.tabSize);(F==null||A>Ie)&&(F=oe-1,A=Ie)}return F}function _i(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=sr(e,A).stateAfter;if(F&&(!(F instanceof zn)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var ei=!1,qn=!1;function Ca(){ei=!0}function mi(){qn=!0}function za(e,r,R){this.marker=e,this.from=r,this.to=R}function ba(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function Ga(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function ka(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function vi(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,oe=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);if(oe||V.from==r&&re.type=="bookmark"&&(!R||!V.marker.insertLeft)){var ce=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);(A||(A=[])).push(new za(re,V.from,ce?null:V.to))}}return A}function gi(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,oe=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);if(oe||V.from==r&&re.type=="bookmark"&&(!R||V.marker.insertLeft)){var ce=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);(A||(A=[])).push(new za(re,ce?null:V.from-r,V.to==null?null:V.to-r))}}return A}function Na(e,r){if(r.full)return null;var R=ga(e,r.from.line)&&sr(e,r.from.line).markedSpans,A=ga(e,r.to.line)&&sr(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,V=r.to.ch,re=fr(r.from,r.to)==0,oe=vi(R,F,re),ce=gi(A,V,re),me=r.text.length==1,Ie=Z(r.text).length+(me?F:0);if(oe)for(var Be=0;Be<oe.length;++Be){var rt=oe[Be];if(rt.to==null){var Je=ba(ce,rt.marker);Je?me&&(rt.to=Je.to==null?null:Je.to+Ie):rt.to=F}}if(ce)for(var gt=0;gt<ce.length;++gt){var St=ce[gt];if(St.to!=null&&(St.to+=Ie),St.from==null){var Ut=ba(oe,St.marker);Ut||(St.from=Ie,me&&(oe||(oe=[])).push(St))}else St.from+=Ie,me&&(oe||(oe=[])).push(St)}oe&&(oe=la(oe)),ce&&ce!=oe&&(ce=la(ce));var qt=[oe];if(!me){var cr=r.text.length-2,er;if(cr>0&&oe)for(var yr=0;yr<oe.length;++yr)oe[yr].to==null&&(er||(er=[])).push(new za(oe[yr].marker,null,null));for(var Fr=0;Fr<cr;++Fr)qt.push(er);qt.push(ce)}return qt}function la(e){for(var r=0;r<e.length;++r){var R=e[r];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function si(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function(Je){if(Je.markedSpans)for(var gt=0;gt<Je.markedSpans.length;++gt){var St=Je.markedSpans[gt].marker;St.readOnly&&(!A||ie(A,St)==-1)&&(A||(A=[])).push(St)}}),!A)return null;for(var F=[{from:r,to:R}],V=0;V<A.length;++V)for(var re=A[V],oe=re.find(0),ce=0;ce<F.length;++ce){var me=F[ce];if(fr(me.to,oe.from)<0||fr(me.from,oe.to)>0)continue;var Ie=[ce,1],Be=fr(me.from,oe.from),rt=fr(me.to,oe.to);(Be<0||!re.inclusiveLeft&&!Be)&&Ie.push({from:me.from,to:oe.from}),(rt>0||!re.inclusiveRight&&!rt)&&Ie.push({from:oe.to,to:me.to}),F.splice.apply(F,Ie),ce+=Ie.length-3}return F}function li(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 Ze(e){return e.inclusiveLeft?-1:0}function ht(e){return e.inclusiveRight?1:0}function bt(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),V=fr(A.from,F.from)||Ze(e)-Ze(r);if(V)return-V;var re=fr(A.to,F.to)||ht(e)-ht(r);return re||r.id-e.id}function Ht(e,r){var R=qn&&e.markedSpans,A;if(R)for(var F=void 0,V=0;V<R.length;++V)F=R[V],F.marker.collapsed&&(r?F.from:F.to)==null&&(!A||bt(A,F.marker)<0)&&(A=F.marker);return A}function Ot(e){return Ht(e,!0)}function tr(e){return Ht(e,!1)}function Pt(e,r){var R=qn&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var V=R[F];V.marker.collapsed&&(V.from==null||V.from<r)&&(V.to==null||V.to>r)&&(!A||bt(A,V.marker)<0)&&(A=V.marker)}return A}function ct(e,r,R,A,F){var V=sr(e,r),re=qn&&V.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var ce=re[oe];if(!ce.marker.collapsed)continue;var me=ce.marker.find(0),Ie=fr(me.from,R)||Ze(ce.marker)-Ze(F),Be=fr(me.to,A)||ht(ce.marker)-ht(F);if(Ie>=0&&Be<=0||Ie<=0&&Be>=0)continue;if(Ie<=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?fr(me.to,R)>=0:fr(me.to,R)>0)||Ie>=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?fr(me.from,A)<=0:fr(me.from,A)<0))return!0}}function vt(e){for(var r;r=Ot(e);)e=r.find(-1,!0).line;return e}function yt(e){for(var r;r=tr(e);)e=r.find(1,!0).line;return e}function or(e){for(var r,R;r=tr(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Xt(e,r){var R=sr(e,r),A=vt(R);return R==A?r:Zr(A)}function zt(e,r){if(r>e.lastLine())return r;var R=sr(e,r),A;if(!jt(e,R))return r;for(;A=tr(R);)R=A.find(1,!0).line;return Zr(R)+1}function jt(e,r){var R=qn&&r.markedSpans;if(R)for(var A=void 0,F=0;F<R.length;++F){if(A=R[F],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&Vt(e,r,A))return!0}}function Vt(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return Vt(e,A.line,ba(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)&&Vt(e,r,F))return!0}function Yt(e){e=vt(e);for(var r=0,R=e.parent,A=0;A<R.lines.length;++A){var F=R.lines[A];if(F==e)break;r+=F.height}for(var V=R.parent;V;R=V,V=R.parent)for(var re=0;re<V.children.length;++re){var oe=V.children[re];if(oe==R)break;r+=oe.height}return r}function Qe(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=Ot(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=tr(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 hr(e){var r=e.display,R=e.doc;r.maxLine=sr(R,R.first),r.maxLineLength=Qe(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=Qe(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 Zr(this)},Re(wr);function lr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),li(e),mt(e,R);var F=A?A(e):1;F!=e.height&&jn(e,F)}function $t(e){e.parent=null,li(e)}var ar={},Kt={};function Jt(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?Kt:ar;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Ar(e,r){var R=k("span",null,null,o?"padding-right: .1px":null),A={pre:k("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var V=F?r.rest[F-1]:r.line,re=void 0;A.pos=0,A.addToken=kt,nr(e.display.measure)&&(re=st(V,e.doc.direction))&&(A.addToken=Qt(A.addToken,re)),A.map=[];var oe=r!=e.display.externalMeasured&&Zr(V);Xe(V,A,Ma(e,V,oe)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=U(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=U(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Rt(e.display.measure))),F==0?(r.measure.map=A.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(A.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(o){var ce=A.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ke(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=U(A.pre.className,A.textClass||"")),A}function At(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,re){if(!r)return;var oe=e.splitSpaces?Lt(r,e.trailingSpace):r,ce=e.cm.state.specialChars,me=!1,Ie;if(!ce.test(r))e.col+=r.length,Ie=document.createTextNode(oe),e.map.push(e.pos,e.pos+r.length,Ie),_&&c<9&&(me=!0),e.pos+=r.length;else{Ie=document.createDocumentFragment();for(var Be=0;;){ce.lastIndex=Be;var rt=ce.exec(r),Je=rt?rt.index-Be:r.length-Be;if(Je){var gt=document.createTextNode(oe.slice(Be,Be+Je));_&&c<9?Ie.appendChild(T("span",[gt])):Ie.appendChild(gt),e.map.push(e.pos,e.pos+Je,gt),e.col+=Je,e.pos+=Je}if(!rt)break;Be+=Je+1;var St=void 0;if(rt[0]==" "){var Ut=e.cm.options.tabSize,qt=Ut-e.col%Ut;St=Ie.appendChild(T("span",ae(qt),"cm-tab")),St.setAttribute("role","presentation"),St.setAttribute("cm-text"," "),e.col+=qt}else rt[0]=="\r"||rt[0]==`
`?(St=Ie.appendChild(T("span",rt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),St.setAttribute("cm-text",rt[0]),e.col+=1):(St=e.cm.options.specialCharPlaceholder(rt[0]),St.setAttribute("cm-text",rt[0]),_&&c<9?Ie.appendChild(T("span",[St])):Ie.appendChild(St),e.col+=1);e.map.push(e.pos,e.pos+1,St),e.pos++}}if(e.trailingSpace=oe.charCodeAt(r.length-1)==32,R||A||F||me||V||re){var cr=R||"";A&&(cr+=A),F&&(cr+=F);var er=T("span",[Ie],cr,V);if(re)for(var yr in re)re.hasOwnProperty(yr)&&yr!="style"&&yr!="class"&&er.setAttribute(yr,re[yr]);return e.content.appendChild(er)}e.content.appendChild(Ie)}function Lt(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 Qt(e,r){return function(R,A,F,V,re,oe,ce){F=F?F+" cm-force-border":"cm-force-border";for(var me=R.pos,Ie=me+A.length;;){for(var Be=void 0,rt=0;rt<r.length&&!(Be=r[rt],Be.to>me&&Be.from<=me);rt++);if(Be.to>=Ie)return e(R,A,F,V,re,oe,ce);e(R,A.slice(0,Be.to-me),F,V,null,oe,ce),V=null,A=A.slice(Be.to-me),me=Be.to}}}function gr(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 Xe(e,r,R){var A=e.markedSpans,F=e.text,V=0;if(!A){for(var re=1;re<R.length;re+=2)r.addToken(r,F.slice(V,V=R[re]),Jt(R[re+1],r.cm.options));return}for(var oe=F.length,ce=0,me=1,Ie="",Be,rt,Je=0,gt,St,Ut,qt,cr;;){if(Je==ce){gt=St=Ut=rt="",cr=null,qt=null,Je=Infinity;for(var er=[],yr=void 0,Fr=0;Fr<A.length;++Fr){var Pr=A[Fr],nn=Pr.marker;if(nn.type=="bookmark"&&Pr.from==ce&&nn.widgetNode)er.push(nn);else if(Pr.from<=ce&&(Pr.to==null||Pr.to>ce||nn.collapsed&&Pr.to==ce&&Pr.from==ce)){if(Pr.to!=null&&Pr.to!=ce&&Je>Pr.to&&(Je=Pr.to,St=""),nn.className&&(gt+=" "+nn.className),nn.css&&(rt=(rt?rt+";":"")+nn.css),nn.startStyle&&Pr.from==ce&&(Ut+=" "+nn.startStyle),nn.endStyle&&Pr.to==Je&&(yr||(yr=[])).push(nn.endStyle,Pr.to),nn.title&&((cr||(cr={})).title=nn.title),nn.attributes)for(var Pn in nn.attributes)(cr||(cr={}))[Pn]=nn.attributes[Pn];nn.collapsed&&(!qt||bt(qt.marker,nn)<0)&&(qt=Pr)}else Pr.from>ce&&Je>Pr.from&&(Je=Pr.from)}if(yr)for(var ca=0;ca<yr.length;ca+=2)yr[ca+1]==Je&&(St+=" "+yr[ca]);if(!qt||qt.from==ce)for(var Wn=0;Wn<er.length;++Wn)gr(r,0,er[Wn]);if(qt&&(qt.from||0)==ce){if(gr(r,(qt.to==null?oe+1:qt.to)-ce,qt.marker,qt.from==null),qt.to==null)return;qt.to==ce&&(qt=!1)}}if(ce>=oe)break;for(var Xa=Math.min(oe,Je);;){if(Ie){var Ba=ce+Ie.length;if(!qt){var ta=Ba>Xa?Ie.slice(0,Xa-ce):Ie;r.addToken(r,ta,Be?Be+gt:gt,Ut,ce+ta.length==Je?St:"",rt,cr)}if(Ba>=Xa){Ie=Ie.slice(Xa-ce),ce=Xa;break}ce=Ba,Ut=""}Ie=F.slice(V,V=R[me++]),Be=Jt(R[me++],r.cm.options)}}}function Ct(e,r,R){this.line=r,this.rest=or(r),this.size=this.rest?Zr(Z(this.rest))-R+1:1,this.node=this.text=null,this.hidden=jt(e,r)}function kr(e,r,R){for(var A=[],F,V=r;V<R;V=F){var re=new Ct(e.doc,sr(e.doc,V),V);F=V+re.size,A.push(re)}return A}var Ur=null;function Nt(e){Ur?Ur.ops.push(e):e.ownsGroup=Ur={ops:[e],delayedCallbacks:[]}}function ur(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 Bt(e,r){var R=e.ownsGroup;if(!R)return;try{ur(R)}finally{Ur=null,r(R)}}var Et=null;function Mt(e,r){var R=Ye(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;Ur?F=Ur.delayedCallbacks:Et?F=Et:(F=Et=[],setTimeout(Zt,0));for(var V=function(oe){F.push(function(){return R[oe].apply(null,A)})},re=0;re<R.length;++re)V(re)}function Zt(){var e=Et;Et=null;for(var r=0;r<e.length;++r)e[r]()}function Gt(e,r,R,A){for(var F=0;F<r.changes.length;F++){var V=r.changes[F];V=="text"?_t(e,r):V=="gutter"?Gr(e,r,R,A):V=="class"?Er(e,r):V=="widget"&&Vr(e,r,A)}r.changes=null}function dt(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),_&&c<8&&(e.node.style.zIndex=2)),e.node}function ft(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=dt(r);r.background=A.insertBefore(T("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function It(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Ar(e,r)}function _t(e,r){var R=r.text.className,A=It(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,Er(e,r)):R&&(r.text.className=R)}function Er(e,r){ft(e,r),r.line.wrapClass?dt(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 Gr(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=dt(r);r.gutterBackground=T("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var V=r.line.gutterMarkers;if(e.options.lineNumbers||V){var re=dt(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),re.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 ce=0;ce<e.display.gutterSpecs.length;++ce){var me=e.display.gutterSpecs[ce].className,Ie=V.hasOwnProperty(me)&&V[me];Ie&&oe.appendChild(T("div",[Ie],"CodeMirror-gutter-elt","left: "+A.gutterLeft[me]+"px; width: "+A.gutterWidth[me]+"px"))}}}function Vr(e,r,R){r.alignable&&(r.alignable=null);for(var A=O("CodeMirror-linewidget"),F=r.node.firstChild,V=void 0;F;F=V)V=F.nextSibling,A.test(F.className)&&r.node.removeChild(F);Hr(e,r,R)}function br(e,r,R,A){var F=It(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),Er(e,r),Gr(e,r,R,A),Hr(e,r,A),r.node}function Hr(e,r,R){if(Sr(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)Sr(e,r.rest[A],r,R,!1)}function Sr(e,r,R,A,F){if(!r.widgets)return;for(var V=dt(R),re=0,oe=r.widgets;re<oe.length;++re){var ce=oe[re],me=T("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),qr(ce,me,R,A),e.display.input.setUneditable(me),F&&ce.above?V.insertBefore(me,R.gutter||R.text):V.appendChild(me),Mt(ce,"redraw")}}function qr(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 Mr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!I(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+r.display.wrapper.clientWidth+"px;"),y(r.display.measure,T("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function en(e,r){for(var R=Ge(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function Mn(e){return e.lineSpace.offsetTop}function Ae(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fe(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 We(e){return ue-e.display.nativeBarWidth}function Le(e){return e.display.scroller.clientWidth-We(e)-e.display.barWidth}function he(e){return e.display.scroller.clientHeight-We(e)-e.display.barHeight}function Ce(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 re=r.text.firstChild.getClientRects(),oe=0;oe<re.length-1;oe++){var ce=re[oe],me=re[oe+1];Math.abs(ce.bottom-me.bottom)>2&&V.push((ce.bottom+me.top)/2-R.top)}}V.push(R.bottom-R.top)}}function ye(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(Zr(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function Pe(e,r){r=vt(r);var R=Zr(r),A=e.display.externalMeasured=new Ct(e.doc,r,R);A.lineN=R;var F=A.built=Ar(e,A);return A.text=F.pre,y(e.display.lineMeasure,F.pre),A}function je(e,r,R,A){return ze(e,Ne(e,r),R,A)}function Ue(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 Ne(e,r){var R=Zr(r),A=Ue(e,R);A&&!A.text?A=null:A&&A.changes&&(Gt(e,A,R,Rn(e)),e.curOp.forceUpdate=!0),A||(A=Pe(e,r));var F=ye(A,r,R);return{line:r,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function ze(e,r,R,A,F){r.before&&(R=-1);var V=R+(A||""),re;return r.cache.hasOwnProperty(V)?re=r.cache[V]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Ce(e,r.view,r.rect),r.hasHeights=!0),re=Ft(e,r,R,A),re.bogus||(r.cache[V]=re)),{left:re.left,right:re.right,top:F?re.rtop:re.top,bottom:F?re.rbottom:re.bottom}}var ot={left:0,right:0,top:0,bottom:0};function xt(e,r,R){for(var A,F,V,re,oe,ce,me=0;me<e.length;me+=3)if(oe=e[me],ce=e[me+1],r<oe?(F=0,V=1,re="left"):r<ce?(F=r-oe,V=F+1):(me==e.length-3||r==ce&&e[me+3]>r)&&(V=ce-oe,F=V-1,r>=ce&&(re="right")),F!=null){if(A=e[me+2],oe==ce&&R==(A.insertLeft?"left":"right")&&(re=R),R=="left"&&F==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)A=e[(me-=3)+2],re="left";if(R=="right"&&F==ce-oe)for(;me<e.length-3&&e[me+3]==e[me+4]&&!e[me+5].insertLeft;)A=e[(me+=3)+2],re="right";break}return{node:A,start:F,end:V,collapse:re,coverStart:oe,coverEnd:ce}}function wt(e,r){var R=ot;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 Ft(e,r,R,A){var F=xt(r.map,R,A),V=F.node,re=F.start,oe=F.end,ce=F.collapse,me;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;re&&fe(r.line.text.charAt(F.coverStart+re));)--re;for(;F.coverStart+oe<F.coverEnd&&fe(r.line.text.charAt(F.coverStart+oe));)++oe;if(_&&c<9&&re==0&&oe==F.coverEnd-F.coverStart?me=V.parentNode.getBoundingClientRect():me=wt(N(V,re,oe).getClientRects(),A),me.left||me.right||re==0)break;oe=re,re=re-1,ce="right"}_&&c<11&&(me=xr(e.display.measure,me))}else{re>0&&(ce=A="right");var Be;e.options.lineWrapping&&(Be=V.getClientRects()).length>1?me=Be[A=="right"?Be.length-1:0]:me=V.getBoundingClientRect()}if(_&&c<9&&!re&&(!me||!me.left&&!me.right)){var rt=V.parentNode.getClientRects()[0];rt?me={left:rt.left,right:rt.left+Xn(e.display),top:rt.top,bottom:rt.bottom}:me=ot}for(var Je=me.top-r.rect.top,gt=me.bottom-r.rect.top,St=(Je+gt)/2,Ut=r.view.measure.heights,qt=0;qt<Ut.length-1&&!(St<Ut[qt]);qt++);var cr=qt?Ut[qt-1]:0,er=Ut[qt],yr={left:(ce=="right"?me.right:me.left)-r.rect.left,right:(ce=="left"?me.left:me.right)-r.rect.left,top:cr,bottom:er};return!me.left&&!me.right&&(yr.bogus=!0),e.options.singleCursorHeightPerLine||(yr.rtop=Je,yr.rbottom=gt),yr}function xr(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Lr(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 jr(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 Nr(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)jr(e.display.view[r])}function Wr(e){Nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Dr(){return n&&E?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Kr(){return n&&E?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function zr(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Mr(e.widgets[R]));return r}function rn(e,r,R,A,F){if(!F){var V=zr(r);R.top+=V,R.bottom+=V}if(A=="line")return R;A||(A="local");var re=Yt(r);if(A=="local"?re+=Mn(e.display):re-=e.display.viewOffset,A=="page"||A=="window"){var oe=e.display.lineSpace.getBoundingClientRect();re+=oe.top+(A=="window"?0:Kr());var ce=oe.left+(A=="window"?0:Dr());R.left+=ce,R.right+=ce}return R.top+=re,R.bottom+=re,R}function $r(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=Dr(),F-=Kr();else if(R=="local"||!R){var V=e.display.sizer.getBoundingClientRect();A+=V.left,F+=V.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:A-re.left,top:F-re.top}}function vn(e,r,R,A,F){return A||(A=sr(e.doc,r.line)),rn(e,A,je(e,A,r.ch,F),R)}function Yr(e,r,R,A,F,V){A=A||sr(e.doc,r.line),F||(F=Ne(e,A));function re(gt,St){var Ut=ze(e,F,gt,St?"right":"left",V);return St?Ut.left=Ut.right:Ut.right=Ut.left,rn(e,A,Ut,R)}var oe=st(A,e.doc.direction),ce=r.ch,me=r.sticky;if(ce>=A.text.length?(ce=A.text.length,me="before"):ce<=0&&(ce=0,me="after"),!oe)return re(me=="before"?ce-1:ce,me=="before");function Ie(gt,St,Ut){var qt=oe[St],cr=qt.level==1;return re(Ut?gt-1:gt,cr!=Ut)}var Be=et(oe,ce,me),rt=Ve,Je=Ie(ce,Be,me=="before");return rt!=null&&(Je.other=Ie(ce,rt,me!="before")),Je}function Tr(e,r){var R=0;r=_r(e.doc,r),e.options.lineWrapping||(R=Xn(e.display)*r.ch);var A=sr(e.doc,r.line),F=Yt(A)+Mn(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Or(e,r,R,A,F){var V=Tt(e,r,R);return V.xRel=F,A&&(V.outside=A),V}function Xr(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Or(A.first,0,null,-1,-1);var F=Ln(A,R),V=A.first+A.size-1;if(F>V)return Or(A.first+A.size-1,sr(A,V).text.length,null,1,1);r<0&&(r=0);for(var re=sr(A,F);;){var oe=An(e,re,F,r,R),ce=Pt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ce)return oe;var me=ce.find(1);if(me.line==F)return me;re=sr(A,F=me.line)}}function tn(e,r,R,A){A-=zr(r);var F=r.text.length,V=He(function(re){return ze(e,R,re-1).bottom<=A},F,0);return F=He(function(re){return ze(e,R,re).top>A},V,F),{begin:V,end:F}}function mr(e,r,R,A){R||(R=Ne(e,r));var F=rn(e,r,ze(e,R,A),"line").top;return tn(e,r,R,F)}function an(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function An(e,r,R,A,F){F-=Yt(r);var V=Ne(e,r),re=zr(r),oe=0,ce=r.text.length,me=!0,Ie=st(r,e.doc.direction);if(Ie){var Be=(e.options.lineWrapping?En:un)(e,r,R,V,Ie,A,F);me=Be.level!=1,oe=me?Be.from:Be.to-1,ce=me?Be.to:Be.from-1}var rt=null,Je=null,gt=He(function(Fr){var Pr=ze(e,V,Fr);return Pr.top+=re,Pr.bottom+=re,an(Pr,A,F,!1)?(Pr.top<=F&&Pr.left<=A&&(rt=Fr,Je=Pr),!0):!1},oe,ce),St,Ut,qt=!1;if(Je){var cr=A-Je.left<Je.right-A,er=cr==me;gt=rt+(er?0:1),Ut=er?"after":"before",St=cr?Je.left:Je.right}else{!me&&(gt==ce||gt==oe)&&gt++,Ut=gt==0?"after":gt==r.text.length?"before":ze(e,V,gt-(me?1:0)).bottom+re<=F==me?"after":"before";var yr=Yr(e,Tt(R,gt,Ut),"line",r,V);St=yr.left,qt=F<yr.top?-1:F>=yr.bottom?1:0}return gt=_e(r.text,gt,1),Or(R,gt,Ut,qt,A-St)}function un(e,r,R,A,F,V,re){var oe=He(function(Be){var rt=F[Be],Je=rt.level!=1;return an(Yr(e,Tt(R,Je?rt.to:rt.from,Je?"before":"after"),"line",r,A),V,re,!0)},0,F.length-1),ce=F[oe];if(oe>0){var me=ce.level!=1,Ie=Yr(e,Tt(R,me?ce.from:ce.to,me?"after":"before"),"line",r,A);an(Ie,V,re,!0)&&Ie.top>re&&(ce=F[oe-1])}return ce}function En(e,r,R,A,F,V,re){var oe=tn(e,r,A,re),ce=oe.begin,me=oe.end;/\s/.test(r.text.charAt(me-1))&&me--;for(var Ie=null,Be=null,rt=0;rt<F.length;rt++){var Je=F[rt];if(Je.from>=me||Je.to<=ce)continue;var gt=Je.level!=1,St=ze(e,A,gt?Math.min(me,Je.to)-1:Math.max(ce,Je.from)).right,Ut=St<V?V-St+1e9:St-V;(!Ie||Be>Ut)&&(Ie=Je,Be=Ut)}return Ie||(Ie=F[F.length-1]),Ie.from<ce&&(Ie={from:ce,to:Ie.to,level:Ie.level}),Ie.to>me&&(Ie={from:Ie.from,to:me,level:Ie.level}),Ie}var dn;function kn(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 Xn(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 Rn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,V=r.gutters.firstChild,re=0;V;V=V.nextSibling,++re){var oe=e.display.gutterSpecs[re].className;R[oe]=V.offsetLeft+V.clientLeft+F,A[oe]=V.clientWidth}return{fixedPos:ea(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function ea(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ja(e){var r=kn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/Xn(e.display)-3);return function(F){if(jt(e.doc,F))return 0;var V=0;if(F.widgets)for(var re=0;re<F.widgets.length;re++)F.widgets[re].height&&(V+=F.widgets[re].height);return R?V+(Math.ceil(F.text.length/A)||1)*r:V+r}}function ua(e){var r=e.doc,R=ja(e);r.iter(function(A){var F=R(A);F!=A.height&&jn(A,F)})}function Vn(e,r,R,A){var F=e.display;if(!R&&Ge(r).getAttribute("cm-not-content")=="true")return null;var V,re,oe=F.lineSpace.getBoundingClientRect();try{V=r.clientX-oe.left,re=r.clientY-oe.top}catch(Be){return null}var ce=Xr(e,V,re),me;if(A&&ce.xRel>0&&(me=sr(e.doc,ce.line).text).length==ce.ch){var Ie=G(me,me.length,e.options.tabSize)-me.length;ce=Tt(ce.line,Math.max(0,Math.round((V-Fe(e.display).left)/Xn(e.display))-Ie))}return ce}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)qn&&Xt(e.doc,r)<F.viewTo&&Cn(e);else if(R<=F.viewFrom)qn&&zt(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 re=Un(e,r,r,-1);re?(F.view=F.view.slice(0,re.index),F.viewTo=re.lineN):Cn(e)}else{var oe=Un(e,r,r,-1),ce=Un(e,R,R+A,1);oe&&ce?(F.view=F.view.slice(0,oe.index).concat(kr(e,oe.lineN,ce.lineN)).concat(F.view.slice(ce.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 Dn(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 re=V.changes||(V.changes=[]);ie(re,R)==-1&&re.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,re=e.display.view;if(!qn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var oe=e.display.viewFrom,ce=0;ce<F;ce++)oe+=re[ce].size;if(oe!=r){if(A>0){if(F==re.length-1)return null;V=oe+re[F].size-r,F++}else V=oe-r;r+=V,R+=V}for(;Xt(e.doc,R)!=R;){if(F==(A<0?0:re.length-1))return null;R+=A*re[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function pa(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=kr(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=kr(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(kr(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,xn(e,R)))),A.viewTo=R}function $a(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 Oa(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!r&&re==R.sel.primIndex)continue;var oe=R.sel.ranges[re];if(oe.from().line>=e.display.viewTo||oe.to().line<e.display.viewFrom)continue;var ce=oe.empty();(ce||e.options.showCursorWhenSelecting)&&Aa(e,oe.head,F),ce||fn(e,oe,V)}return A}function Aa(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 gn(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(),re=Fe(e.display),oe=re.left,ce=Math.max(A.sizerWidth,Le(e)-A.sizer.offsetLeft)-re.right,me=F.direction=="ltr";function Ie(er,yr,Fr,Pr){yr<0&&(yr=0),yr=Math.round(yr),Pr=Math.round(Pr),V.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+er+`px;
top: `+yr+"px; width: "+(Fr==null?ce-er:Fr)+`px;
height: `+(Pr-yr)+"px"))}function Be(er,yr,Fr){var Pr=sr(F,er),nn=Pr.text.length,Pn,ca;function Wn(ta,Wa){return vn(e,Tt(er,ta),"div",Pr,Wa)}function Xa(ta,Wa,va){var sa=mr(e,Pr,null,ta),ra=Wa=="ltr"==(va=="after")?"left":"right",$n=va=="after"?sa.begin:sa.end-(/\s/.test(Pr.text.charAt(sa.end-1))?2:1);return Wn($n,ra)[ra]}var Ba=st(Pr,F.direction);return $e(Ba,yr||0,Fr==null?nn:Fr,function(ta,Wa,va,sa){var ra=va=="ltr",$n=Wn(ta,ra?"left":"right"),Ha=Wn(Wa-1,ra?"right":"left"),lo=yr==null&&ta==0,Ui=Fr==null&&Wa==nn,xa=sa==0,xi=!Ba||sa==Ba.length-1;if(Ha.top-$n.top<=3){var da=(me?lo:Ui)&&xa,ps=(me?Ui:lo)&&xi,Pi=da?oe:(ra?$n:Ha).left,Gi=ps?ce:(ra?Ha:$n).right;Ie(Pi,$n.top,Gi-Pi,$n.bottom)}else{var Xi,La,uo,ms;ra?(Xi=me&&lo&&xa?oe:$n.left,La=me?ce:Xa(ta,va,"before"),uo=me?oe:Xa(Wa,va,"after"),ms=me&&Ui&&xi?ce:Ha.right):(Xi=me?Xa(ta,va,"before"):oe,La=!me&&lo&&xa?ce:$n.right,uo=!me&&Ui&&xi?oe:Ha.left,ms=me?Xa(Wa,va,"after"):ce),Ie(Xi,$n.top,La-Xi,$n.bottom),$n.bottom<Ha.top&&Ie(oe,$n.bottom,null,Ha.top),Ie(uo,Ha.top,ms-uo,Ha.bottom)}(!Pn||gn($n,Pn)<0)&&(Pn=$n),gn(Ha,Pn)<0&&(Pn=Ha),(!ca||gn($n,ca)<0)&&(ca=$n),gn(Ha,ca)<0&&(ca=Ha)}),{start:Pn,end:ca}}var rt=r.from(),Je=r.to();if(rt.line==Je.line)Be(rt.line,rt.ch,Je.ch);else{var gt=sr(F,rt.line),St=sr(F,Je.line),Ut=vt(gt)==vt(St),qt=Be(rt.line,rt.ch,Ut?gt.text.length+1:null).end,cr=Be(Je.line,Ut?0:null,Je.ch).start;Ut&&(qt.top<cr.top-2?(Ie(qt.right,qt.top,null,qt.bottom),Ie(oe,cr.top,cr.left,cr.bottom)):Ie(qt.right,qt.top,cr.left-qt.right,qt.bottom)),qt.bottom<cr.top&&Ie(oe,qt.bottom,null,cr.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 wi(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||(Ke(e,"focus",e,r),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bn(e)}function ri(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ke(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,re=void 0,oe=0;if(F.hidden)continue;if(_&&c<8){var ce=F.node.offsetTop+F.node.offsetHeight;re=ce-R,R=ce}else{var me=F.node.getBoundingClientRect();re=me.bottom-me.top,!V&&F.text.firstChild&&(oe=F.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ie=F.line.height-re;if((Ie>.005||Ie<-.005)&&(jn(F.line,re),Ti(F.line),F.rest))for(var Be=0;Be<F.rest.length;Be++)Ti(F.rest[Be]);if(oe>e.display.sizerWidth){var rt=Math.ceil(oe/Xn(e.display));rt>e.display.maxLineLength&&(e.display.maxLineLength=rt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function Ti(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-Mn(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,V=Ln(r,A),re=Ln(r,F);if(R&&R.ensure){var oe=R.ensure.from.line,ce=R.ensure.to.line;oe<V?(V=oe,re=Ln(r,Yt(sr(r,oe))+e.wrapper.clientHeight)):Math.min(ce,r.lastLine())>=re&&(V=Ln(r,Yt(sr(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:V,to:Math.max(re,V+1)}}function Wi(e,r){if(qe(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-Mn(e.display))+`px;
height: `+(r.bottom-r.top+We(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?Tt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?Tt(r.line,r.ch+1,"before"):r);for(var V=0;V<5;V++){var re=!1,oe=Yr(e,r),ce=!R||R==r?oe:Yr(e,R);F={left:Math.min(oe.left,ce.left),top:Math.min(oe.top,ce.top)-A,right:Math.max(oe.left,ce.left),bottom:Math.max(oe.bottom,ce.bottom)+A};var me=ni(e,F),Ie=e.doc.scrollTop,Be=e.doc.scrollLeft;if(me.scrollTop!=null&&(ii(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(re=!0)),me.scrollLeft!=null&&(Fa(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-Be)>1&&(re=!0)),!re)break}return F}function Ii(e,r){var R=ni(e,r);R.scrollTop!=null&&ii(e,R.scrollTop),R.scrollLeft!=null&&Fa(e,R.scrollLeft)}function ni(e,r){var R=e.display,A=kn(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),re={};r.bottom-r.top>V&&(r.bottom=r.top+V);var oe=e.doc.height+Ae(R),ce=r.top<A,me=r.bottom>oe-A;if(r.top<F)re.scrollTop=ce?0:r.top;else if(r.bottom>F+V){var Ie=Math.min(r.top,(me?oe:r.bottom)-V);Ie!=F&&(re.scrollTop=Ie)}var Be=e.options.fixedGutter?0:R.gutters.offsetWidth,rt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Be,Je=Le(e)-R.gutters.offsetWidth,gt=r.right-r.left>Je;return gt&&(r.right=r.left+Je),r.left<10?re.scrollLeft=0:r.left<rt?re.scrollLeft=Math.max(0,r.left+Be-(gt?0:10)):r.right>Je+rt-3&&(re.scrollLeft=r.right+(gt?0:10)-Je),re}function Si(e,r){if(r==null)return;bi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function yi(e){bi(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)&&bi(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){bi(e),e.curOp.scrollToPos=r}function bi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=Tr(e,r.from),A=Tr(e,r.to);Ci(e,R,A,r.margin)}}function Ci(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;S||Ki(e,{top:r}),ui(e,r,!0),S&&Ki(e),Hi(e,100)}function ui(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 Fa(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,ln(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Ya(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+We(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var dr=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),Se(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),Se(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&c<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dr.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}},dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dr.prototype.zeroWidthHack=function(){var e=l&&!h?"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},dr.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)},dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var vr=function(){};vr.prototype.update=function(){return{bottom:0,right:0}},vr.prototype.setScrollLeft=function(){},vr.prototype.setScrollTop=function(){},vr.prototype.clear=function(){};function rr(e,r){r||(r=Ya(e));var R=e.display.barWidth,A=e.display.barHeight;on(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),on(e,Ya(e)),R=e.display.barWidth,A=e.display.barHeight}function on(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 ir={native:dr,null:vr};function ci(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ir[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Se(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"?Fa(e,r):ii(e,r)},e),e.display.scrollbars.addClass&&K(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},Nt(e.curOp)}function Oi(e){var r=e.curOp;r&&Bt(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 re=0;re<r.length;re++)qo(r[re])}function Jo(e){var r=e.cm,R=r.display;Po(r),e.updateMaxLine&&hr(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 Ja(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Ai(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&Li(r),e.barMeasure=Ya(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=je(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+We(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&&Fa(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==W();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&rr(r,e.barMeasure),e.updatedDisplay&&yn(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&&ui(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Fa(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=Vi(r,_r(A,e.scrollToPos.from),_r(A,e.scrollToPos.to),e.scrollToPos.margin);Wi(r,F)}var V=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(V)for(var oe=0;oe<V.length;++oe)V[oe].lines.length||Ke(V[oe],"hide");if(re)for(var ce=0;ce<re.length;++ce)re[ce].lines.length&&Ke(re[ce],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ke(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ra(e,r){if(e.curOp)return r();Tn(e);try{return r()}finally{Oi(e)}}function Jn(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Tn(e);try{return r.apply(e,arguments)}finally{Oi(e)}}}function ma(e){return function(){if(this.curOp)return e.apply(this,arguments);Tn(this);try{return e.apply(this,arguments)}finally{Oi(this)}}}function Qn(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{Oi(r)}}}function Hi(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,B(es,e))}function es(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Dt(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(V){if(A.line>=e.display.viewFrom){var re=V.styles,oe=V.text.length>e.options.maxHighlightLength?sn(r.mode,A.state):null,ce=Va(e,V,A,!0);oe&&(A.state=oe),V.styles=ce.styles;var me=V.styleClasses,Ie=ce.classes;Ie?V.styleClasses=Ie:me&&(V.styleClasses=null);for(var Be=!re||re.length!=V.styles.length||me!=Ie&&(!me||!Ie||me.bgClass!=Ie.bgClass||me.textClass!=Ie.textClass),rt=0;!Be&&rt<re.length;++rt)Be=re[rt]!=V.styles[rt];Be&&F.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&Za(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&&Ra(e,function(){for(var V=0;V<F.length;V++)Dn(e,F[V],"text")})}var Ja=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=Rn(e),this.events=[]};Ja.prototype.signal=function(e,r){Oe(e,r)&&this.events.push(arguments)},Ja.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ke.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=We(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=We(e)+"px",r.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var r=W();if(!r||!I(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&I(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Mo(e){if(!e||!e.activeElt||e.activeElt==W())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode)){var r=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),r.removeAllRanges(),r.addRange(R),r.extend(e.focusNode,e.focusOffset)}}function Ai(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&&$a(e)==0)return!1;ia(e)&&(Cn(e),r.dims=Rn(e));var F=A.first+A.size,V=Math.max(r.visible.from-e.options.viewportMargin,A.first),re=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFrom<V&&V-R.viewFrom<20&&(V=Math.max(A.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(F,R.viewTo)),qn&&(V=Xt(e.doc,V),re=zt(e.doc,re));var oe=V!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;pa(e,V,re),R.viewOffset=Yt(sr(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=$a(e);if(!oe&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var me=Lo(e);return ce>4&&(R.lineDiv.style.display="none"),Io(e,R.updateLineNumbers,r.dims),ce>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(!Ai(e,r))break;Li(e);var F=Ya(e);hn(e),rr(e,F),yn(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 Ja(e,r);if(Ai(e,R)){Li(e),Yi(e,R);var A=Ya(e);hn(e),rr(e,A),yn(e,A),R.finish()}}function Io(e,r,R){var A=e.display,F=e.options.lineNumbers,V=A.lineDiv,re=V.firstChild;function oe(gt){var St=gt.nextSibling;return o&&l&&e.display.currentWheelTarget==gt?gt.style.display="none":gt.parentNode.removeChild(gt),St}for(var ce=A.view,me=A.viewFrom,Ie=0;Ie<ce.length;Ie++){var Be=ce[Ie];if(!Be.hidden)if(!Be.node||Be.node.parentNode!=V){var rt=br(e,Be,me,R);V.insertBefore(rt,re)}else{for(;re!=Be.node;)re=oe(re);var Je=F&&r!=null&&r<=me&&Be.lineNumber;Be.changes&&(ie(Be.changes,"gutter")>-1&&(Je=!1),Gt(e,Be,me,R)),Je&&(b(Be.lineNumber),Be.lineNumber.appendChild(document.createTextNode(fa(e.options,me)))),re=Be.node.nextSibling}me+=Be.size}for(;re;)re=oe(re)}function Ji(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function yn(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+We(e)+"px"}function ln(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=ea(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,V=A+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=V),R[re].gutterBackground&&(R[re].gutterBackground.style.left=V));var oe=R[re].alignable;if(oe)for(var ce=0;ce<oe.length;ce++)oe[ce].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,re=F.offsetWidth-V;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(V,A.lineGutter.offsetWidth-re)+1,A.lineNumWidth=A.lineNumInnerWidth+re,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ji(e.display),!0}return!1}function Da(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var V=e[F],re=null;if(typeof V!="string"&&(re=V.style,V=V.className),V=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:V,style:re})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function 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,re=F.style,oe=r.appendChild(T("div",null,"CodeMirror-gutter "+V));re&&(oe.style.cssText=re),V=="CodeMirror-linenumbers"&&(e.lineGutter=oe,oe.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ji(e)}function di(e){ki(e.display),_n(e),ln(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=k("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=k("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var V=k("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: "+ue+"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"),_&&c<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!o&&!(S&&a)&&(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=Da(A.gutters,A.lineNumbers),ki(F),R.init(F)}var Ei=0,oa=null;_?oa=-.53:S?oa=15:n?oa=-.7:p&&(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,re=V.scroller,oe=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(A&&oe||F&&ce))return;if(F&&l&&o){e:for(var me=r.target,Ie=V.view;me!=re;me=me.parentNode)for(var Be=0;Be<Ie.length;Be++)if(Ie[Be].node==me){e.display.currentWheelTarget=me;break e}}if(A&&!S&&!u&&oa!=null){F&&ce&&ii(e,Math.max(0,re.scrollTop+F*oa)),Fa(e,Math.max(0,re.scrollLeft+A*oa)),(!F||F&&ce)&&pe(r),V.wheelStartX=null;return}if(F&&oa!=null){var rt=F*oa,Je=e.doc.scrollTop,gt=Je+V.wrapper.clientHeight;rt<0?Je=Math.max(0,Je+rt-50):gt=Math.min(e.doc.height,gt+rt+50),Ki(e,{top:Je,bottom:gt})}Ei<20&&(V.wheelStartX==null?(V.wheelStartX=re.scrollLeft,V.wheelStartY=re.scrollTop,V.wheelDX=A,V.wheelDY=F,setTimeout(function(){if(V.wheelStartX==null)return;var St=re.scrollLeft-V.wheelStartX,Ut=re.scrollTop-V.wheelStartY,qt=Ut&&V.wheelDY&&Ut/V.wheelDY||St&&V.wheelDX&&St/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!qt)return;oa=(oa*Ei+qt)/(Ei+1),++Ei},200)):(V.wheelDX+=A,V.wheelDY+=F))}var Pa=function(e,r){this.ranges=e,this.primIndex=r};Pa.prototype.primary=function(){return this.ranges[this.primIndex]},Pa.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(!na(R.anchor,A.anchor)||!na(R.head,A.head))return!1}return!0},Pa.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new pn(ha(this.ranges[r].anchor),ha(this.ranges[r].head));return new Pa(e,this.primIndex)},Pa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pa.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(fr(r,A.from())>=0&&fr(e,A.to())<=0)return R}return-1};var pn=function(e,r){this.anchor=e,this.head=r};pn.prototype.from=function(){return ya(this.anchor,this.head)},pn.prototype.to=function(){return Sa(this.anchor,this.head)},pn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qa(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(rt,Je){return fr(rt.from(),Je.from())}),R=ie(r,F);for(var V=1;V<r.length;V++){var re=r[V],oe=r[V-1],ce=fr(oe.to(),re.from());if(A&&!re.empty()?ce>0:ce>=0){var me=ya(oe.from(),re.from()),Ie=Sa(oe.to(),re.to()),Be=oe.empty()?re.from()==re.head:oe.from()==oe.head;V<=R&&--R,r.splice(--V,2,new pn(Be?Ie:me,Be?me:Ie))}}return new Pa(r,R)}function fi(e,r){return new Pa([new pn(e,r||e)],0)}function hi(e){return e.text?Tt(e.from.line+e.text.length-1,Z(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(fr(e,r.from)<0)return e;if(fr(e,r.to)<=0)return hi(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+=hi(r).ch-r.to.ch),Tt(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 Qa(e.cm,R,e.sel.primIndex)}function ko(e,r,R){return e.line==r.line?Tt(R.line,e.ch-r.ch+R.ch):Tt(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=Tt(e.first,0),V=F,re=0;re<r.length;re++){var oe=r[re],ce=ko(oe.from,F,V),me=ko(hi(oe),F,V);if(F=oe.to,V=me,R=="around"){var Ie=e.sel.ranges[re],Be=fr(Ie.head,Ie.anchor)<0;A[re]=new pn(Be?me:ce,Be?ce:me)}else A[re]=new pn(ce,ce)}return new Pa(A,e.sel.primIndex)}function Ri(e){e.doc.mode=cn(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&&Z(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,r,R,A){function F(cr){return R?R[cr]:null}function V(cr,er,yr){lr(cr,er,yr,A),Mt(cr,"change",cr,r)}function re(cr,er){for(var yr=[],Fr=cr;Fr<er;++Fr)yr.push(new wr(me[Fr],F(Fr),A));return yr}var oe=r.from,ce=r.to,me=r.text,Ie=sr(e,oe.line),Be=sr(e,ce.line),rt=Z(me),Je=F(me.length-1),gt=ce.line-oe.line;if(r.full)e.insert(0,re(0,me.length)),e.remove(me.length,e.size-me.length);else if(vs(e,r)){var St=re(0,me.length-1);V(Be,Be.text,Je),gt&&e.remove(oe.line,gt),St.length&&e.insert(oe.line,St)}else if(Ie==Be)if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+rt+Ie.text.slice(ce.ch),Je);else{var Ut=re(1,me.length-1);Ut.push(new wr(rt+Ie.text.slice(ce.ch),Je,A)),V(Ie,Ie.text.slice(0,oe.ch)+me[0],F(0)),e.insert(oe.line+1,Ut)}else if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+me[0]+Be.text.slice(ce.ch),F(0)),e.remove(oe.line+1,gt);else{V(Ie,Ie.text.slice(0,oe.ch)+me[0],F(0)),V(Be,rt+Be.text.slice(ce.ch),Je);var qt=re(1,me.length-1);gt>1&&e.remove(oe.line+1,gt-1),e.insert(oe.line+1,qt)}Mt(e,"change",e,r)}function Ni(e,r,R){function A(F,V,re){if(F.linked)for(var oe=0;oe<F.linked.length;++oe){var ce=F.linked[oe];if(ce.doc==V)continue;var me=re&&ce.sharedHist;if(R&&!me)continue;r(ce.doc,me),A(ce.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),Ri(e),ys(e),e.options.lineWrapping||hr(e),e.options.mode=r.modeOption,_n(e)}function ys(e){(e.doc.direction=="rtl"?K:x)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ra(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:ha(r.from),to:hi(r),text:Kn(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=Z(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),Z(e.done);if(e.done.length&&!Z(e.done).ranges)return Z(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Z(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var V=+new Date,re,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)=="*"))&&(re=ml(F,F.lastOp==A)))oe=Z(re.changes),fr(r.from,r.to)==0&&fr(r.from,oe.to)==0?oe.to=hi(r):re.changes.push(rs(e,r));else{var ce=Z(F.done);for((!ce||!ce.ranges)&&Fo(e.sel,F.done),re={changes:[rs(e,r)],generation:F.generation},F.done.push(re);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=V,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,oe||Ke(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,Z(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=Z(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],V=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(re){re.markedSpans&&((F||(F=r["spans_"+e.id]={}))[V]=re.markedSpans),++V})}function yl(e){if(!e)return null;for(var r,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?r||(r=e.slice(0,R)):r&&r.push(e[R]);return r?r.length?r:null:e}function bl(e,r){var R=r["spans_"+e.id];if(!R)return null;for(var A=[],F=0;F<r.text.length;++F)A.push(yl(R[F]));return A}function _s(e,r){var R=bl(e,r),A=Na(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var V=R[F],re=A[F];if(V&&re){e:for(var oe=0;oe<re.length;++oe){for(var ce=re[oe],me=0;me<V.length;++me)if(V[me].marker==ce.marker)continue e;V.push(ce)}}else re&&(R[F]=re)}return R}function qi(e,r,R){for(var A=[],F=0;F<e.length;++F){var V=e[F];if(V.ranges){A.push(R?Pa.prototype.deepCopy.call(V):V);continue}var re=V.changes,oe=[];A.push({changes:oe});for(var ce=0;ce<re.length;++ce){var me=re[ce],Ie=void 0;if(oe.push({from:me.from,to:me.to,text:me.text}),r)for(var Be in me)(Ie=Be.match(/^spans_(\d+)$/))&&(ie(r,Number(Ie[1]))>-1&&(Z(oe)[Be]=me[Be],delete me[Be]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var V=fr(r,F)<0;V!=fr(R,F)<0?(F=r,r=R):V!=fr(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)),Ea(e,new Pa([ns(e.sel.primary(),r,R,F)],0),A)}function ws(e,r,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)A[V]=ns(e.sel.ranges[V],r[V],null,F);var re=Qa(e.cm,A,e.sel.primIndex);Ea(e,re,R)}function as(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,Ea(e,Qa(e.cm,F,e.sel.primIndex),A)}function Ts(e,r,R,A){Ea(e,fi(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(_r(e,F[V].anchor),_r(e,F[V].head))},origin:R&&R.origin};return Ke(e,"beforeSelectionChange",e,A),e.cm&&Ke(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=r.ranges?Qa(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=Z(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):Ea(e,r,R)}function Ea(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||(fr(r.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&yi(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)),Mt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,r,R,A){for(var F,V=0;V<r.ranges.length;V++){var re=r.ranges[V],oe=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ce=Wo(e,re.anchor,oe&&oe.anchor,R,A),me=Wo(e,re.head,oe&&oe.head,R,A);(F||ce!=re.anchor||me!=re.head)&&(F||(F=r.ranges.slice(0,V)),F[V]=new pn(ce,me))}return F?Qa(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var V=sr(e,r.line);if(V.markedSpans)for(var re=0;re<V.markedSpans.length;++re){var oe=V.markedSpans[re],ce=oe.marker,me="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ie="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((oe.from==null||(me?oe.from<=r.ch:oe.from<r.ch))&&(oe.to==null||(Ie?oe.to>=r.ch:oe.to>r.ch))){if(F&&(Ke(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(V.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var Be=ce.find(A<0?1:-1),rt=void 0;if((A<0?Ie:me)&&(Be=Rs(e,Be,-A,Be&&Be.line==r.line?V:null)),Be&&Be.line==r.line&&(rt=fr(Be,R))&&(A<0?rt<0:rt>0))return eo(e,Be,r,A,F)}var Je=ce.find(A<0?-1:1);return(A<0?me:Ie)&&(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,re=eo(e,r,R,V,F)||!F&&eo(e,r,R,V,!0)||eo(e,r,R,-V,F)||!F&&eo(e,r,R,-V,!0);return re||(e.cantEdit=!0,Tt(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?_r(e,Tt(r.line-1)):null:R>0&&r.ch==(A||sr(e,r.line)).text.length?r.line<e.first+e.size-1?Tt(r.line+1,0):null:new Tt(r.line,r.ch+R)}function Ds(e){e.setSelection(Tt(e.firstLine(),0),Tt(e.lastLine()),Te)}function Ps(e,r,R){var A={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(F,V,re,oe){F&&(A.from=_r(e,F)),V&&(A.to=_r(e,V)),re&&(A.text=re),oe!==void 0&&(A.origin=oe)}),Ke(e,"beforeChange",e,A),e.cm&&Ke(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 Jn(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=ei&&!R&&si(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]==""&&fr(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,Na(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,Na(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,V,re=e.sel,oe=r=="undo"?F.done:F.undone,ce=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,ce),R&&!V.equals(e.sel)){Ea(e,V,{clearRedo:!1});return}re=V}else if(A){oe.push(V);return}else break;var Ie=[];Fo(re,ce),ce.push({changes:Ie,generation:F.generation}),F.generation=V.generation||++F.maxGeneration;for(var Be=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),rt=function(St){var Ut=V.changes[St];if(Ut.origin=r,Be&&!Ps(e,Ut,!1))return oe.length=0,{};Ie.push(rs(e,Ut));var qt=St?Zi(e,Ut):Z(oe);go(e,Ut,qt,_s(e,Ut)),!St&&e.cm&&e.cm.scrollIntoView({from:Ut.from,to:hi(Ut)});var cr=[];Ni(e,function(er,yr){!yr&&ie(cr,er.history)==-1&&(Ns(er.history,Ut),cr.push(er.history)),go(er,Ut,null,_s(er,Ut))})},Je=V.changes.length-1;Je>=0;--Je){var gt=rt(Je);if(gt)return gt.v}}function Ms(e,r){if(r==0)return;if(e.first+=r,e.sel=new Pa(le(e.sel.ranges,function(F){return new pn(Tt(F.anchor.line+r,F.anchor.ch),Tt(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++)Dn(e.cm,A,"gutter")}}function go(e,r,R,A){if(e.cm&&!e.cm.curOp)return Jn(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:Tt(e.first,0),to:Tt(r.to.line+F,r.to.ch),text:[Z(r.text)],origin:r.origin}}var V=e.lastLine();r.to.line>V&&(r={from:r.from,to:Tt(V,sr(e,V).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Kn(e,r.from,r.to),R||(R=Zi(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,Te),e.cantEdit&&Wo(e,Tt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,V=r.from,re=r.to,oe=!1,ce=V.line;e.options.lineWrapping||(ce=Zr(vt(sr(A,V.line))),A.iter(ce,re.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,ja(e)),e.options.lineWrapping||(A.iter(ce,V.line+r.text.length,function(Je){var gt=Qe(Je);gt>F.maxLineLength&&(F.maxLine=Je,F.maxLineLength=gt,F.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),_i(A,V.line),Hi(e,400);var me=r.text.length-(re.line-V.line)-1;r.full?_n(e):V.line==re.line&&r.text.length==1&&!vs(e.doc,r)?Dn(e,V.line,"text"):_n(e,V.line,re.line+1,me);var Ie=Oe(e,"changes"),Be=Oe(e,"change");if(Be||Ie){var rt={from:V,to:re,text:r.text,removed:r.removed,origin:r.origin};Be&&Mt(e,"change",e,rt),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(rt)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var V;A||(A=R),fr(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],re=!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 ce=0;ce<V.changes.length;++ce){var me=V.changes[ce];if(R<me.from.line)me.from=Tt(me.from.line+A,me.from.ch),me.to=Tt(me.to.line+A,me.to.ch);else if(r<=me.to.line){re=!1;break}}re||(e.splice(0,F+1),F=0)}}function Ns(e,r){var R=r.from.line,A=r.to.line,F=r.text.length-(A-R)-1;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=sr(e,In(e,r)):F=Zr(r),F==null?null:(A(V,F)&&e.cm&&Dn(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,$t(F),Mt(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),re=A.height;if(A.removeInner(e,V),this.height-=re-A.height,F==V&&(this.children.splice(R--,1),A.parent=null),(r-=V)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof 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 re=F.lines.length%25+25,oe=re;oe<F.lines.length;){var ce=new bo(F.lines.slice(oe,oe+=25));F.height-=ce.height,this.children.splice(++A,0,ce),ce.parent=this}F.lines=F.lines.slice(0,re),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new 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 re=Math.min(r,V-e);if(F.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=V}}};var 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=Zr(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=Mr(this);jn(R,Math.max(0,R.height-V)),e&&(Ra(e,function(){js(e,R,-V),Dn(e,A,"widget")}),Mt(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=Mr(this)-r;if(!F)return;jt(this.doc,A)||jn(A,A.height+F),R&&Ra(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Mt(R,"lineWidgetChanged",R,e,Zr(A))})},Re(xo);function js(e,r,R){Yt(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Si(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(re){var oe=re.widgets||(re.widgets=[]);if(F.insertAt==null?oe.push(F):oe.splice(Math.min(oe.length-1,Math.max(0,F.insertAt)),0,F),F.line=re,V&&!jt(e,re)){var ce=Yt(re)<e.scrollTop;jn(re,re.height+Mr(F)),ce&&Si(V,F.height),V.curOp.forceUpdate=!0}return!0}),V&&Mt(V,"lineWidgetAdded",V,F,typeof r=="number"?r:Zr(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&&Mt(this,"clear",R.from,R.to)}for(var A=null,F=null,V=0;V<this.lines.length;++V){var re=this.lines[V],oe=ba(re.markedSpans,this);e&&!this.collapsed?Dn(e,Zr(re),"text"):e&&(oe.to!=null&&(F=Zr(re)),oe.from!=null&&(A=Zr(re))),re.markedSpans=Ga(re.markedSpans,oe),oe.from==null&&this.collapsed&&!jt(this.doc,re)&&e&&jn(re,kn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var me=vt(this.lines[ce]),Ie=Qe(me);Ie>e.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ie,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&&Mt(e,"markerCleared",e,this,A,F),r&&Oi(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],re=ba(V.markedSpans,this);if(re.from!=null&&(R=Tt(r?V:Zr(V),re.from),e==-1))return R;if(re.to!=null&&(A=Tt(r?V:Zr(V),re.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;Ra(A,function(){var F=r.line,V=Zr(r.line),re=Ue(A,V);if(re&&(jr(re),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 ce=Mr(R)-oe;ce&&jn(F,F.height+ce)}Mt(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 Jn(e.cm,no)(e,r,R,A,F);var V=new ji(e,F),re=fr(r,R);if(A&&H(A,V,!1),re>0||re==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=k("span",[V.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(ct(e,r.line,r,R,V)||r.line!=R.line&&ct(e,R.line,r,R,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");mi()}V.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var oe=r.line,ce=e.cm,me;if(e.iter(oe,R.line+1,function(Be){ce&&V.collapsed&&!ce.options.lineWrapping&&vt(Be)==ce.display.maxLine&&(me=!0),V.collapsed&&oe!=r.line&&jn(Be,0),ka(Be,new za(V,oe==r.line?r.ch:null,oe==R.line?R.ch:null)),++oe}),V.collapsed&&e.iter(r.line,R.line+1,function(Be){jt(e,Be)&&jn(Be,0)}),V.clearOnEnter&&Se(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Ca(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Fs,V.atomic=!0),ce){if(me&&(ce.curOp.updateMaxLine=!0),V.collapsed)_n(ce,r.line,R.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=r.line;Ie<=R.line;Ie++)Dn(ce,Ie,"text");V.atomic&&Os(ce.doc),Mt(ce,"markerAdded",ce,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();Mt(this,"clear")},_o.prototype.find=function(e,r){return this.primary.find(e,r)},Re(_o);function wl(e,r,R,A,F){A=H(A),A.shared=!1;var V=[no(e,r,R,A,F)],re=V[0],oe=A.widgetNode;return Ni(e,function(ce){oe&&(A.widgetNode=oe.cloneNode(!0)),V.push(no(ce,_r(ce,r),_r(ce,R),A,F));for(var me=0;me<ce.linked.length;++me)if(ce.linked[me].isParent)return;re=Z(V)}),new _o(V,re)}function Us(e){return e.findMarks(Tt(e.first,0),e.clipPos(Tt(e.lastLine())),function(r){return r.parent})}function Tl(e,r){for(var R=0;R<r.length;R++){var A=r[R],F=A.find(),V=e.clipPos(F.from),re=e.clipPos(F.to);if(fr(V,re)){var oe=no(e,V,re,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(ce){return V.push(ce)});for(var re=0;re<F.markers.length;re++){var oe=F.markers[re];ie(V,oe.doc)==-1&&(oe.parent=null,F.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,Ua=function(e,r,R,A,F){if(!(this instanceof Ua))return new Ua(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=Tt(R,0);this.sel=fi(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}),Ea(this,fi(V),Te)};Ua.prototype=be(Eo.prototype,{constructor:Ua,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=Ta(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Qn(function(e){var r=Tt(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:Tt(R,sr(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),Ea(this,fi(r),Te)}),replaceRange:function(e,r,R,A){r=_r(this,r),R=R?_r(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=Kn(this,_r(this,e),_r(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(ga(this,e))return sr(this,e)},getLineNumber:function(e){return Zr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=sr(this,e)),vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return _r(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:Qn(function(e,r,R){Ts(this,_r(this,typeof e=="number"?Tt(e,r||0):e),null,R)}),setSelection:Qn(function(e,r,R){Ts(this,_r(this,e),_r(this,r||e),R)}),extendSelection:Qn(function(e,r,R){Uo(this,_r(this,e),r&&_r(this,r),R)}),extendSelections:Qn(function(e,r){ws(this,Yn(this,e),r)}),extendSelectionsBy:Qn(function(e,r){var R=le(this.sel.ranges,e);ws(this,Yn(this,R),r)}),setSelections:Qn(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new pn(_r(this,e[F].anchor),_r(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ea(this,Qa(this.cm,A,r),R)}),addSelection:Qn(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new pn(_r(this,e),_r(this,r||e))),Ea(this,Qa(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,A=0;A<r.length;A++){var F=Kn(this,r[A].from(),r[A].to());R=R?R.concat(F):F}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,A=0;A<R.length;A++){var F=Kn(this,R[A].from(),R[A].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[A]=F}return r},replaceSelection:function(e,r,R){for(var A=[],F=0;F<this.sel.ranges.length;F++)A[F]=e;this.replaceSelections(A,r,R||"+input")},replaceSelections:Qn(function(e,r,R){for(var A=[],F=this.sel,V=0;V<F.ranges.length;V++){var re=F.ranges[V];A[V]={from:re.from(),to:re.to(),text:this.splitLines(e[V]),origin:R}}for(var oe=r&&r!="end"&&No(this,A,r),ce=A.length-1;ce>=0;ce--)to(this,A[ce]);oe?Ss(this,oe):this.cm&&yi(this.cm)}),undo:Qn(function(){Ho(this,"undo")}),redo:Qn(function(){Ho(this,"redo")}),undoSelection:Qn(function(){Ho(this,"undo",!0)}),redoSelection:Qn(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:Qn(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:Qn(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(!ga(this,e))return null;if(r=e,e=sr(this,e),!e)return null}else if(r=Zr(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:Qn(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:Qn(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 re=V.match(O(R));if(!re)return!1;var oe=re.index+re[0].length;A[F]=V.slice(0,re.index)+(!re.index||oe==V.length?"":" ")+V.slice(oe)||null}else return!1;return!0})}),addLineWidget:Qn(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,_r(this,e),_r(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=_r(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=_r(this,e);var r=[],R=sr(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=_r(this,e),r=_r(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(V){var re=V.markedSpans;if(re)for(var oe=0;oe<re.length;oe++){var ce=re[oe];!(ce.to!=null&&F==e.line&&e.ch>=ce.to||ce.from==null&&F!=e.line||ce.from!=null&&F==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&A.push(ce.marker.parent||ce.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var A=0;A<R.length;++A)R[A].from!=null&&e.push(R[A].marker)}),e},posFromIndex:function(e){var r,R=this.first,A=this.lineSeparator().length;return this.iter(function(F){var V=F.text.length+A;if(V>e)return r=e,!0;e-=V,++R}),_r(this,Tt(R,r))},indexFromPos:function(e){e=_r(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 Ua(Ta(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 Ua(Ta(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 Nn&&(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):Wt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Qn(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)})}),Ua.prototype.eachLine=Ua.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),qe(r,e)||en(r.display,e))return;pe(e),_&&(Bs=+new Date);var R=Vn(r,e,!0),A=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var F=A.length,V=Array(F),re=0,oe=function(){++re==F&&Jn(r,function(){R=_r(r.doc,R);var Je={from:R,to:R,text:r.doc.splitLines(V.filter(function(gt){return gt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,Je),Ss(r.doc,fi(_r(r.doc,R),_r(r.doc,hi(Je))))})()},ce=function(Je,gt){if(r.options.allowDropFileTypes&&ie(r.options.allowDropFileTypes,Je.type)==-1){oe();return}var St=new FileReader;St.onerror=function(){return oe()},St.onload=function(){var Ut=St.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ut)){oe();return}V[gt]=Ut,oe()},St.readAsText(Je)},me=0;me<A.length;me++)ce(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 Ie=e.dataTransfer.getData("Text");if(Ie){var Be;if(r.state.draggingText&&!r.state.draggingText.copy&&(Be=r.listSelections()),Bo(r.doc,fi(R,R)),Be)for(var rt=0;rt<Be.length;++rt)ro(r.doc,"",Be[rt].anchor,Be[rt].head,"drag");r.replaceSelection(Ie,"around","paste"),r.display.input.focus()}}catch(Je){}}}function Al(e,r){if(_&&(!e.state.draggingText||+new Date-Bs<100)){De(r);return}if(qe(e,r)||en(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!p){var R=T("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),u&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=Vn(e,r);if(!R)return;var A=document.createDocumentFragment();Aa(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;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ll)},100))}),Se(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 Di={};Di.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"},Di.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"},Di.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"},Di.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"]},Di.default=l?Di.macDefault:Di.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,V,re=0;re<r.length-1;re++){var oe=r[re];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=le(R.split(" "),Ml),V=0;V<F.length;V++){var re=void 0,oe=void 0;V==F.length-1?(oe=F.join(" "),re=A):(oe=F.slice(0,V+1).join(" "),re="...");var ce=r[oe];if(!ce)r[oe]=re;else if(ce!=re)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 re=ao(e,r.fallthrough[V],R,A);if(re)return re}}}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),(s?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(s?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,r){if(u&&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"?Di[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&&fr(V.from,Z(A).to)<=0;){var re=A.pop();if(fr(re.from,V.from)<0){V.from=re.from;break}}A.push(V)}Ra(e,function(){for(var oe=A.length-1;oe>=0;oe--)ro(e.doc,"",A[oe].from,A[oe].to,"+delete");yi(e)})}function is(e,r,R){var A=_e(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=is(e,r.ch,R);return A==null?null:new Tt(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var V=st(R,r.doc.direction);if(V){var re=F<0?Z(V):V[0],oe=F<0==(re.level==1),ce=oe?"after":"before",me;if(re.level>0||r.doc.direction=="rtl"){var Ie=Ne(r,R);me=F<0?R.text.length-1:0;var Be=ze(r,Ie,me).top;me=He(function(rt){return ze(r,Ie,rt).top==Be},F<0==(re.level==1)?re.from:re.to-1,me),ce=="before"&&(me=is(R,me,1))}else me=F<0?re.to:re.from;return new Tt(A,me,ce)}}return new Tt(A,F<0?R.text.length:0,F<0?"before":"after")}function kl(e,r,R,A){var F=st(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=et(F,R.ch,R.sticky),re=F[V];if(e.doc.direction=="ltr"&&re.level%2==0&&(A>0?re.to>R.ch:re.from<R.ch))return os(r,R,A);var oe=function(qt,cr){return is(r,qt instanceof Tt?qt.ch:qt,cr)},ce,me=function(qt){return e.options.lineWrapping?(ce=ce||Ne(e,r),mr(e,r,ce,qt)):{begin:0,end:r.text.length}},Ie=me(R.sticky=="before"?oe(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var Be=re.level==1==A<0,rt=oe(R,Be?1:-1);if(rt!=null&&(Be?rt<=re.to&&rt<=Ie.end:rt>=re.from&&rt>=Ie.begin)){var Je=Be?"before":"after";return new Tt(R.line,rt,Je)}}var gt=function(qt,cr,er){for(var yr=function(Pn,ca){return ca?new Tt(R.line,oe(Pn,1),"before"):new Tt(R.line,Pn,"after")};qt>=0&&qt<F.length;qt+=cr){var Fr=F[qt],Pr=cr>0==(Fr.level!=1),nn=Pr?er.begin:oe(er.end,-1);if(Fr.from<=nn&&nn<Fr.to)return yr(nn,Pr);if(nn=Pr?Fr.from:oe(Fr.to,-1),er.begin<=nn&&nn<er.end)return yr(nn,Pr)}},St=gt(V+A,A,Ie);if(St)return St;var Ut=A>0?Ie.end:oe(Ie.begin,-1);return Ut!=null&&!(A>0&&Ut==r.text.length)&&(St=gt(A>0?0:F.length-1,A,me(Ut)),St)?St:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Te)},killLine:function(e){return io(e,function(r){if(r.empty()){var R=sr(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:Tt(r.head.line+1,0)}:{from:r.head,to:Tt(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return io(e,function(r){return{from:Tt(r.from().line,0),to:_r(e.doc,Tt(r.to().line+1,0))}})},delLineLeft:function(e){return io(e,function(r){return{from:Tt(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(Tt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Tt(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")},ve)},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")},ve)},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},ve)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],R=e.listSelections(),A=e.options.tabSize,F=0;F<R.length;F++){var V=R[F].from(),re=G(e.getLine(V.line),V.ch,A);r.push(ae(A-re%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ra(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=sr(e.doc,F.line).text;if(V){if(F.ch==V.length&&(F=new Tt(F.line,F.ch-1)),F.ch>0)F=new Tt(F.line,F.ch+1),e.replaceRange(V.charAt(F.ch-1)+V.charAt(F.ch-2),Tt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var re=sr(e.doc,F.line-1).text;re&&(F=new Tt(F.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),Tt(F.line-1,re.length-1),F,"+transpose"))}}R.push(new pn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Ra(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);yi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,r){var R=sr(e.doc,r),A=vt(R);return A!=R&&(r=Zr(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=sr(e.doc,r),A=yt(R);return A!=R&&(r=Zr(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Vs(e,r.line),A=sr(e.doc,R.line),F=st(A,e.doc.direction);if(!F||F[0].level==0){var V=Math.max(R.ch,A.text.search(/\S/)),re=r.line==R.line&&r.ch<=V&&r.ch;return Tt(R.line,re?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)!=xe}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"&&Mt(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=W(),qe(r,e))return;_&&c<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);u&&(ls=A?R:null,!A&&R==88&&!Rr&&(l?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),S&&!l&&!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;K(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(x(r,"CodeMirror-crosshair"),it(document,"keyup",R),it(document,"mouseover",R))}Se(document,"keyup",R),Se(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),qe(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(en(r.display,e)||qe(r,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(u&&R==ls){ls=null,pe(e);return}if(u&&(!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&&fr(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(qe(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,en(R,e)){o||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=Vn(r,e),F=nt(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):Ge(e)==R.scroller&&pe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(L?r.display.input.onContextMenu(e):wi(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(re){if(typeof re=="string"&&(re=So[re]),!re)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=re(e,R)!=xe}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=l?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(l?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){_?setTimeout(B(Bi,e),0):e.curOp.focus=W();var F=zl(e,R,A),V=e.doc.sel,re;e.options.dragDrop&&lt&&!e.isReadOnly()&&R=="single"&&(re=V.contains(r))>-1&&(fr((re=V.ranges[re]).from(),r)<0||r.xRel>0)&&(fr(re.to(),r)>0||r.xRel<0)?Xl(e,A,r,F):Vl(e,A,r,F)}function Xl(e,r,R,A){var F=e.display,V=!1,re=Jn(e,function(me){o&&(F.scroller.draggable=!1),e.state.draggingText=!1,it(F.wrapper.ownerDocument,"mouseup",re),it(F.wrapper.ownerDocument,"mousemove",oe),it(F.scroller,"dragstart",ce),it(F.scroller,"drop",re),V||(pe(me),A.addNew||Uo(e.doc,R,null,null,A.extend),o&&!p||_&&c==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},ce=function(){return V=!0};o&&(F.scroller.draggable=!0),e.state.draggingText=re,re.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Se(F.wrapper.ownerDocument,"mouseup",re),Se(F.wrapper.ownerDocument,"mousemove",oe),Se(F.scroller,"dragstart",ce),Se(F.scroller,"drop",re),wi(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(Tt(r.line,0),_r(e.doc,Tt(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 re,oe,ce=V.sel,me=ce.ranges;if(A.addNew&&!A.extend?(oe=V.sel.contains(R),oe>-1?re=me[oe]:re=new pn(R,R)):(re=V.sel.primary(),oe=V.sel.primIndex),A.unit=="rectangle")A.addNew||(re=new pn(R,R)),R=Vn(e,r,!0,!0),oe=-1;else{var Ie=rl(e,R,A.unit);A.extend?re=ns(re,Ie.anchor,Ie.head,A.extend):re=Ie}A.addNew?oe==-1?(oe=me.length,Ea(V,Qa(e,me.concat([re]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&A.unit=="char"&&!A.extend?(Ea(V,Qa(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ce=V.sel):as(V,oe,re,se):(oe=0,Ea(V,new Pa([re],0),se),ce=V.sel);var Be=R;function rt(er){if(fr(Be,er)==0)return;if(Be=er,A.unit=="rectangle"){for(var yr=[],Fr=e.options.tabSize,Pr=G(sr(V,R.line).text,R.ch,Fr),nn=G(sr(V,er.line).text,er.ch,Fr),Pn=Math.min(Pr,nn),ca=Math.max(Pr,nn),Wn=Math.min(R.line,er.line),Xa=Math.min(e.lastLine(),Math.max(R.line,er.line));Wn<=Xa;Wn++){var Ba=sr(V,Wn).text,ta=de(Ba,Pn,Fr);Pn==ca?yr.push(new pn(Tt(Wn,ta),Tt(Wn,ta))):Ba.length>ta&&yr.push(new pn(Tt(Wn,ta),Tt(Wn,de(Ba,ca,Fr))))}yr.length||yr.push(new pn(R,R)),Ea(V,Qa(e,ce.ranges.slice(0,oe).concat(yr),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(er)}else{var Wa=re,va=rl(e,er,A.unit),sa=Wa.anchor,ra;fr(va.anchor,sa)>0?(ra=va.head,sa=ya(Wa.from(),va.anchor)):(ra=va.anchor,sa=Sa(Wa.to(),va.head));var $n=ce.ranges.slice(0);$n[oe]=$l(e,new pn(_r(V,sa),ra)),Ea(V,Qa(e,$n,oe),se)}}var Je=F.wrapper.getBoundingClientRect(),gt=0;function St(er){var yr=++gt,Fr=Vn(e,er,!0,A.unit=="rectangle");if(!Fr)return;if(fr(Fr,Be)!=0){e.curOp.focus=W(),rt(Fr);var Pr=Mi(F,V);(Fr.line>=Pr.to||Fr.line<Pr.from)&&setTimeout(Jn(e,function(){gt==yr&&St(er)}),150)}else{var nn=er.clientY<Je.top?-20:er.clientY>Je.bottom?20:0;nn&&setTimeout(Jn(e,function(){if(gt!=yr)return;F.scroller.scrollTop+=nn,St(er)}),50)}}function Ut(er){e.state.selectingText=!1,gt=Infinity,er&&(pe(er),F.input.focus()),it(F.wrapper.ownerDocument,"mousemove",qt),it(F.wrapper.ownerDocument,"mouseup",cr),V.history.lastSelOrigin=null}var qt=Jn(e,function(er){er.buttons===0||!nt(er)?Ut(er):St(er)}),cr=Jn(e,Ut);e.state.selectingText=cr,Se(F.wrapper.ownerDocument,"mousemove",qt),Se(F.wrapper.ownerDocument,"mouseup",cr)}function $l(e,r){var R=r.anchor,A=r.head,F=sr(e.doc,R.line);if(fr(R,A)==0&&R.sticky==A.sticky)return r;var V=st(F);if(!V)return r;var re=et(V,R.ch,R.sticky),oe=V[re];if(oe.from!=R.ch&&oe.to!=R.ch)return r;var ce=re+(oe.from==R.ch==(oe.level!=1)?0:1);if(ce==0||ce==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 Ie=et(V,A.ch,A.sticky),Be=Ie-re||(A.ch-R.ch)*(oe.level==1?-1:1);Ie==ce-1||Ie==ce?me=Be<0:me=Be>0}var rt=V[ce+(me?-1:0)],Je=me==(rt.level==1),gt=Je?rt.from:rt.to,St=Je?"after":"before";return R.ch==gt&&R.sticky==St?r:new pn(new Tt(R.line,gt,St),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(rt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&pe(r);var re=e.display,oe=re.lineDiv.getBoundingClientRect();if(V>oe.bottom||!Oe(e,R))return we(r);V-=oe.top-re.viewOffset;for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var me=re.gutters.childNodes[ce];if(me&&me.getBoundingClientRect().right>=F){var Ie=Ln(e.doc,V),Be=e.display.gutterSpecs[ce];return Ke(e,R,e,Ie,Be.className,r),we(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function al(e,r){if(en(e.display,r)||Yl(e,r))return;if(qe(e,r,"contextmenu"))return;L||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-"),Wr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Xo={};function Jl(e){var r=e.optionHandlers;function R(A,F,V,re){e.defaults[A]=F,V&&(r[A]=re?function(oe,ce,me){me!=oo&&V(oe,ce,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,Ri(A)},!0),R("indentUnit",2,Ri,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),Wr(A),_n(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var V=[],re=A.doc.first;A.doc.iter(function(ce){for(var me=0;;){var Ie=ce.text.indexOf(F,me);if(Ie==-1)break;me=Ie+F.length,V.push(Tt(re,Ie))}re++});for(var oe=V.length-1;oe>=0;oe--)ro(A.doc,F,V[oe],Tt(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",At,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",a?"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",!C),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){il(A),di(A)},!0),R("keyMap","default",function(A,F,V){var re=zo(F),oe=V!=oo&&zo(V);oe&&oe.detach&&oe.detach(A,re),re.attach&&re.attach(A,oe||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Da(F,A.options.lineNumbers),di(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?ea(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return rr(A)},!0),R("scrollbarStyle","native",function(A){ci(A),rr(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=Da(A.options.gutters,F),di(A)},!0),R("firstLineNumber",1,di,!0),R("lineNumberFormatter",function(A){return A},di,!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?Se:it;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?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(x(e.display.wrapper,"CodeMirror-wrap"),hr(e)),ua(e),_n(e),Wr(e),setTimeout(function(){return rr(e)},100)}function Nn(e,r){var R=this;if(!(this instanceof Nn))return new Nn(e,r);this.options=r=r?H(r):{},H(ol,r,!1);var A=r.value;typeof A=="string"?A=new Ua(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Nn.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"),ci(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&&!a&&V.input.focus(),_&&c<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Tn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!a||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ti(R)},20):ri(this);for(var re in Xo)Xo.hasOwnProperty(re)&&Xo[re](this,r[re],oo);ia(this),r.finishInit&&r.finishInit(this);for(var oe=0;oe<ds.length;++oe)ds[oe](this);Oi(this),o&&r.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Nn.defaults=ol,Nn.optionHandlers=Xo;function ql(e){var r=e.display;Se(r.scroller,"mousedown",Jn(e,tl)),_&&c<11?Se(r.scroller,"dblclick",Jn(e,function(ce){if(qe(e,ce))return;var me=Vn(e,ce);if(!me||cs(e,ce)||en(e.display,ce))return;pe(ce);var Ie=e.findWordAt(me);Uo(e.doc,Ie.anchor,Ie.head)})):Se(r.scroller,"dblclick",function(ce){return qe(e,ce)||pe(ce)}),Se(r.scroller,"contextmenu",function(ce){return al(e,ce)}),Se(r.input.getField(),"contextmenu",function(ce){r.scroller.contains(ce.target)||al(e,ce)});var R,A={end:0};function F(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),A=r.activeTouch,A.end=+new Date)}function V(ce){if(ce.touches.length!=1)return!1;var me=ce.touches[0];return me.radiusX<=1&&me.radiusY<=1}function re(ce,me){if(me.left==null)return!0;var Ie=me.left-ce.left,Be=me.top-ce.top;return Ie*Ie+Be*Be>20*20}Se(r.scroller,"touchstart",function(ce){if(!qe(e,ce)&&!V(ce)&&!cs(e,ce)){r.input.ensurePolled(),clearTimeout(R);var me=+new Date;r.activeTouch={start:me,moved:!1,prev:me-A.end<=300?A:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Se(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Se(r.scroller,"touchend",function(ce){var me=r.activeTouch;if(me&&!en(r,ce)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ie=e.coordsChar(r.activeTouch,"page"),Be;!me.prev||re(me,me.prev)?Be=new pn(Ie,Ie):!me.prev.prev||re(me,me.prev.prev)?Be=e.findWordAt(Ie):Be=new pn(Tt(Ie.line,0),_r(e.doc,Tt(Ie.line+1,0))),e.setSelection(Be.anchor,Be.head),e.focus(),pe(ce)}F()}),Se(r.scroller,"touchcancel",F),Se(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ii(e,r.scroller.scrollTop),Fa(e,r.scroller.scrollLeft,!0),Ke(e,"scroll",e))}),Se(r.scroller,"mousewheel",function(ce){return po(e,ce)}),Se(r.scroller,"DOMMouseScroll",function(ce){return po(e,ce)}),Se(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){qe(e,ce)||De(ce)},over:function(ce){qe(e,ce)||(Rl(e,ce),De(ce))},start:function(ce){return Al(e,ce)},drop:Jn(e,Ol),leave:function(ce){qe(e,ce)||Ws(e)}};var oe=r.input.getField();Se(oe,"keyup",function(ce){return Zs.call(e,ce)}),Se(oe,"keydown",Jn(e,Qs)),Se(oe,"keypress",Jn(e,el)),Se(oe,"focus",function(ce){return ti(e,ce)}),Se(oe,"blur",function(ce){return ri(e,ce)})}var ds=[];Nn.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=Dt(e,r).state:R="prev");var re=e.options.tabSize,oe=sr(F,r),ce=G(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var me=oe.text.match(/^\s*/)[0],Ie;if(!A&&!/\S/.test(oe.text))Ie=0,R="not";else if(R=="smart"&&(Ie=F.mode.indent(V,oe.text.slice(me.length),oe.text),Ie==xe||Ie>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Ie=G(sr(F,r-1).text,null,re):Ie=0:R=="add"?Ie=ce+e.options.indentUnit:R=="subtract"?Ie=ce-e.options.indentUnit:typeof R=="number"&&(Ie=ce+R),Ie=Math.max(0,Ie);var Be="",rt=0;if(e.options.indentWithTabs)for(var Je=Math.floor(Ie/re);Je;--Je)rt+=re,Be+=" ";if(rt<Ie&&(Be+=ae(Ie-rt)),Be!=me)return ro(F,Be,Tt(r,0),Tt(r,me.length),"+input"),oe.stateAfter=null,!0;for(var gt=0;gt<F.sel.ranges.length;gt++){var St=F.sel.ranges[gt];if(St.head.line==r&&St.head.ch<me.length){var Ut=Tt(r,me.length);as(F,gt,new pn(Ut,Ut));break}}}var pi=null;function Vo(e){pi=e}function fs(e,r,R,A,F){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var re=+new Date-200,oe=F=="paste"||e.state.pasteIncoming>re,ce=Wt(r),me=null;if(oe&&A.ranges.length>1)if(pi&&pi.text.join(`
`)==r){if(A.ranges.length%pi.text.length==0){me=[];for(var Ie=0;Ie<pi.text.length;Ie++)me.push(V.splitLines(pi.text[Ie]))}}else ce.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(me=le(ce,function(qt){return[qt]}));for(var Be=e.curOp.updateInput,rt=A.ranges.length-1;rt>=0;rt--){var Je=A.ranges[rt],gt=Je.from(),St=Je.to();Je.empty()&&(R&&R>0?gt=Tt(gt.line,gt.ch-R):e.state.overwrite&&!oe?St=Tt(St.line,Math.min(sr(V,St.line).text.length,St.ch+Z(ce).length)):oe&&pi&&pi.lineWise&&pi.text.join(`
`)==ce.join(`
`)&&(gt=St=Tt(gt.line,0)));var Ut={from:gt,to:St,text:me?me[rt%me.length]:ce,origin:F||(oe?"paste":e.state.cutIncoming>re?"cut":"+input")};to(e.doc,Ut),Mt(e,"inputRead",e,Ut)}r&&!oe&&ll(e,r),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Be),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ra(r,function(){return fs(r,R,0,null,"paste")}),!0}function ll(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var V=e.getModeAt(F.head),re=!1;if(V.electricChars){for(var oe=0;oe<V.electricChars.length;oe++)if(r.indexOf(V.electricChars.charAt(oe))>-1){re=Ro(e,F.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(sr(e.doc,F.head.line).text.slice(0,F.head.ch))&&(re=Ro(e,F.head.line,"smart")));re&&Mt(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:Tt(F,0),head:Tt(F+1,0)};R.push(V),r.push(e.getRange(V.anchor,V.head))}return{text:r,ranges:R}}function cl(e,r,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),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,re=V[A];if(V[A]==F&&A!="mode")return;V[A]=F,r.hasOwnProperty(A)&&Jn(this,r[A])(this,F,re),Ke(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:ma(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(re){return re.priority}),this.state.modeGen++,_n(this)}),removeOverlay:ma(function(A){for(var F=this.state.overlays,V=0;V<F.length;++V){var re=F[V].modeSpec;if(re==A||typeof A=="string"&&re.name==A){F.splice(V,1),this.state.modeGen++,_n(this);return}}}),indentLine:ma(function(A,F,V){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),ga(this.doc,A)&&Ro(this,A,F,V)}),indentSelection:ma(function(A){for(var F=this.doc.sel.ranges,V=-1,re=0;re<F.length;re++){var oe=F[re];if(oe.empty())oe.head.line>V&&(Ro(this,oe.head.line,A,!0),V=oe.head.line,re==this.doc.sel.primIndex&&yi(this));else{var ce=oe.from(),me=oe.to(),Ie=Math.max(V,ce.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var Be=Ie;Be<V;++Be)Ro(this,Be,A);var rt=this.doc.sel.ranges;ce.ch==0&&F.length==rt.length&&rt[re].from().ch>0&&as(this.doc,re,new pn(ce,rt[re].to()),Te)}}}),getTokenAt:function(A,F){return Fn(this,A,F)},getLineTokens:function(A,F){return Fn(this,Tt(A),F,!0)},getTokenTypeAt:function(A){A=_r(this.doc,A);var F=Ma(this,sr(this.doc,A.line)),V=0,re=(F.length-1)/2,oe=A.ch,ce;if(oe==0)ce=F[2];else for(;;){var me=V+re>>1;if((me?F[me*2-1]:0)>=oe)re=me;else if(F[me*2+1]<oe)V=me+1;else{ce=F[me*2+2];break}}var Ie=ce?ce.indexOf("overlay "):-1;return Ie<0?ce:Ie==0?null:ce.slice(0,Ie-1)},getModeAt:function(A){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(A).state).mode:F},getHelper:function(A,F){return this.getHelpers(A,F)[0]},getHelpers:function(A,F){var V=[];if(!R.hasOwnProperty(F))return V;var re=R[F],oe=this.getModeAt(A);if(typeof oe[F]=="string")re[oe[F]]&&V.push(re[oe[F]]);else if(oe[F])for(var ce=0;ce<oe[F].length;ce++){var me=re[oe[F][ce]];me&&V.push(me)}else oe.helperType&&re[oe.helperType]?V.push(re[oe.helperType]):re[oe.name]&&V.push(re[oe.name]);for(var Ie=0;Ie<re._global.length;Ie++){var Be=re._global[Ie];Be.pred(oe,this)&&ie(V,Be.val)==-1&&V.push(Be.val)}return V},getStateAfter:function(A,F){var V=this.doc;return A=In(V,A==null?V.first+V.size-1:A),Dt(this,A+1,F).state},cursorCoords:function(A,F){var V,re=this.doc.sel.primary();return A==null?V=re.head:typeof A=="object"?V=_r(this.doc,A):V=A?re.from():re.to(),Yr(this,V,F||"page")},charCoords:function(A,F){return vn(this,_r(this.doc,A),F||"page")},coordsChar:function(A,F){return A=$r(this,A,F||"page"),Xr(this,A.left,A.top)},lineAtHeight:function(A,F){return A=$r(this,{top:A,left:0},F||"page").top,Ln(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,V){var re=!1,oe;if(typeof A=="number"){var ce=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ce&&(A=ce,re=!0),oe=sr(this.doc,A)}else oe=A;return rn(this,oe,{top:0,left:0},F||"page",V||re).top+(re?this.doc.height-Yt(oe):0)},defaultTextHeight:function(){return kn(this.display)},defaultCharWidth:function(){return Xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,V,re,oe){var ce=this.display;A=Yr(this,_r(this.doc,A));var me=A.bottom,Ie=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ce.sizer.appendChild(F),re=="over")me=A.top;else if(re=="above"||re=="near"){var Be=Math.max(ce.wrapper.clientHeight,this.doc.height),rt=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||A.bottom+F.offsetHeight>Be)&&A.top>F.offsetHeight?me=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Be&&(me=A.bottom),Ie+F.offsetWidth>rt&&(Ie=rt-F.offsetWidth)}F.style.top=me+"px",F.style.left=F.style.right="",oe=="right"?(Ie=ce.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(oe=="left"?Ie=0:oe=="middle"&&(Ie=(ce.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Ie+"px"),V&&Ii(this,{left:Ie,top:me,right:Ie+F.offsetWidth,bottom:me+F.offsetHeight})},triggerOnKeyDown:ma(Qs),triggerOnKeyPress:ma(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ma(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:ma(function(A){ll(this,A)}),findPosH:function(A,F,V,re){var oe=1;F<0&&(oe=-1,F=-F);for(var ce=_r(this.doc,A),me=0;me<F&&!(ce=hs(this.doc,ce,oe,V,re),ce.hitSide);++me);return ce},moveH:ma(function(A,F){var V=this;this.extendSelectionsBy(function(re){return V.display.shift||V.doc.extend||re.empty()?hs(V.doc,re.head,A,F,V.options.rtlMoveVisually):A<0?re.from():re.to()},ve)}),deleteH:ma(function(A,F){var V=this.doc.sel,re=this.doc;V.somethingSelected()?re.replaceSelection("",null,"+delete"):io(this,function(oe){var ce=hs(re,oe.head,A,F,!1);return A<0?{from:ce,to:oe.head}:{from:oe.head,to:ce}})}),findPosV:function(A,F,V,re){var oe=1,ce=re;F<0&&(oe=-1,F=-F);for(var me=_r(this.doc,A),Ie=0;Ie<F;++Ie){var Be=Yr(this,me,"div");if(ce==null?ce=Be.left:Be.left=ce,me=fl(this,Be,oe,V),me.hitSide)break}return me},moveV:ma(function(A,F){var V=this,re=this.doc,oe=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Ie){if(ce)return A<0?Ie.from():Ie.to();var Be=Yr(V,Ie.head,"div");Ie.goalColumn!=null&&(Be.left=Ie.goalColumn),oe.push(Be.left);var rt=fl(V,Be,A,F);return F=="page"&&Ie==re.sel.primary()&&Si(V,vn(V,rt,"div").top-Be.top),rt},ve),oe.length)for(var me=0;me<re.sel.ranges.length;me++)re.sel.ranges[me].goalColumn=oe[me]}),findWordAt:function(A){var F=this.doc,V=sr(F,A.line).text,re=A.ch,oe=A.ch;if(V){var ce=this.getHelper(A,"wordChars");(A.sticky=="before"||oe==V.length)&&re?--re:++oe;for(var me=V.charAt(re),Ie=X(me,ce)?function(Be){return X(Be,ce)}:/\s/.test(me)?function(Be){return/\s/.test(Be)}:function(Be){return!/\s/.test(Be)&&!X(Be)};re>0&&Ie(V.charAt(re-1));)--re;for(;oe<V.length&&Ie(V.charAt(oe));)++oe}return new pn(Tt(A.line,re),Tt(A.line,oe))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):x(this.display.cursorDiv,"CodeMirror-overwrite"),Ke(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==W()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ma(function(A,F){ai(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-We(this)-this.display.barHeight,width:A.scrollWidth-We(this)-this.display.barWidth,clientHeight:he(this),clientWidth:Le(this)}},scrollIntoView:ma(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:Tt(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):Ci(this,A.from,A.to,A.margin)}),setSize:ma(function(A,F){var V=this,re=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};A!=null&&(this.display.wrapper.style.width=re(A)),F!=null&&(this.display.wrapper.style.height=re(F)),this.options.lineWrapping&&Nr(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(ce){if(ce.widgets){for(var me=0;me<ce.widgets.length;me++)if(ce.widgets[me].noHScroll){Dn(V,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,Ke(this,"refresh",this)}),operation:function(A){return Ra(this,A)},startOperation:function(){return Tn(this)},endOperation:function(){return Oi(this)},refresh:ma(function(){var A=this.display.cachedTextHeight;_n(this),this.curOp.forceUpdate=!0,Wr(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),Ji(this.display),(A==null||Math.abs(A-kn(this.display))>.5||this.options.lineWrapping)&&ua(this),Ke(this,"refresh",this)}),swapDoc:ma(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Wr(this),this.display.input.reset(),ai(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Mt(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,re){e.registerHelper(A,F,re),R[A]._global.push({pred:V,val:re})}}function hs(e,r,R,A,F){var V=r,re=R,oe=sr(e,r.line),ce=F&&e.direction=="rtl"?-R:R;function me(){var cr=r.line+ce;return cr<e.first||cr>=e.first+e.size?!1:(r=new Tt(cr,r.ch,r.sticky),oe=sr(e,cr))}function Ie(cr){var er;if(A=="codepoint"){var yr=oe.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(yr)?er=null:er=new Tt(r.line,Math.max(0,Math.min(oe.text.length,r.ch+R*(yr>=55296&&yr<56320?2:1))),-R)}else F?er=kl(e.cm,oe,r,R):er=os(oe,r,R);if(er==null)if(!cr&&me())r=ss(F,e.cm,oe,r.line,ce);else return!1;else r=er;return!0}if(A=="char"||A=="codepoint")Ie();else if(A=="column")Ie(!0);else if(A=="word"||A=="group")for(var Be=null,rt=A=="group",Je=e.cm&&e.cm.getHelper(r,"wordChars"),gt=!0;!(R<0&&!Ie(!gt));gt=!1){var St=oe.text.charAt(r.ch)||`
`,Ut=X(St,Je)?"w":rt&&St==`
`?"n":!rt||/\s/.test(St)?null:"p";if(rt&&!gt&&!Ut&&(Ut="s"),Be&&Be!=Ut){R<0&&(R=1,Ie(),r.sticky="after");break}if(Ut&&(Be=Ut),R>0&&!Ie(!gt))break}var qt=Wo(e,r,V,re,!0);return na(V,qt)&&(qt.hitSide=!0),qt}function fl(e,r,R,A){var F=e.doc,V=r.left,re;if(A=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(oe-.5*kn(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else A=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var me;!(me=Xr(e,V,re),!me.outside);){if(R<0?re<=0:re>=F.height){me.hitSide=!0;break}re+=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 ce=oe.target;ce;ce=ce.parentNode){if(ce==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Se(F,"paste",function(oe){if(!V(oe)||qe(A,oe)||sl(oe,A))return;c<=11&&setTimeout(Jn(A,function(){return r.updateFromDOM()}),20)}),Se(F,"compositionstart",function(oe){r.composing={data:oe.data,done:!1}}),Se(F,"compositionupdate",function(oe){r.composing||(r.composing={data:oe.data,done:!1})}),Se(F,"compositionend",function(oe){r.composing&&(oe.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Se(F,"touchstart",function(){return R.forceCompositionEnd()}),Se(F,"input",function(){r.composing||r.readFromDOMSoon()});function re(oe){if(!V(oe)||qe(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 ce=ul(A);Vo({lineWise:!0,text:ce.text}),oe.type=="cut"&&A.operation(function(){A.setSelections(ce.ranges,0,Te),A.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var me=pi.text.join(`
`);if(oe.clipboardData.setData("Text",me),oe.clipboardData.getData("Text")==me){oe.preventDefault();return}}var Ie=dl(),Be=Ie.firstChild;A.display.lineSpace.insertBefore(Ie,A.display.lineSpace.firstChild),Be.value=pi.text.join(`
`);var rt=document.activeElement;z(Be),setTimeout(function(){A.display.lineSpace.removeChild(Ie),rt.focus(),rt==F&&R.showPrimarySelection()},50)}Se(F,"copy",re),Se(F,"cut",re)},Sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Sn.prototype.prepareSelection=function(){var e=Oa(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),re=$o(r,e.focusNode,e.focusOffset);if(V&&!V.bad&&re&&!re.bad&&fr(ya(V,re),A)==0&&fr(Sa(V,re),F)==0)return;var oe=r.display.view,ce=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 Ie=oe[oe.length-1].measure,Be=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;me={node:Be[Be.length-1],offset:Be[Be.length-2]-Be[Be.length-3]}}if(!ce||!me){e.removeAllRanges();return}var rt=e.rangeCount&&e.getRangeAt(0),Je;try{Je=N(ce.node,ce.offset,me.offset,me.node)}catch(gt){}Je&&(!S&&r.state.focused?(e.collapse(ce.node,ce.offset),Je.collapsed||(e.removeAllRanges(),e.addRange(Je))):(e.removeAllRanges(),e.addRange(Je)),rt&&e.anchorNode==null?e.addRange(rt):S&&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 I(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():Ra(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&&n&&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&&Ra(r,function(){Ea(r.doc,fi(R,A),Te),(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=Tt(A.line-1,sr(e.doc,A.line-1).length)),F.ch==sr(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=Tt(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var V,re,oe;A.line==r.viewFrom||(V=xn(e,A.line))==0?(re=Zr(r.view[0].line),oe=r.view[0].node):(re=Zr(r.view[V].line),oe=r.view[V-1].node.nextSibling);var ce=xn(e,F.line),me,Ie;if(ce==r.view.length-1?(me=r.viewTo-1,Ie=r.lineDiv.lastChild):(me=Zr(r.view[ce+1].line)-1,Ie=r.view[ce+1].node.previousSibling),!oe)return!1;for(var Be=e.doc.splitLines(ru(e,oe,Ie,re,me)),rt=Kn(e.doc,Tt(re,0),Tt(me,sr(e.doc,me).text.length));Be.length>1&&rt.length>1;)if(Z(Be)==Z(rt))Be.pop(),rt.pop(),me--;else if(Be[0]==rt[0])Be.shift(),rt.shift(),re++;else break;for(var Je=0,gt=0,St=Be[0],Ut=rt[0],qt=Math.min(St.length,Ut.length);Je<qt&&St.charCodeAt(Je)==Ut.charCodeAt(Je);)++Je;for(var cr=Z(Be),er=Z(rt),yr=Math.min(cr.length-(Be.length==1?Je:0),er.length-(rt.length==1?Je:0));gt<yr&&cr.charCodeAt(cr.length-gt-1)==er.charCodeAt(er.length-gt-1);)++gt;if(Be.length==1&&rt.length==1&&re==A.line)for(;Je&&Je>A.ch&&cr.charCodeAt(cr.length-gt-1)==er.charCodeAt(er.length-gt-1);)Je--,gt++;Be[Be.length-1]=cr.slice(0,cr.length-gt).replace(/^\u200b+/,""),Be[0]=Be[0].slice(Je).replace(/\u200b+$/,"");var Fr=Tt(re,Je),Pr=Tt(me,rt.length?Z(rt).length-gt:0);if(Be.length>1||Be[0]||fr(Fr,Pr))return ro(e.doc,Be,Fr,Pr,"+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())&&Ra(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()||Jn(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=Ue(e,r.line);if(!R||R.hidden)return null;var A=sr(e.doc,r.line),F=ye(R,A,r.line),V=st(A,e.doc.direction),re="left";if(V){var oe=et(V,r.ch);re=oe%2?"right":"left"}var ce=xt(F.map,r.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function so(e,r){return r&&(e.bad=!0),e}function ru(e,r,R,A,F){var V="",re=!1,oe=e.doc.lineSeparator(),ce=!1;function me(Je){return function(gt){return gt.id==Je}}function Ie(){re&&(V+=oe,ce&&(V+=oe),re=ce=!1)}function Be(Je){Je&&(Ie(),V+=Je)}function rt(Je){if(Je.nodeType==1){var gt=Je.getAttribute("cm-text");if(gt){Be(gt);return}var St=Je.getAttribute("cm-marker"),Ut;if(St){var qt=e.findMarks(Tt(A,0),Tt(F+1,0),me(+St));qt.length&&(Ut=qt[0].find(0))&&Be(Kn(e.doc,Ut.from,Ut.to).join(oe));return}if(Je.getAttribute("contenteditable")=="false")return;var cr=/^(pre|div|p|li|table|br)$/i.test(Je.nodeName);if(!/^br$/i.test(Je.nodeName)&&Je.textContent.length==0)return;cr&&Ie();for(var er=0;er<Je.childNodes.length;er++)rt(Je.childNodes[er]);/^(pre|p)$/i.test(Je.nodeName)&&(ce=!0),cr&&(re=!0)}else Je.nodeType==3&&Be(Je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(rt(r),r==R);)r=r.nextSibling,ce=!1;return V}function $o(e,r,R){var A;if(r==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(Tt(e.display.viewTo-1)),!0);r=null,R=0}else for(A=r;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var V=e.display.view[F];if(V.node==A)return nu(V,r,R)}}function nu(e,r,R){var A=e.text.firstChild,F=!1;if(!r||!I(A,r))return so(Tt(Zr(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var V=e.rest?Z(e.rest):e.line;return so(Tt(Zr(V),V.text.length),F)}var re=r.nodeType==3?r:null,oe=r;for(!re&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(re=r.firstChild,R&&(R=re.nodeValue.length));oe.parentNode!=A;)oe=oe.parentNode;var ce=e.measure,me=ce.maps;function Ie(Ut,qt,cr){for(var er=-1;er<(me?me.length:0);er++)for(var yr=er<0?ce.map:me[er],Fr=0;Fr<yr.length;Fr+=3){var Pr=yr[Fr+2];if(Pr==Ut||Pr==qt){var nn=Zr(er<0?e.line:e.rest[er]),Pn=yr[Fr]+cr;return(cr<0||Pr!=Ut)&&(Pn=yr[Fr+(cr?1:0)]),Tt(nn,Pn)}}}var Be=Ie(re,oe,R);if(Be)return so(Be,F);for(var rt=oe.nextSibling,Je=re?re.nodeValue.length-R:0;rt;rt=rt.nextSibling){if(Be=Ie(rt,rt.firstChild,0),Be)return so(Tt(Be.line,Be.ch-Je),F);Je+=rt.textContent.length}for(var gt=oe.previousSibling,St=R;gt;gt=gt.previousSibling){if(Be=Ie(gt,gt.firstChild,-1),Be)return so(Tt(Be.line,Be.ch+St),F);St+=gt.textContent.length}}var Zn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};Zn.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"),Se(F,"input",function(){_&&c>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Se(F,"paste",function(re){if(qe(A,re)||sl(re,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function V(re){if(qe(A,re))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}),re.type=="cut"?A.setSelections(oe.ranges,null,Te):(R.prevInput="",F.value=oe.text.join(`
`),z(F))}else return;re.type=="cut"&&(A.state.cutIncoming=+new Date)}Se(F,"cut",V),Se(F,"copy",V),Se(e.scroller,"paste",function(re){if(en(e,re)||qe(A,re))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,F.dispatchEvent(oe)}),Se(e.lineSpace,"selectstart",function(re){en(e,re)||pe(re)}),Se(F,"compositionstart",function(){var re=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:A.markText(re,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Zn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Zn.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Oa(e);if(e.options.moveInputWithCursor){var F=Yr(e,R.sel.primary().head,"div"),V=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+re.top-V.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+re.left-V.left))}return A},Zn.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")},Zn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&z(this.textarea),_&&c>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",_&&c>=9&&(this.hasSelection=null))},Zn.prototype.getField=function(){return this.textarea},Zn.prototype.supportsTouch=function(){return!1},Zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},Zn.prototype.blur=function(){this.textarea.blur()},Zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Zn.prototype.receivedFocus=function(){this.slowPoll()},Zn.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()})},Zn.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)},Zn.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||pt(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(_&&c>=9&&this.hasSelection===F||l&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var V=F.charCodeAt(0);if(V==8203&&!A&&(A="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(A.length,F.length);re<oe&&A.charCodeAt(re)==F.charCodeAt(re);)++re;return Ra(r,function(){fs(r,F.slice(re),A.length-re,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
`)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Zn.prototype.onKeyPress=function(){_&&c>=9&&(this.hasSelection=null),this.fastPoll()},Zn.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var V=Vn(R,e),re=A.scroller.scrollTop;if(!V||u)return;var oe=R.options.resetSelectionOnContextMenu;oe&&R.doc.sel.contains(V)==-1&&Jn(R,Ea)(R.doc,fi(V),Te);var ce=F.style.cssText,me=r.wrapper.style.cssText,Ie=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px;
z-index: 1000; background: `+(_?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Be;o&&(Be=window.scrollY),A.input.focus(),o&&window.scrollTo(null,Be),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=Je,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function rt(){if(F.selectionStart!=null){var St=R.somethingSelected(),Ut="\u200B"+(St?F.value:"");F.value="\u21DA",F.value=Ut,r.prevInput=St?"":"\u200B",F.selectionStart=1,F.selectionEnd=Ut.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=ce,_&&c<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=re),F.selectionStart!=null){(!_||_&&c<9)&&rt();var St=0,Ut=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?Jn(R,Ds)(R):St++<10?A.detectingSelectAll=setTimeout(Ut,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Ut,200)}}if(_&&c>=9&&rt(),L){De(e);var gt=function(){it(window,"mouseup",gt),setTimeout(Je,20)};Se(window,"mouseup",gt)}else setTimeout(Je,50)},Zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Zn.prototype.setUneditable=function(){},Zn.prototype.needsContentAttribute=!1;function au(e,r){if(r=r?H(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=W();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=oe.getValue()}var F;if(e.form&&(Se(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var V=e.form;F=V.submit;try{var re=V.submit=function(){A(),V.submit=F,V.submit(),V.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=A,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,A(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(it(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var oe=Nn(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return oe}function iu(e){e.off=it,e.on=Se,e.wheelEventPixels=ho,e.Doc=Ua,e.splitLines=Wt,e.countColumn=G,e.findColumn=de,e.isWordChar=J,e.Pass=xe,e.signal=Ke,e.Line=wr,e.changeEnd=hi,e.scrollbarModel=ir,e.Pos=Tt,e.cmpPos=fr,e.modes=Jr,e.mimeModes=pr,e.resolveMode=Cr,e.getMode=cn,e.modeExtensions=wn,e.extendMode=Hn,e.copyState=sn,e.startState=wa,e.innerMode=_a,e.commands=So,e.keyMap=Di,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=ao,e.normalizeKeyMap=Il,e.StringStream=mn,e.SharedTextMarker=_o,e.TextMarker=ji,e.LineWidget=xo,e.e_preventDefault=pe,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=K,e.contains=I,e.rmClass=x,e.keyNames=Fi}Jl(Nn),eu(Nn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Ua.prototype)Ua.prototype.hasOwnProperty(Yo)&&ie(ou,Yo)<0&&(Nn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ua.prototype[Yo]));return Re(Ua),Nn.inputStyles={textarea:Zn,contenteditable:Sn},Nn.defineMode=function(e){!Nn.defaults.mode&&e!="null"&&(Nn.defaults.mode=e),Qr.apply(this,arguments)},Nn.defineMIME=Br,Nn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nn.defineMIME("text/plain","null"),Nn.defineExtension=function(e,r){Nn.prototype[e]=r},Nn.defineDocExtension=function(e,r){Ua.prototype[e]=r},Nn.fromTextArea=au,iu(Nn),Nn.version="5.58.2",Nn})},WYAk:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){(function(){var m=D,S=m.lib,P=S.Base,d=m.enc,f=d.Utf8,_=m.algo,c=_.HMAC=P.extend({init:function(o,i){o=this._hasher=new o.init,typeof i=="string"&&(i=f.parse(i));var n=o.blockSize,u=n*4;i.sigBytes>u&&(i=o.finalize(i)),i.clamp();for(var p=this._oKey=i.clone(),h=this._iKey=i.clone(),v=p.words,g=h.words,E=0;E<n;E++)v[E]^=1549556828,g[E]^=909522486;p.sigBytes=h.sigBytes=u,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var i=this._hasher,n=i.finalize(o);i.reset();var u=i.finalize(this._oKey.clone().concat(n));return u}})})()})},WaYH:function(j,Y,M){"use strict";var D=M("rePB"),m=M("Ff2n"),S=M("VTBJ"),P=M("1OyB"),d=M("vuIU"),f=M("JX7q"),_=M("Ji7U"),c=M("LK+K"),o=M("cDcd"),i=M("TSYQ"),n=M.n(i),u=M("sboe"),p=M("OZM5"),h=function(L){var O=L.prefixCls,x=L.level,b=L.isStart,y=L.isEnd;if(!x)return null;for(var T="".concat(O,"-indent-unit"),k=[],N=0;N<x;N+=1){var I;k.push(o.createElement("span",{key:N,className:n()(T,(I={},Object(D.a)(I,"".concat(T,"-start"),b[N+1]),Object(D.a)(I,"".concat(T,"-end"),y[N+1]),Object(D.a)(I,"".concat(T,"-end-first-level"),!N&&y[0]),I))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},k)},v=h,g=M("815F"),E="open",a="close",l="---",t=function(s){Object(_.a)(O,s);var L=Object(c.a)(O);function O(){var x;return Object(P.a)(this,O),x=L.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,k=y.checked,N=x.props.context.onNodeCheck;if(!x.isCheckable()||T)return;b.preventDefault();var I=!k;N(b,Object(g.b)(x.props),I)},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(f.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(f.a)(x))},x.onDragOver=function(b){var y=x.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),y(b,Object(f.a)(x))},x.onDragLeave=function(b){var y=x.props.context.onNodeDragLeave;b.stopPropagation(),y(b,Object(f.a)(x))},x.onDragEnd=function(b){var y=x.props.context.onNodeDragEnd;b.stopPropagation(),x.setState({dragNodeHighlight:!1}),y(b,Object(f.a)(x))},x.onDrop=function(b){var y=x.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),x.setState({dragNodeHighlight:!1}),y(b,Object(f.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:a},x.hasChildren=function(){var b=x.props.eventKey,y=x.props.context.keyEntities,T=y[b]||{},k=T.children;return!!(k||[]).length},x.isLeaf=function(){var b=x.props,y=b.isLeaf,T=b.loaded,k=x.props.context.loadData,N=x.hasChildren();return y===!1?!1:y||!k&&!N||k&&T&&!N},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,k=b.loaded,N=x.props.context,I=N.loadData,W=N.onNodeLoad;if(T)return;I&&y&&!x.isLeaf()&&(!x.hasChildren()&&!k&&W(Object(g.b)(x.props)))},x.renderSwitcher=function(){var b=x.props,y=b.expanded,T=b.switcherIcon,k=x.props.context,N=k.prefixCls,I=k.switcherIcon,W=T||I;if(x.isLeaf())return o.createElement("span",{className:n()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof W=="function"?W(Object(S.a)(Object(S.a)({},x.props),{},{isLeaf:!0})):W);var K=n()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(y?E:a));return o.createElement("span",{onClick:x.onExpand,className:K},typeof W=="function"?W(Object(S.a)(Object(S.a)({},x.props),{},{isLeaf:!1})):W)},x.renderCheckbox=function(){var b=x.props,y=b.checked,T=b.halfChecked,k=b.disableCheckbox,N=x.props.context.prefixCls,I=x.isDisabled(),W=x.isCheckable();if(!W)return null;var K=typeof W!="boolean"?W:null;return o.createElement("span",{className:n()("".concat(N,"-checkbox"),y&&"".concat(N,"-checkbox-checked"),!y&&T&&"".concat(N,"-checkbox-indeterminate"),(I||k)&&"".concat(N,"-checkbox-disabled")),onClick:x.onCheck},K)},x.renderIcon=function(){var b=x.props.loading,y=x.props.context.prefixCls;return o.createElement("span",{className:n()("".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,k=y.selected,N=y.icon,I=y.loading,W=y.data,K=x.props.context,U=K.prefixCls,z=K.showIcon,B=K.icon,H=K.draggable,G=K.loadData,ee=K.titleRender,ie=x.isDisabled(),ue="".concat(U,"-node-content-wrapper"),xe;if(z){var Te=N||B;xe=Te?o.createElement("span",{className:n()("".concat(U,"-iconEle"),"".concat(U,"-icon__customize"))},typeof Te=="function"?Te(x.props):Te):x.renderIcon()}else G&&I&&(xe=x.renderIcon());var se;typeof T=="function"?se=T(W):ee?se=ee(W):se=T;var ve=o.createElement("span",{className:"".concat(U,"-title")},se);return o.createElement("span",{ref:x.setSelectHandle,title:typeof T=="string"?T:"",className:n()("".concat(ue),"".concat(ue,"-").concat(x.getNodeState()||"normal"),!ie&&(k||b)&&"".concat(U,"-node-selected"),!ie&&H&&"draggable"),draggable:!ie&&H||void 0,"aria-grabbed":!ie&&H||void 0,onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,onContextMenu:x.onContextMenu,onClick:x.onSelectorClick,onDoubleClick:x.onSelectorDoubleClick,onDragStart:H?x.onDragStart:void 0},xe,ve)},x}return Object(d.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,k=y.className,N=y.style,I=y.dragOver,W=y.dragOverGapTop,K=y.dragOverGapBottom,U=y.isLeaf,z=y.isStart,B=y.isEnd,H=y.expanded,G=y.selected,ee=y.checked,ie=y.halfChecked,ue=y.loading,xe=y.domRef,Te=y.active,se=y.onMouseMove,ve=Object(m.a)(y,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),de=this.props.context,ne=de.prefixCls,ae=de.filterTreeNode,Z=de.draggable,le=de.keyEntities,Q=this.isDisabled(),q=Object(p.f)(ve),be=le[T]||{},te=be.level,J=B[B.length-1];return o.createElement("div",Object.assign({ref:xe,className:n()(k,"".concat(ne,"-treenode"),(b={},Object(D.a)(b,"".concat(ne,"-treenode-disabled"),Q),Object(D.a)(b,"".concat(ne,"-treenode-switcher-").concat(H?"open":"close"),!U),Object(D.a)(b,"".concat(ne,"-treenode-checkbox-checked"),ee),Object(D.a)(b,"".concat(ne,"-treenode-checkbox-indeterminate"),ie),Object(D.a)(b,"".concat(ne,"-treenode-selected"),G),Object(D.a)(b,"".concat(ne,"-treenode-loading"),ue),Object(D.a)(b,"".concat(ne,"-treenode-active"),Te),Object(D.a)(b,"".concat(ne,"-treenode-leaf-last"),J),Object(D.a)(b,"drag-over",!Q&&I),Object(D.a)(b,"drag-over-gap-top",!Q&&W),Object(D.a)(b,"drag-over-gap-bottom",!Q&&K),Object(D.a)(b,"filter-node",ae&&ae(Object(g.b)(this.props))),b)),style:N,onDragEnter:Z?this.onDragEnter:void 0,onDragOver:Z?this.onDragOver:void 0,onDragLeave:Z?this.onDragLeave:void 0,onDrop:Z?this.onDrop:void 0,onDragEnd:Z?this.onDragEnd:void 0,onMouseMove:se},q),o.createElement(v,{prefixCls:ne,level:te,isStart:z,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(o.Component),C=function(L){return o.createElement(u.a.Consumer,null,function(O){return o.createElement(t,Object.assign({},L,{context:O}))})};C.displayName="TreeNode",C.defaultProps={title:l},C.isTreeNode=1;var w=Y.a=C},Y1PL:function(j,Y,M){"use strict";M.r(Y),M.d(Y,"ResizableTextArea",function(){return ie});var D=M("wx14"),m=M("1OyB"),S=M("vuIU"),P=M("Ji7U"),d=M("LK+K"),f=M("cDcd"),_=M("VTBJ"),c=M("rePB"),o=M("Zm9Q"),i=M("Kwbf"),n=M("c+Xe"),u=M("m+aA"),p=M("bdgK"),h=new Map;function v(Te){Te.forEach(function(se){var ve,de=se.target;(ve=h.get(de))===null||ve===void 0||ve.forEach(function(ne){return ne(de)})})}var g=new p.default(v),E=null,a=null;function l(Te,se){h.has(Te)||(h.set(Te,new Set),g.observe(Te)),h.get(Te).add(se)}function t(Te,se){h.has(Te)&&(h.get(Te).delete(se),h.get(Te).size||(g.unobserve(Te),h.delete(Te)))}var C=function(Te){Object(P.a)(ve,Te);var se=Object(d.a)(ve);function ve(){return Object(m.a)(this,ve),se.apply(this,arguments)}return Object(S.a)(ve,[{key:"render",value:function(){return this.props.children}}]),ve}(f.Component),w=f.createContext(null);function s(Te){var se=Te.children,ve=Te.onBatchResize,de=f.useRef(0),ne=f.useRef([]),ae=f.useContext(w),Z=f.useCallback(function(le,Q,q){de.current+=1;var be=de.current;ne.current.push({size:le,element:Q,data:q}),Promise.resolve().then(function(){be===de.current&&(ve==null||ve(ne.current),ne.current=[])}),ae==null||ae(le,Q,q)},[ve,ae]);return f.createElement(w.Provider,{value:Z},se)}function L(Te){var se=Te.children,ve=Te.disabled,de=f.useRef(null),ne=f.useRef(null),ae=f.useContext(w),Z=f.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),le=f.isValidElement(se)&&Object(n.c)(se),Q=le?se.ref:null,q=f.useMemo(function(){return Object(n.a)(Q,de)},[Q,de]),be=f.useRef(Te);be.current=Te;var te=f.useCallback(function(J){var X=be.current,$=X.onResize,ge=X.data,fe=J.getBoundingClientRect(),_e=fe.width,He=fe.height,$e=J.offsetWidth,Ve=J.offsetHeight,et=Math.floor(_e),at=Math.floor(He);if(Z.current.width!==et||Z.current.height!==at||Z.current.offsetWidth!==$e||Z.current.offsetHeight!==Ve){var st={width:et,height:at,offsetWidth:$e,offsetHeight:Ve};Z.current=st;var Me=$e===Math.round(_e)?_e:$e,Se=Ve===Math.round(He)?He:Ve,Ye=Object(_.a)(Object(_.a)({},st),{},{offsetWidth:Me,offsetHeight:Se});ae==null||ae(Ye,J,ge),$&&Promise.resolve().then(function(){$(Ye,J)})}},[]);return f.useEffect(function(){var J=Object(u.a)(de.current)||Object(u.a)(ne.current);return J&&!ve&&l(J,te),function(){return t(J,te)}},[de.current,ve]),f.createElement(C,{ref:ne},le?f.cloneElement(se,{ref:q}):se)}var O="rc-observer-key";function x(Te){var se=Te.children,ve=Object(o.a)(se);return ve.map(function(de,ne){var ae=(de==null?void 0:de.key)||"".concat(O,"-").concat(ne);return f.createElement(L,Object(D.a)({},Te,{key:ae}),de)})}x.Collection=s;var b=x,y=M("bT9E"),T=M("TSYQ"),k=M.n(T),N=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,I=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],W={},K;function U(Te){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=Te.getAttribute("id")||Te.getAttribute("data-reactid")||Te.getAttribute("name");if(se&&W[ve])return W[ve];var de=window.getComputedStyle(Te),ne=de.getPropertyValue("box-sizing")||de.getPropertyValue("-moz-box-sizing")||de.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(de.getPropertyValue("padding-bottom"))+parseFloat(de.getPropertyValue("padding-top")),Z=parseFloat(de.getPropertyValue("border-bottom-width"))+parseFloat(de.getPropertyValue("border-top-width")),le=I.map(function(q){return"".concat(q,":").concat(de.getPropertyValue(q))}).join(";"),Q={sizingStyle:le,paddingSize:ae,borderSize:Z,boxSizing:ne};return se&&ve&&(W[ve]=Q),Q}function z(Te){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),Te.getAttribute("wrap")?K.setAttribute("wrap",Te.getAttribute("wrap")):K.removeAttribute("wrap");var ne=U(Te,se),ae=ne.paddingSize,Z=ne.borderSize,le=ne.boxSizing,Q=ne.sizingStyle;K.setAttribute("style","".concat(Q,";").concat(N)),K.value=Te.value||Te.placeholder||"";var q=Number.MIN_SAFE_INTEGER,be=Number.MAX_SAFE_INTEGER,te=K.scrollHeight,J;if(le==="border-box"?te+=Z:le==="content-box"&&(te-=ae),ve!==null||de!==null){K.value=" ";var X=K.scrollHeight-ae;ve!==null&&(q=X*ve,le==="border-box"&&(q=q+ae+Z),te=Math.max(q,te)),de!==null&&(be=X*de,le==="border-box"&&(be=be+ae+Z),J=te>be?"":"hidden",te=Math.min(be,te))}return{height:te,minHeight:q,maxHeight:be,overflowY:J,resize:"none"}}var B=M("Gytx"),H=M.n(B),G;(function(Te){Te[Te.NONE=0]="NONE",Te[Te.RESIZING=1]="RESIZING",Te[Te.RESIZED=2]="RESIZED"})(G||(G={}));var ee=function(Te){Object(P.a)(ve,Te);var se=Object(d.a)(ve);function ve(de){var ne;return Object(m.a)(this,ve),ne=se.call(this,de),ne.nextFrameActionId=void 0,ne.resizeFrameId=void 0,ne.textArea=void 0,ne.saveTextArea=function(ae){ne.textArea=ae},ne.handleResize=function(ae){var Z=ne.state.resizeStatus,le=ne.props,Q=le.autoSize,q=le.onResize;if(Z!==G.NONE)return;typeof q=="function"&&q(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 Z=ae.minRows,le=ae.maxRows,Q=z(ne.textArea,!1,Z,le);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,Z=ae.prefixCls,le=Z===void 0?"rc-textarea":Z,Q=ae.autoSize,q=ae.onResize,be=ae.className,te=ae.disabled,J=ne.state,X=J.textareaStyles,$=J.resizeStatus,ge=Object(y.a)(ne.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=k()(le,be,Object(c.a)({},"".concat(le,"-disabled"),te));"value"in ge&&(ge.value=ge.value||"");var _e=Object(_.a)(Object(_.a)(Object(_.a)({},ne.props.style),X),$===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return f.createElement(b,{onResize:ne.handleResize,disabled:!(Q||q)},f.createElement("textarea",Object(D.a)({},ge,{className:fe,style:_e,ref:ne.saveTextArea})))},ne.state={textareaStyles:{},resizeStatus:G.NONE},ne}return Object(S.a)(ve,[{key:"componentDidUpdate",value:function(ne){(ne.value!==this.props.value||!H()(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(Z){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ve}(f.Component),ie=ee,ue=function(Te){Object(P.a)(ve,Te);var se=Object(d.a)(ve);function ve(de){var ne;Object(m.a)(this,ve),ne=se.call(this,de),ne.resizableTextArea=void 0,ne.focus=function(){ne.resizableTextArea.textArea.focus()},ne.saveTextArea=function(Z){ne.resizableTextArea=Z},ne.handleChange=function(Z){var le=ne.props.onChange;ne.setValue(Z.target.value,function(){ne.resizableTextArea.resizeTextarea()}),le&&le(Z)},ne.handleKeyDown=function(Z){var le=ne.props,Q=le.onPressEnter,q=le.onKeyDown;Z.keyCode===13&&Q&&Q(Z),q&&q(Z)};var ae=typeof de.value=="undefined"||de.value===null?de.defaultValue:de.value;return ne.state={value:ae},ne}return Object(S.a)(ve,[{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 f.createElement(ie,Object(D.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}}]),ve}(f.Component),xe=Y.default=ue},ZW9T:function(j,Y,M){"use strict";M.d(Y,"a",function(){return w});var D=M("k1fw"),m=M("miYZ"),S=M("tsqr"),P=M("rAM+"),d=M("tJVT"),f=M("PpiC"),_=M("cDcd"),c=M.n(_),o=M("bdgK");function i(s,L,O,x,b){var y=L.getWordUntilPosition(O),T={startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:y.startColumn,endColumn:y.endColumn},k=x.map(function(N){return{label:N,kind:s.languages.CompletionItemKind.Keyword,insertText:N,insertTextRules:s.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:T}});return b.map(function(N){k.push(Object(D.a)(Object(D.a)({},N),{},{range:T}))}),k}var n=function(s){var L={label:"ifelse",kind:s.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:s.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"];s.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(T,k){var N=i(s,T,k,O,[L]);return{suggestions:N}}});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"];s.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(T,k){var N=[{label:"print",kind:s.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:s.languages.CompletionItemInsertTextRule.InsertAsSnippet}],I=i(s,T,k,x,N);return{suggestions:I}}});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"];s.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(T,k){var N=[L,{label:"main",kind:s.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:s.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:s.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:s.languages.CompletionItemInsertTextRule.InsertAsSnippet}],I=i(s,T,k,b,N);return{suggestions:I}}})},u="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=M("LvDl"),h=M("+ua5");function v(s){return/^\d+$/.test(s)?"".concat(s,"px"):s}function g(){}var E=!1,a={"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 l(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=s;if(Array.isArray(s)){for(var O=0;O<s.length;O++){var x=a[s[O]];if(x)return x}return L[0]}return a[L]||L}var t=null,C=Y.b=function(s){var L=s.width,O=L===void 0?"100%":L,x=s.height,b=x===void 0?"100%":x,y=s.value,T=s.language,k=T===void 0?"javascript":T,N=s.style,I=N===void 0?{}:N,W=s.options,K=W===void 0?{}:W,U=s.overrideServices,z=U===void 0?{}:U,B=s.theme,H=B===void 0?"vs-dark":B,G=s.onEditBlur,ee=s.onSave,ie=s.autoHeight,ue=ie===void 0?!1:ie,xe=s.forbidCopy,Te=xe===void 0?!1:xe,se=s.onChange,ve=se===void 0?g:se,de=s.editorDidMount,ne=de===void 0?g:de,ae=s.onFocus,Z=ae===void 0?g:ae,le=s.filename,Q=le===void 0?"educoder.txt":le,q=s.errorLine,be=s.errorContent,te=be===void 0?"":be,J=Object(f.a)(s,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),X=Object(_.useRef)(),$=Object(_.useRef)({}),ge=Object(_.useRef)(),fe=Object(_.useRef)(!1),_e=Object(_.useRef)(),He=Object(_.useState)(!1),$e=Object(d.a)(He,2),Ve=$e[0],et=$e[1];function at(){var lt;return X.current&&(lt=new o.default(function(ut){var Rt=Object(P.a)(ut),tt;try{for(Rt.s();!(tt=Rt.n()).done;){var nr=tt.value;(nr.target.offsetHeight>0||nr.target.offsetWidth>0)&&$.current.instance.layout()}}catch(Wt){Rt.e(Wt)}finally{Rt.f()}}),lt.observe(X.current)),lt}function st(){S.b.warn(decodeURIComponent(u))}var Me=function(){var ut=$.current.instance;if(y!=null&&ut&&Ve){var Rt=ut.getModel();Rt&&y!==Rt.getValue()&&(E=!0,Rt.setValue(y),ut.layout(),E=!1)}};Object(_.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){Me()},500)},[y,Ve,$.current]),Object(_.useEffect)(function(){if(q&&$.current&&$.current.instance){var lt=$.current.instance;lt.changeViewZones(function(Rt){var tt=document.createElement("div");tt.style.padding="10px 20px",tt.style.width="calc(100% - 20px)",tt.className="my-error-line-wrp",tt.innerHTML=te,Rt.addZone({afterLineNumber:q||11,heightInLines:3,domNode:tt})});var ut={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}};lt.addOverlayWidget(ut),lt.revealPositionInCenter({lineNumber:20,column:1})}},[q,$.current,Ve]);function Se(){var lt=$.current.instance;if(lt){var ut=lt.getSelection(),Rt=$.current.pastePos||{},tt=new t.Range(Rt.startLineNumber||ut.endLineNumber,Rt.startColumn||ut.endColumn,Rt.endLineNumber||ut.endLineNumber,Rt.endColumn||ut.endColumn);setTimeout(function(){lt.executeEdits("",[{range:tt,text:""}])},300)}}function Ye(lt){(window.navigator.platform.match("Mac")?lt.metaKey:lt.ctrlKey)&&lt.keyCode==83&&(lt.preventDefault(),ee())}var it=function(){if(ue&&$.current.instance){var ut=$.current.instance.getContentHeight();Ge(ut<b?b:ut)}else Ge(b)};function Ke(lt){var ut=document.createEvent("MouseEvents");ut.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),lt.dispatchEvent(ut)}function qe(lt,ut){var Rt=window.URL||window.webkitURL||window,tt=new Blob([ut]),nr=document.createElementNS("http://www.w3.org/1999/xhtml","a");nr.href=Rt.createObjectURL(tt),nr.download=lt,Ke(nr)}Object(_.useEffect)(function(){it()},[it]),Object(_.useEffect)(function(){X.current&&!Ve&&M.e(27).then(M.t.bind(null,"M/lh",7)).then(function(lt){try{t=lt,$.current.instance=t.editor.create(X.current,{value:y,language:l(k),theme:H,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},z);var ut=$.current.instance;if(ne(ut,t),setTimeout(function(){it(),$.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){qe(Q||"educoder.txt",ut.getValue())}})},500),$.current.subscription=ut.onDidChangeModelContent(function(tt){fe.current?clearTimeout(_e.current):(it(),ve(ut.getValue(),tt)),_e.current=setTimeout(function(){fe.current=!1},500)}),window.Monaco||n(t),Te&&(ut.addCommand(t.KeyMod.CtrlCmd|t.KeyMod.Shift|t.KeyCode.KEY_V,function(){return st(),null}),ut.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_C,function(){return st(),null})),window.Monaco=t,G&&ut.onDidBlurEditorWidget(function(){G(ut.getValue())}),Z&&ut.onDidFocusEditorText(function(){Z(ut.getValue())}),Te){ut.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_V,function(){return st(),null}),ut.onDidPaste(function(tt){$.current.pastePos=tt});try{window.addEventListener("paste",Se)}catch(tt){}}var Rt=at();return et(!0),function(){var tt=$.current.instance;tt.dispose();var nr=tt.getModel();nr&&nr.dispose(),$.current.subscription&&$.current.subscription.dispose(),Te&&window.removeEventListener("paste",Se),Rt.unobserve(X.current)}}catch(tt){}})},[]),Object(_.useEffect)(function(){var lt=$.current.instance;if(lt&&Ve)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[ee,Ve]),Object(_.useEffect)(function(){var lt=$.current.instance;if(lt&&Ve){var ut=l(k);t.editor.setModelLanguage(lt.getModel(),ut),console.log("language:",k,lt.getModel(),ut)}},[k,Ve]),Object(_.useEffect)(function(){var lt=$.current.instance;lt&&Ve&&t.editor.setTheme(H)},[H,Ve]),Object(_.useEffect)(function(){var lt=$.current.instance;lt&&Ve&&(lt.updateOptions(Object(D.a)({},K)),setTimeout(function(){lt.getModel().updateOptions(Object(D.a)({},K))},200))},[JSON.stringify(K),Ve]),Object(_.useEffect)(function(){var lt=$.current.instance;lt&&Ve&&lt.layout()},[O,b,Ve]);var ke=Object(_.useState)(v(O)),Oe=Object(d.a)(ke,2),Re=Oe[0],pe=Oe[1],Ee=Object(_.useState)(v(b)),we=Object(d.a)(Ee,2),De=we[0],Ge=we[1],nt=Object(D.a)(Object(D.a)({},I),{},{width:Re,height:De});return c.a.createElement("div",{className:"my-monaco-editor",ref:X,style:nt})};function w(s){var L=s.width,O=L===void 0?"100%":L,x=s.height,b=x===void 0?"100%":x,y=s.original,T=s.modified,k=s.language,N=s.options,I=N===void 0?{}:N,W=Object(_.useRef)(),K=Object(_.useState)(null),U=Object(d.a)(K,2),z=U[0],B=U[1];function H(ue){var xe;return W.current&&(xe=new o.default(function(Te){var se=Object(P.a)(Te),ve;try{for(se.s();!(ve=se.n()).done;){var de=ve.value;(de.target.offsetHeight>0||de.target.offsetWidth>0)&&ue.layout()}}catch(ne){se.e(ne)}finally{se.f()}}),xe.observe(W.current)),xe}Object(_.useEffect)(function(){W.current&&M.e(27).then(M.t.bind(null,"M/lh",7)).then(function(ue){t=ue;var xe=t.editor.createDiffEditor(W.current,Object(D.a)(Object(D.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},I),{},{wordWrap:!0}));B(xe);var Te=H(xe);return function(){xe.dispose();var se=xe.getModel();se&&se.dispose(),Te.unobserve(W.current)}})},[]),Object(_.useEffect)(function(){z&&z.setModel({original:t.editor.createModel(y,k),modified:t.editor.createModel(T,k)})},[y,T,k,z]);var G=v(O),ee=v(b),ie={width:G,height:ee};return c.a.createElement("div",{className:"my-diff-editor",ref:W,style:ie})}},ZpRC:function(j,Y,M){"use strict";function D(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function m(n,u){return(!u||n!=="hidden")&&n!=="visible"&&n!=="clip"}function S(n,u){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var p=getComputedStyle(n,null);return m(p.overflowY,u)||m(p.overflowX,u)||function(h){var v=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(E){return null}}(h);return!!v&&(v.clientHeight<h.scrollHeight||v.clientWidth<h.scrollWidth)}(n)}return!1}function P(n,u,p,h,v,g,E,a){return g<n&&E>u||g>n&&E<u?0:g<=n&&a<=p||E>=u&&a>=p?g-n-h:E>u&&a<p||g<n&&a>p?E-u+v:0}var d=function(n,u){var p=window,h=u.scrollMode,v=u.block,g=u.inline,E=u.boundary,a=u.skipOverflowHiddenElements,l=typeof E=="function"?E:function(X){return X!==E};if(!D(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,C=[],w=n;D(w)&&l(w);){if((w=w.parentElement)===t){C.push(w);break}w!=null&&w===document.body&&S(w)&&!S(document.documentElement)||w!=null&&S(w,a)&&C.push(w)}for(var s=p.visualViewport?p.visualViewport.width:innerWidth,L=p.visualViewport?p.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,b=n.getBoundingClientRect(),y=b.height,T=b.width,k=b.top,N=b.right,I=b.bottom,W=b.left,K=v==="start"||v==="nearest"?k:v==="end"?I:k+y/2,U=g==="center"?W+T/2:g==="end"?N:W,z=[],B=0;B<C.length;B++){var H=C[B],G=H.getBoundingClientRect(),ee=G.height,ie=G.width,ue=G.top,xe=G.right,Te=G.bottom,se=G.left;if(h==="if-needed"&&k>=0&&W>=0&&I<=L&&N<=s&&k>=ue&&I<=Te&&W>=se&&N<=xe)return z;var ve=getComputedStyle(H),de=parseInt(ve.borderLeftWidth,10),ne=parseInt(ve.borderTopWidth,10),ae=parseInt(ve.borderRightWidth,10),Z=parseInt(ve.borderBottomWidth,10),le=0,Q=0,q="offsetWidth"in H?H.offsetWidth-H.clientWidth-de-ae:0,be="offsetHeight"in H?H.offsetHeight-H.clientHeight-ne-Z:0;if(t===H)le=v==="start"?K:v==="end"?K-L:v==="nearest"?P(x,x+L,L,ne,Z,x+K,x+K+y,y):K-L/2,Q=g==="start"?U:g==="center"?U-s/2:g==="end"?U-s:P(O,O+s,s,de,ae,O+U,O+U+T,T),le=Math.max(0,le+x),Q=Math.max(0,Q+O);else{le=v==="start"?K-ue-ne:v==="end"?K-Te+Z+be:v==="nearest"?P(ue,Te,ee,ne,Z+be,K,K+y,y):K-(ue+ee/2)+be/2,Q=g==="start"?U-se-de:g==="center"?U-(se+ie/2)+q/2:g==="end"?U-xe+ae+q:P(se,xe,ie,de,ae+q,U,U+T,T);var te=H.scrollLeft,J=H.scrollTop;K+=J-(le=Math.max(0,Math.min(J+le,H.scrollHeight-ee+be))),U+=te-(Q=Math.max(0,Math.min(te+Q,H.scrollWidth-ie+q)))}z.push({el:H,top:le,left:Q})}return z};function f(n){return n===Object(n)&&Object.keys(n).length!==0}function _(n,u){u===void 0&&(u="auto");var p="scrollBehavior"in document.body.style;n.forEach(function(h){var v=h.el,g=h.top,E=h.left;v.scroll&&p?v.scroll({top:g,left:E,behavior:u}):(v.scrollTop=g,v.scrollLeft=E)})}function c(n){return n===!1?{block:"end",inline:"nearest"}:f(n)?n:{block:"start",inline:"nearest"}}function o(n,u){var p=!n.ownerDocument.documentElement.contains(n);if(f(u)&&typeof u.behavior=="function")return u.behavior(p?[]:d(n,u));if(p)return;var h=c(u);return _(d(n,h),h.behavior)}var i=Y.a=o},Zss7:function(j,Y,M){var D;(function(m){var S=/^\s+/,P=/\s+$/,d=0,f=m.round,_=m.min,c=m.max,o=m.random;function i(Z,le){if(Z=Z||"",le=le||{},Z instanceof i)return Z;if(!(this instanceof i))return new i(Z,le);var Q=n(Z);this._originalInput=Z,this._r=Q.r,this._g=Q.g,this._b=Q.b,this._a=Q.a,this._roundA=f(100*this._a)/100,this._format=le.format||Q.format,this._gradientType=le.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=Q.ok,this._tc_id=d++}i.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 Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),le,Q,q,be,te,J;return le=Z.r/255,Q=Z.g/255,q=Z.b/255,le<=.03928?be=le/12.92:be=m.pow((le+.055)/1.055,2.4),Q<=.03928?te=Q/12.92:te=m.pow((Q+.055)/1.055,2.4),q<=.03928?J=q/12.92:J=m.pow((q+.055)/1.055,2.4),.2126*be+.7152*te+.0722*J},setAlpha:function(Z){return this._a=z(Z),this._roundA=f(100*this._a)/100,this},toHsv:function(){var Z=v(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=v(this._r,this._g,this._b),le=f(Z.h*360),Q=f(Z.s*100),q=f(Z.v*100);return this._a==1?"hsv("+le+", "+Q+"%, "+q+"%)":"hsva("+le+", "+Q+"%, "+q+"%, "+this._roundA+")"},toHsl:function(){var Z=p(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=p(this._r,this._g,this._b),le=f(Z.h*360),Q=f(Z.s*100),q=f(Z.l*100);return this._a==1?"hsl("+le+", "+Q+"%, "+q+"%)":"hsla("+le+", "+Q+"%, "+q+"%, "+this._roundA+")"},toHex:function(Z){return E(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return a(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(B(this._r,255)*100)+"%",g:f(B(this._g,255)*100)+"%",b:f(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(B(this._r,255)*100)+"%, "+f(B(this._g,255)*100)+"%, "+f(B(this._b,255)*100)+"%)":"rgba("+f(B(this._r,255)*100)+"%, "+f(B(this._g,255)*100)+"%, "+f(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[E(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var le="#"+l(this._r,this._g,this._b,this._a),Q=le,q=this._gradientType?"GradientType = 1, ":"";if(Z){var be=i(Z);Q="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+q+"startColorstr="+le+",endColorstr="+Q+")"},toString:function(Z){var le=!!Z;Z=Z||this._format;var Q=!1,q=this._a<1&&this._a>=0,be=!le&&q&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return be?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(Q=this.toRgbString()),Z==="prgb"&&(Q=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(Q=this.toHexString()),Z==="hex3"&&(Q=this.toHexString(!0)),Z==="hex4"&&(Q=this.toHex8String(!0)),Z==="hex8"&&(Q=this.toHex8String()),Z==="name"&&(Q=this.toName()),Z==="hsl"&&(Q=this.toHslString()),Z==="hsv"&&(Q=this.toHsvString()),Q||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(Z,le){var Q=Z.apply(null,[this].concat([].slice.call(le)));return this._r=Q._r,this._g=Q._g,this._b=Q._b,this.setAlpha(Q._a),this},lighten:function(){return this._applyModification(s,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(C,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(Z,le){return Z.apply(null,[this].concat([].slice.call(le)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},i.fromRatio=function(Z,le){if(typeof Z=="object"){var Q={};for(var q in Z)Z.hasOwnProperty(q)&&(q==="a"?Q[q]=Z[q]:Q[q]=xe(Z[q]));Z=Q}return i(Z,le)};function n(Z){var le={r:0,g:0,b:0},Q=1,q=null,be=null,te=null,J=!1,X=!1;return typeof Z=="string"&&(Z=ne(Z)),typeof Z=="object"&&(de(Z.r)&&de(Z.g)&&de(Z.b)?(le=u(Z.r,Z.g,Z.b),J=!0,X=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):de(Z.h)&&de(Z.s)&&de(Z.v)?(q=xe(Z.s),be=xe(Z.v),le=g(Z.h,q,be),J=!0,X="hsv"):de(Z.h)&&de(Z.s)&&de(Z.l)&&(q=xe(Z.s),te=xe(Z.l),le=h(Z.h,q,te),J=!0,X="hsl"),Z.hasOwnProperty("a")&&(Q=Z.a)),Q=z(Q),{ok:J,format:Z.format||X,r:_(255,c(le.r,0)),g:_(255,c(le.g,0)),b:_(255,c(le.b,0)),a:Q}}function u(Z,le,Q){return{r:B(Z,255)*255,g:B(le,255)*255,b:B(Q,255)*255}}function p(Z,le,Q){Z=B(Z,255),le=B(le,255),Q=B(Q,255);var q=c(Z,le,Q),be=_(Z,le,Q),te,J,X=(q+be)/2;if(q==be)te=J=0;else{var $=q-be;J=X>.5?$/(2-q-be):$/(q+be);switch(q){case Z:te=(le-Q)/$+(le<Q?6:0);break;case le:te=(Q-Z)/$+2;break;case Q:te=(Z-le)/$+4;break}te/=6}return{h:te,s:J,l:X}}function h(Z,le,Q){var q,be,te;Z=B(Z,360),le=B(le,100),Q=B(Q,100);function J(ge,fe,_e){return _e<0&&(_e+=1),_e>1&&(_e-=1),_e<1/6?ge+(fe-ge)*6*_e:_e<1/2?fe:_e<2/3?ge+(fe-ge)*(2/3-_e)*6:ge}if(le===0)q=be=te=Q;else{var X=Q<.5?Q*(1+le):Q+le-Q*le,$=2*Q-X;q=J($,X,Z+1/3),be=J($,X,Z),te=J($,X,Z-1/3)}return{r:q*255,g:be*255,b:te*255}}function v(Z,le,Q){Z=B(Z,255),le=B(le,255),Q=B(Q,255);var q=c(Z,le,Q),be=_(Z,le,Q),te,J,X=q,$=q-be;if(J=q===0?0:$/q,q==be)te=0;else{switch(q){case Z:te=(le-Q)/$+(le<Q?6:0);break;case le:te=(Q-Z)/$+2;break;case Q:te=(Z-le)/$+4;break}te/=6}return{h:te,s:J,v:X}}function g(Z,le,Q){Z=B(Z,360)*6,le=B(le,100),Q=B(Q,100);var q=m.floor(Z),be=Z-q,te=Q*(1-le),J=Q*(1-be*le),X=Q*(1-(1-be)*le),$=q%6,ge=[Q,J,te,te,X,Q][$],fe=[X,Q,Q,J,te,te][$],_e=[te,te,X,Q,Q,J][$];return{r:ge*255,g:fe*255,b:_e*255}}function E(Z,le,Q,q){var be=[ue(f(Z).toString(16)),ue(f(le).toString(16)),ue(f(Q).toString(16))];return q&&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 a(Z,le,Q,q,be){var te=[ue(f(Z).toString(16)),ue(f(le).toString(16)),ue(f(Q).toString(16)),ue(Te(q))];return be&&te[0].charAt(0)==te[0].charAt(1)&&te[1].charAt(0)==te[1].charAt(1)&&te[2].charAt(0)==te[2].charAt(1)&&te[3].charAt(0)==te[3].charAt(1)?te[0].charAt(0)+te[1].charAt(0)+te[2].charAt(0)+te[3].charAt(0):te.join("")}function l(Z,le,Q,q){var be=[ue(Te(q)),ue(f(Z).toString(16)),ue(f(le).toString(16)),ue(f(Q).toString(16))];return be.join("")}i.equals=function(Z,le){return!Z||!le?!1:i(Z).toRgbString()==i(le).toRgbString()},i.random=function(){return i.fromRatio({r:o(),g:o(),b:o()})};function t(Z,le){le=le===0?0:le||10;var Q=i(Z).toHsl();return Q.s-=le/100,Q.s=H(Q.s),i(Q)}function C(Z,le){le=le===0?0:le||10;var Q=i(Z).toHsl();return Q.s+=le/100,Q.s=H(Q.s),i(Q)}function w(Z){return i(Z).desaturate(100)}function s(Z,le){le=le===0?0:le||10;var Q=i(Z).toHsl();return Q.l+=le/100,Q.l=H(Q.l),i(Q)}function L(Z,le){le=le===0?0:le||10;var Q=i(Z).toRgb();return Q.r=c(0,_(255,Q.r-f(255*-(le/100)))),Q.g=c(0,_(255,Q.g-f(255*-(le/100)))),Q.b=c(0,_(255,Q.b-f(255*-(le/100)))),i(Q)}function O(Z,le){le=le===0?0:le||10;var Q=i(Z).toHsl();return Q.l-=le/100,Q.l=H(Q.l),i(Q)}function x(Z,le){var Q=i(Z).toHsl(),q=(Q.h+le)%360;return Q.h=q<0?360+q:q,i(Q)}function b(Z){var le=i(Z).toHsl();return le.h=(le.h+180)%360,i(le)}function y(Z){var le=i(Z).toHsl(),Q=le.h;return[i(Z),i({h:(Q+120)%360,s:le.s,l:le.l}),i({h:(Q+240)%360,s:le.s,l:le.l})]}function T(Z){var le=i(Z).toHsl(),Q=le.h;return[i(Z),i({h:(Q+90)%360,s:le.s,l:le.l}),i({h:(Q+180)%360,s:le.s,l:le.l}),i({h:(Q+270)%360,s:le.s,l:le.l})]}function k(Z){var le=i(Z).toHsl(),Q=le.h;return[i(Z),i({h:(Q+72)%360,s:le.s,l:le.l}),i({h:(Q+216)%360,s:le.s,l:le.l})]}function N(Z,le,Q){le=le||6,Q=Q||30;var q=i(Z).toHsl(),be=360/Q,te=[i(Z)];for(q.h=(q.h-(be*le>>1)+720)%360;--le;)q.h=(q.h+be)%360,te.push(i(q));return te}function I(Z,le){le=le||6;for(var Q=i(Z).toHsv(),q=Q.h,be=Q.s,te=Q.v,J=[],X=1/le;le--;)J.push(i({h:q,s:be,v:te})),te=(te+X)%1;return J}i.mix=function(Z,le,Q){Q=Q===0?0:Q||50;var q=i(Z).toRgb(),be=i(le).toRgb(),te=Q/100,J={r:(be.r-q.r)*te+q.r,g:(be.g-q.g)*te+q.g,b:(be.b-q.b)*te+q.b,a:(be.a-q.a)*te+q.a};return i(J)},i.readability=function(Z,le){var Q=i(Z),q=i(le);return(m.max(Q.getLuminance(),q.getLuminance())+.05)/(m.min(Q.getLuminance(),q.getLuminance())+.05)},i.isReadable=function(Z,le,Q){var q=i.readability(Z,le),be,te;te=!1,be=ae(Q);switch(be.level+be.size){case"AAsmall":case"AAAlarge":te=q>=4.5;break;case"AAlarge":te=q>=3;break;case"AAAsmall":te=q>=7;break}return te},i.mostReadable=function(Z,le,Q){var q=null,be=0,te,J,X,$;Q=Q||{},J=Q.includeFallbackColors,X=Q.level,$=Q.size;for(var ge=0;ge<le.length;ge++)te=i.readability(Z,le[ge]),te>be&&(be=te,q=i(le[ge]));return i.isReadable(Z,q,{level:X,size:$})||!J?q:(Q.includeFallbackColors=!1,i.mostReadable(Z,["#fff","#000"],Q))};var W=i.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"},K=i.hexNames=U(W);function U(Z){var le={};for(var Q in Z)Z.hasOwnProperty(Q)&&(le[Z[Q]]=Q);return le}function z(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function B(Z,le){ee(Z)&&(Z="100%");var Q=ie(Z);return Z=_(le,c(0,parseFloat(Z))),Q&&(Z=parseInt(Z*le,10)/100),m.abs(Z-le)<1e-6?1:Z%le/parseFloat(le)}function H(Z){return _(1,c(0,Z))}function G(Z){return parseInt(Z,16)}function ee(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function ie(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ue(Z){return Z.length==1?"0"+Z:""+Z}function xe(Z){return Z<=1&&(Z=Z*100+"%"),Z}function Te(Z){return m.round(parseFloat(Z)*255).toString(16)}function se(Z){return G(Z)/255}var ve=function(){var Z="[-\\+]?\\d+%?",le="[-\\+]?\\d*\\.\\d+%?",Q="(?:"+le+")|(?:"+Z+")",q="[\\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"+q),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+q),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 de(Z){return!!ve.CSS_UNIT.exec(Z)}function ne(Z){Z=Z.replace(S,"").replace(P,"").toLowerCase();var le=!1;if(W[Z])Z=W[Z],le=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Q;return(Q=ve.rgb.exec(Z))?{r:Q[1],g:Q[2],b:Q[3]}:(Q=ve.rgba.exec(Z))?{r:Q[1],g:Q[2],b:Q[3],a:Q[4]}:(Q=ve.hsl.exec(Z))?{h:Q[1],s:Q[2],l:Q[3]}:(Q=ve.hsla.exec(Z))?{h:Q[1],s:Q[2],l:Q[3],a:Q[4]}:(Q=ve.hsv.exec(Z))?{h:Q[1],s:Q[2],v:Q[3]}:(Q=ve.hsva.exec(Z))?{h:Q[1],s:Q[2],v:Q[3],a:Q[4]}:(Q=ve.hex8.exec(Z))?{r:G(Q[1]),g:G(Q[2]),b:G(Q[3]),a:se(Q[4]),format:le?"name":"hex8"}:(Q=ve.hex6.exec(Z))?{r:G(Q[1]),g:G(Q[2]),b:G(Q[3]),format:le?"name":"hex"}:(Q=ve.hex4.exec(Z))?{r:G(Q[1]+""+Q[1]),g:G(Q[2]+""+Q[2]),b:G(Q[3]+""+Q[3]),a:se(Q[4]+""+Q[4]),format:le?"name":"hex8"}:(Q=ve.hex3.exec(Z))?{r:G(Q[1]+""+Q[1]),g:G(Q[2]+""+Q[2]),b:G(Q[3]+""+Q[3]),format:le?"name":"hex"}:!1}function ae(Z){var le,Q;return Z=Z||{level:"AA",size:"small"},le=(Z.level||"AA").toUpperCase(),Q=(Z.size||"small").toLowerCase(),le!=="AA"&&le!=="AAA"&&(le="AA"),Q!=="small"&&Q!=="large"&&(Q="small"),{level:le,size:Q}}j.exports?j.exports=i:!(D=function(){return i}.call(Y,M,Y,j),D!==void 0&&(j.exports=D))})(Math)},aRTE:function(j,Y){j.exports={L:1,M:0,Q:3,H:2}},bQjk:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return function(m){var S=D,P=S.lib,d=P.CipherParams,f=S.enc,_=f.Hex,c=S.format,o=c.Hex={stringify:function(i){return i.ciphertext.toString(_)},parse:function(i){var n=_.parse(i);return d.create({ciphertext:n})}}}(),D.format.Hex})},bT9E:function(j,Y,M){"use strict";M.d(Y,"a",function(){return m});var D=M("VTBJ");function m(S,P){var d=Object(D.a)({},S);return Array.isArray(P)&&P.forEach(function(f){delete d[f]}),d}},biw7:function(j,Y,M){"use strict";var D=M("cDcd"),m=M.n(D),S=D.createContext(null);Y.a=S},c5Ni:function(j,Y,M){},cv67:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,d=P.WordArray,f=P.Hasher,_=S.algo,c=[];(function(){for(var h=0;h<64;h++)c[h]=m.abs(m.sin(h+1))*4294967296|0})();var o=_.MD5=f.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,v){for(var g=0;g<16;g++){var E=v+g,a=h[E];h[E]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var l=this._hash.words,t=h[v+0],C=h[v+1],w=h[v+2],s=h[v+3],L=h[v+4],O=h[v+5],x=h[v+6],b=h[v+7],y=h[v+8],T=h[v+9],k=h[v+10],N=h[v+11],I=h[v+12],W=h[v+13],K=h[v+14],U=h[v+15],z=l[0],B=l[1],H=l[2],G=l[3];z=i(z,B,H,G,t,7,c[0]),G=i(G,z,B,H,C,12,c[1]),H=i(H,G,z,B,w,17,c[2]),B=i(B,H,G,z,s,22,c[3]),z=i(z,B,H,G,L,7,c[4]),G=i(G,z,B,H,O,12,c[5]),H=i(H,G,z,B,x,17,c[6]),B=i(B,H,G,z,b,22,c[7]),z=i(z,B,H,G,y,7,c[8]),G=i(G,z,B,H,T,12,c[9]),H=i(H,G,z,B,k,17,c[10]),B=i(B,H,G,z,N,22,c[11]),z=i(z,B,H,G,I,7,c[12]),G=i(G,z,B,H,W,12,c[13]),H=i(H,G,z,B,K,17,c[14]),B=i(B,H,G,z,U,22,c[15]),z=n(z,B,H,G,C,5,c[16]),G=n(G,z,B,H,x,9,c[17]),H=n(H,G,z,B,N,14,c[18]),B=n(B,H,G,z,t,20,c[19]),z=n(z,B,H,G,O,5,c[20]),G=n(G,z,B,H,k,9,c[21]),H=n(H,G,z,B,U,14,c[22]),B=n(B,H,G,z,L,20,c[23]),z=n(z,B,H,G,T,5,c[24]),G=n(G,z,B,H,K,9,c[25]),H=n(H,G,z,B,s,14,c[26]),B=n(B,H,G,z,y,20,c[27]),z=n(z,B,H,G,W,5,c[28]),G=n(G,z,B,H,w,9,c[29]),H=n(H,G,z,B,b,14,c[30]),B=n(B,H,G,z,I,20,c[31]),z=u(z,B,H,G,O,4,c[32]),G=u(G,z,B,H,y,11,c[33]),H=u(H,G,z,B,N,16,c[34]),B=u(B,H,G,z,K,23,c[35]),z=u(z,B,H,G,C,4,c[36]),G=u(G,z,B,H,L,11,c[37]),H=u(H,G,z,B,b,16,c[38]),B=u(B,H,G,z,k,23,c[39]),z=u(z,B,H,G,W,4,c[40]),G=u(G,z,B,H,t,11,c[41]),H=u(H,G,z,B,s,16,c[42]),B=u(B,H,G,z,x,23,c[43]),z=u(z,B,H,G,T,4,c[44]),G=u(G,z,B,H,I,11,c[45]),H=u(H,G,z,B,U,16,c[46]),B=u(B,H,G,z,w,23,c[47]),z=p(z,B,H,G,t,6,c[48]),G=p(G,z,B,H,b,10,c[49]),H=p(H,G,z,B,K,15,c[50]),B=p(B,H,G,z,O,21,c[51]),z=p(z,B,H,G,I,6,c[52]),G=p(G,z,B,H,s,10,c[53]),H=p(H,G,z,B,k,15,c[54]),B=p(B,H,G,z,C,21,c[55]),z=p(z,B,H,G,y,6,c[56]),G=p(G,z,B,H,U,10,c[57]),H=p(H,G,z,B,x,15,c[58]),B=p(B,H,G,z,W,21,c[59]),z=p(z,B,H,G,L,6,c[60]),G=p(G,z,B,H,N,10,c[61]),H=p(H,G,z,B,w,15,c[62]),B=p(B,H,G,z,T,21,c[63]),l[0]=l[0]+z|0,l[1]=l[1]+B|0,l[2]=l[2]+H|0,l[3]=l[3]+G|0},_doFinalize:function(){var h=this._data,v=h.words,g=this._nDataBytes*8,E=h.sigBytes*8;v[E>>>5]|=128<<24-E%32;var a=m.floor(g/4294967296),l=g;v[(E+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,v[(E+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h.sigBytes=(v.length+1)*4,this._process();for(var t=this._hash,C=t.words,w=0;w<4;w++){var s=C[w];C[w]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return t},clone:function(){var h=f.clone.call(this);return h._hash=this._hash.clone(),h}});function i(h,v,g,E,a,l,t){var C=h+(v&g|~v&E)+a+t;return(C<<l|C>>>32-l)+v}function n(h,v,g,E,a,l,t){var C=h+(v&E|g&~E)+a+t;return(C<<l|C>>>32-l)+v}function u(h,v,g,E,a,l,t){var C=h+(v^g^E)+a+t;return(C<<l|C>>>32-l)+v}function p(h,v,g,E,a,l,t){var C=h+(g^(v|~E))+a+t;return(C<<l|C>>>32-l)+v}S.MD5=f._createHelper(o),S.HmacMD5=f._createHmacHelper(o)}(Math),D.MD5})},dQei:function(j,Y){for(var M={glog:function(m){if(m<1)throw new Error("glog("+m+")");return M.LOG_TABLE[m]},gexp:function(m){for(;m<0;)m+=255;for(;m>=256;)m-=255;return M.EXP_TABLE[m]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},D=0;D<8;D++)M.EXP_TABLE[D]=1<<D;for(var D=8;D<256;D++)M.EXP_TABLE[D]=M.EXP_TABLE[D-4]^M.EXP_TABLE[D-5]^M.EXP_TABLE[D-6]^M.EXP_TABLE[D-8];for(var D=0;D<255;D++)M.LOG_TABLE[M.EXP_TABLE[D]]=D;j.exports=M},dWSS:function(j,Y,M){var D=M("dQei");function m(S,P){if(S.length==null)throw new Error(S.length+"/"+P);for(var d=0;d<S.length&&S[d]==0;)d++;this.num=new Array(S.length-d+P);for(var f=0;f<S.length-d;f++)this.num[f]=S[f+d]}m.prototype={get:function(S){return this.num[S]},getLength:function(){return this.num.length},multiply:function(S){for(var P=new Array(this.getLength()+S.getLength()-1),d=0;d<this.getLength();d++)for(var f=0;f<S.getLength();f++)P[d+f]^=D.gexp(D.glog(this.get(d))+D.glog(S.get(f)));return new m(P,0)},mod:function(S){if(this.getLength()-S.getLength()<0)return this;for(var P=D.glog(this.get(0))-D.glog(S.get(0)),d=new Array(this.getLength()),f=0;f<this.getLength();f++)d[f]=this.get(f);for(var f=0;f<S.getLength();f++)d[f]^=D.gexp(D.glog(S.get(f))+P);return new m(d,0).mod(S)}},j.exports=m},dejd:function(j,Y,M){},dmUQ:function(j,Y,M){"use strict";var D=M("Ff2n"),m=M("rePB"),S=M("1OyB"),P=M("vuIU"),d=M("Ji7U"),f=M("md7G"),_=M("foSv"),c=M("cDcd"),o=M.n(c),i=M("TSYQ"),n=M.n(i),u=M("4IlW");function p(y,T){var k=Object.keys(y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(y);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(y,I).enumerable})),k.push.apply(k,N)}return k}function h(y){for(var T=1;T<arguments.length;T++){var k=arguments[T]!=null?arguments[T]:{};T%2?p(Object(k),!0).forEach(function(N){Object(m.a)(y,N,k[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(k)):p(Object(k)).forEach(function(N){Object.defineProperty(y,N,Object.getOwnPropertyDescriptor(k,N))})}return y}function v(y){var T=g();return function(){var N=Object(_.a)(y),I;if(T){var W=Object(_.a)(this).constructor;I=Reflect.construct(N,arguments,W)}else I=N.apply(this,arguments);return Object(f.a)(this,I)}}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 a(y){y.preventDefault()}var l=function(T){return T.replace(/[^\w.-]+/g,"")},t=200,C=600,w=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,s=function(T){return T!=null},L=function(T,k){return k===T||typeof k=="number"&&typeof T=="number"&&isNaN(k)&&isNaN(T)},O=function(y){Object(d.a)(k,y);var T=v(k);function k(N){var I;Object(S.a)(this,k),I=T.call(this,N),I.onKeyDown=function(U){var z=I.props,B=z.onKeyDown,H=z.onPressEnter;if(U.keyCode===u.a.UP){var G=I.getRatio(U);I.up(U,G,null),I.stop()}else if(U.keyCode===u.a.DOWN){var ee=I.getRatio(U);I.down(U,ee,null),I.stop()}else U.keyCode===u.a.ENTER&&H&&H(U);if(I.recordCursorPosition(),I.lastKeyCode=U.keyCode,B){for(var ie=arguments.length,ue=new Array(ie>1?ie-1:0),xe=1;xe<ie;xe++)ue[xe-1]=arguments[xe];B.apply(void 0,[U].concat(ue))}},I.onKeyUp=function(U){var z=I.props.onKeyUp;if(I.stop(),I.recordCursorPosition(),z){for(var B=arguments.length,H=new Array(B>1?B-1:0),G=1;G<B;G++)H[G-1]=arguments[G];z.apply(void 0,[U].concat(H))}},I.onChange=function(U){var z=I.props.onChange;I.state.focused&&(I.inputting=!0),I.rawInput=I.props.parser(I.getValueFromEvent(U)),I.setState({inputValue:I.rawInput}),z(I.toNumber(I.rawInput))},I.onMouseUp=function(){var U=I.props.onMouseUp;I.recordCursorPosition(),U&&U.apply(void 0,arguments)},I.onFocus=function(){var U;I.setState({focused:!0}),(U=I.props).onFocus.apply(U,arguments)},I.onBlur=function(){var U=I.props.onBlur;I.inputting=!1,I.setState({focused:!1});var z=I.getCurrentValidValue(I.state.inputValue),B=I.setValue(z,E);if(U){var H=I.input.value,G=I.getInputDisplayValue({focus:!1,value:B});I.input.value=G&&Number(G),U.apply(void 0,arguments),I.input.value=H}},I.getRatio=function(U){var z=1;return U.metaKey||U.ctrlKey?z=.1:U.shiftKey&&(z=10),z},I.getFullNum=function(U){return isNaN(U)?U:/e/i.test(String(U))?Number(U).toFixed(18).replace(/\.?0+$/,""):U},I.getPrecision=function(U){if(s(I.props.precision))return I.props.precision;var z=String(U);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var B=0;return z.indexOf(".")>=0&&(B=z.length-z.indexOf(".")-1),B},I.getInputDisplayValue=function(U){var z=U||I.state,B=z.focused,H=z.inputValue,G=z.value,ee;B?ee=H:ee=I.toPrecisionAsStep(G),ee==null&&(ee="");var ie=I.formatWrapper(ee);return s(I.props.decimalSeparator)&&(ie=ie.toString().replace(".",I.props.decimalSeparator)),ie},I.recordCursorPosition=function(){try{I.cursorStart=I.input.selectionStart,I.cursorEnd=I.input.selectionEnd,I.currentValue=I.input.value,I.cursorBefore=I.input.value.substring(0,I.cursorStart),I.cursorAfter=I.input.value.substring(I.cursorEnd)}catch(U){}},I.restoreByAfter=function(U){if(U===void 0)return!1;var z=I.input.value,B=z.lastIndexOf(U);if(B===-1)return!1;var H=I.cursorBefore.length;return I.lastKeyCode===u.a.DELETE&&I.cursorBefore.charAt(H-1)===U[0]?(I.fixCaret(H,H),!0):B+U.length===z.length?(I.fixCaret(B,B),!0):!1},I.partRestoreByAfter=function(U){return U===void 0?!1:Array.prototype.some.call(U,function(z,B){var H=U.substring(B);return I.restoreByAfter(H)})},I.isNotCompleteNumber=function(U){return isNaN(U)||U===""||U===null||U&&U.toString().indexOf(".")===U.toString().length-1},I.stop=function(){I.autoStepTimer&&clearTimeout(I.autoStepTimer)},I.down=function(U,z,B){I.pressingUpOrDown=!0,I.step("down",U,z,B)},I.up=function(U,z,B){I.pressingUpOrDown=!0,I.step("up",U,z,B)},I.saveInput=function(U){I.input=U};var W=N.value;W===void 0&&(W=N.defaultValue),I.state={focused:N.autoFocus};var K=I.getValidValue(I.toNumber(W));return I.state=h(h({},I.state),{},{inputValue:I.toPrecisionAsStep(K),value:K}),I}return Object(P.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(I){var W=this.props,K=W.value,U=W.onChange,z=W.max,B=W.min,H=this.state.focused;if(I){if(!L(I.value,K)||!L(I.max,z)||!L(I.min,B)){var G=H?K:this.getValidValue(K),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?K:this.state.value;"max"in this.props&&I.max!==z&&typeof ie=="number"&&ie>z&&U&&U(z),"min"in this.props&&I.min!==B&&typeof ie=="number"&&ie<B&&U&&U(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ue=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?ue=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(ue=this.cursorStart):ue=this.input.value.length,this.fixCaret(ue,ue)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(xe){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(I){var W=I;return W===""?W="":this.isNotCompleteNumber(parseFloat(W))?W=this.state.value:W=this.getValidValue(W),this.toNumber(W)}},{key:"getValueFromEvent",value:function(I){var W=I.target.value.trim().replace(/。/g,".");return s(this.props.decimalSeparator)&&(W=W.replace(this.props.decimalSeparator,".")),W}},{key:"getValidValue",value:function(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,U=parseFloat(I);return isNaN(U)?I:(U<W&&(U=W),U>K&&(U=K),U)}},{key:"setValue",value:function(I,W){var K=this.props.precision,U=this.isNotCompleteNumber(parseFloat(I))?null:parseFloat(I),z=this.state.value,B=z===void 0?null:z,H=this.state.inputValue,G=H===void 0?null:H,ee=typeof U=="number"?U.toFixed(K):"".concat(U),ie=U!==B||ee!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},W)):this.setState({value:U,inputValue:this.toPrecisionAsStep(I)},W),ie&&this.props.onChange(U),U}},{key:"getMaxPrecision",value:function(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,U=K.precision,z=K.step;if(s(U))return U;var B=this.getPrecision(W),H=this.getPrecision(z),G=this.getPrecision(I);return I?Math.max(G,B+H):B+H}},{key:"getPrecisionFactor",value:function(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(I,W);return Math.pow(10,K)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(I){return this.props.formatter?this.props.formatter(I):I}},{key:"toPrecisionAsStep",value:function(I){if(this.isNotCompleteNumber(I)||I==="")return I;var W=Math.abs(this.getMaxPrecision(I));return isNaN(W)?I.toString():Number(I).toFixed(W)}},{key:"toNumber",value:function(I){var W=this.props.precision,K=this.state.focused,U=I&&I.length>16&&K;return this.isNotCompleteNumber(I)||U?I:s(W)?Math.round(I*Math.pow(10,W))/Math.pow(10,W):Number(I)}},{key:"upStep",value:function(I,W){var K=this.props.step,U=this.getPrecisionFactor(I,W),z=Math.abs(this.getMaxPrecision(I,W)),B=((U*I+U*K*W)/U).toFixed(z);return this.toNumber(B)}},{key:"downStep",value:function(I,W){var K=this.props.step,U=this.getPrecisionFactor(I,W),z=Math.abs(this.getMaxPrecision(I,W)),B=((U*I-U*K*W)/U).toFixed(z);return this.toNumber(B)}},{key:"step",value:function(I,W){var K=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),W&&(W.persist(),W.preventDefault());var B=this.props;if(B.disabled)return;var H=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(H))return;var G=this["".concat(I,"Step")](H,U),ee=G>B.max||G<B.min;if(G>B.max?G=B.max:G<B.min&&(G=B.min),this.setValue(G,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){K[I](W,U,!0)},z?t:C)}},{key:"fixCaret",value:function(I,W){if(I===void 0||W===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,U=this.input.selectionEnd;(I!==K||W!==U)&&this.input.setSelectionRange(I,W)}catch(z){}}},{key:"render",value:function(){var I,W=this.props,K=W.prefixCls,U=W.disabled,z=W.readOnly,B=W.useTouch,H=W.autoComplete,G=W.upHandler,ee=W.downHandler,ie=W.className,ue=W.max,xe=W.min,Te=W.style,se=W.title,ve=W.onMouseEnter,de=W.onMouseLeave,ne=W.onMouseOver,ae=W.onMouseOut,Z=W.required,le=W.onClick,Q=W.tabIndex,q=W.type,be=W.placeholder,te=W.id,J=W.inputMode,X=W.pattern,$=W.step,ge=W.maxLength,fe=W.autoFocus,_e=W.name,He=W.onPaste,$e=W.onInput,Ve=Object(D.a)(W,["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"]),et=this.state,at=et.value,st=et.focused,Me=n()(K,(I={},Object(m.a)(I,ie,!!ie),Object(m.a)(I,"".concat(K,"-disabled"),U),Object(m.a)(I,"".concat(K,"-focused"),st),I)),Se={};Object.keys(Ve).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Se[De]=Ve[De])});var Ye=!z&&!U,it=this.getInputDisplayValue(null),Ke=(at||at===0)&&(isNaN(at)||Number(at)>=ue),qe=(at||at===0)&&(isNaN(at)||Number(at)<=xe),ke=Ke||U||z,Oe=qe||U||z,Re=n()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(m.a)({},"".concat(K,"-handler-up-disabled"),ke)),pe=n()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(m.a)({},"".concat(K,"-handler-down-disabled"),Oe)),Ee=B?{onTouchStart:ke?E:this.up,onTouchEnd:this.stop}:{onMouseDown:ke?E:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},we=B?{onTouchStart:Oe?E:this.down,onTouchEnd:this.stop}:{onMouseDown:Oe?E:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:Me,style:Te,title:se,onMouseEnter:ve,onMouseLeave:de,onMouseOver:ne,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(K,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":ke,className:Re}),G||o.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:a})),o.a.createElement("span",Object.assign({unselectable:"on"},we,{role:"button","aria-label":"Decrease Value","aria-disabled":Oe,className:pe}),ee||o.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:a}))),o.a.createElement("div",{className:"".concat(K,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":xe,"aria-valuemax":ue,"aria-valuenow":at,required:Z,type:q,placeholder:be,onPaste:He,onClick:le,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:Q,autoComplete:H,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ye?this.onKeyDown:E,onKeyUp:Ye?this.onKeyUp:E,autoFocus:fe,maxLength:ge,readOnly:z,disabled:U,max:ue,min:xe,step:$,name:_e,title:se,id:te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(it),pattern:X,inputMode:J,onInput:$e},Se))))}}]),k}(o.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:E,onKeyDown:E,onPressEnter:E,onFocus:E,onBlur:E,parser:l,required:!1,autoComplete:"off"};var x=O,b=Y.a=x},e7zE:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("3y9D"),M("WYAk"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.Base,d=S.WordArray,f=m.algo,_=f.SHA1,c=f.HMAC,o=f.PBKDF2=P.extend({cfg:P.extend({keySize:128/32,hasher:_,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,n){for(var u=this.cfg,p=c.create(u.hasher,i),h=d.create(),v=d.create([1]),g=h.words,E=v.words,a=u.keySize,l=u.iterations;g.length<a;){var t=p.update(n).finalize(v);p.reset();for(var C=t.words,w=C.length,s=t,L=1;L<l;L++){s=p.finalize(s),p.reset();for(var O=s.words,x=0;x<w;x++)C[x]^=O[x]}h.concat(t),E[0]++}return h.sigBytes=a*4,h}});m.PBKDF2=function(i,n,u){return o.create(u).compute(i,n)}}(),D.PBKDF2})},f4xo:function(j,Y,M){var D=M("nVVt");function m(S){this.mode=D.MODE_8BIT_BYTE,this.data=S}m.prototype={getLength:function(S){return this.data.length},write:function(S){for(var P=0;P<this.data.length;P++)S.put(this.data.charCodeAt(P),8)}},j.exports=m},fyJ8:function(j,Y,M){"use strict";var D=M("rePB"),m=M("VTBJ"),S=M("Ff2n"),P=M("U8pU"),d=M("cDcd"),f=M.n(d),_=M("TSYQ"),c=M.n(_),o=M("c+Xe"),i=M("sR1s");function n(g){return g&&Object(P.a)(g)==="object"&&!Array.isArray(g)&&!d.isValidElement(g)}function u(g){return typeof g=="string"?!0:Object(o.c)(g)}function p(g,E){var a,l=g.prefixCls,t=g.className,C=g.record,w=g.index,s=g.dataIndex,L=g.render,O=g.children,x=g.component,b=x===void 0?"td":x,y=g.colSpan,T=g.rowSpan,k=g.fixLeft,N=g.fixRight,I=g.firstFixLeft,W=g.lastFixLeft,K=g.firstFixRight,U=g.lastFixRight,z=g.appendNode,B=g.additionalProps,H=B===void 0?{}:B,G=g.ellipsis,ee=g.align,ie=g.rowType,ue=g.isSticky,xe="".concat(l,"-cell"),Te,se;if(O)se=O;else{var ve=Object(i.b)(C,s);if(se=ve,L){var de=L(ve,C,w);n(de)?(se=de.children,Te=de.props):se=de}}Object(P.a)(se)==="object"&&!Array.isArray(se)&&!d.isValidElement(se)&&(se=null),G&&(W||K)&&(se=d.createElement("span",{className:"".concat(xe,"-content")},se));var ne=Te||{},ae=ne.colSpan,Z=ne.rowSpan,le=ne.style,Q=ne.className,q=Object(S.a)(ne,["colSpan","rowSpan","style","className"]),be=ae!==void 0?ae:y,te=Z!==void 0?Z:T;if(be===0||te===0)return null;var J={},X=typeof k=="number",$=typeof N=="number";X&&(J.position="sticky",J.left=k),$&&(J.position="sticky",J.right=N);var ge={};ee&&(ge.textAlign=ee);var fe,_e=G===!0?{showTitle:!0}:G;_e&&(_e.showTitle||ie==="header")&&(typeof se=="string"||typeof se=="number"?fe=se.toString():d.isValidElement(se)&&typeof se.props.children=="string"&&(fe=se.props.children));var He=Object(m.a)(Object(m.a)(Object(m.a)({title:fe},q),H),{},{colSpan:be&&be!==1?be:null,rowSpan:te&&te!==1?te:null,className:c()(xe,t,(a={},Object(D.a)(a,"".concat(xe,"-fix-left"),X),Object(D.a)(a,"".concat(xe,"-fix-left-first"),I),Object(D.a)(a,"".concat(xe,"-fix-left-last"),W),Object(D.a)(a,"".concat(xe,"-fix-right"),$),Object(D.a)(a,"".concat(xe,"-fix-right-first"),K),Object(D.a)(a,"".concat(xe,"-fix-right-last"),U),Object(D.a)(a,"".concat(xe,"-ellipsis"),G),Object(D.a)(a,"".concat(xe,"-with-append"),z),Object(D.a)(a,"".concat(xe,"-fix-sticky"),(X||$)&&ue),a),H.className,Q),style:Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},H.style),ge),J),le),ref:u(b)?E:null});return d.createElement(b,Object.assign({},He),z,se)}var h=d.forwardRef(p);h.displayName="Cell";var v=d.memo(h,function(g,E){return E.shouldCellUpdate?!E.shouldCellUpdate(E.record,g.record):!1});Y.a=v},gJ3r:function(j,Y,M){"use strict";M.d(Y,"a",function(){return D});var D=[{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,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.mode.ECB=function(){var m=D.lib.BlockCipherMode.extend();return m.Encryptor=m.extend({processBlock:function(S,P){this._cipher.encryptBlock(S,P)}}),m.Decryptor=m.extend({processBlock:function(S,P){this._cipher.decryptBlock(S,P)}}),m}(),D.mode.ECB})},h78n:function(j,Y,M){"use strict";M.d(Y,"a",function(){return I});var D=M("cDcd"),m=M.n(D),S=M("TSYQ"),P=M.n(S),d={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},f=function(U){var z=U.map(function(){return Object(D.useRef)()}),B=Object(D.useRef)();return Object(D.useEffect)(function(){var H=Date.now(),G=!1;Object.keys(z).forEach(function(ee){var ie=z[ee].current;if(!ie)return;G=!0;var ue=ie.style;ue.transitionDuration=".3s, .3s, .3s, .06s",B.current&&H-B.current<100&&(ue.transitionDuration="0s, 0s")}),G&&(B.current=Date.now())}),[z]};function _(){return _=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var z=arguments[U];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},_.apply(this,arguments)}function c(K,U){return p(K)||u(K,U)||i(K,U)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(K,U){if(!K)return;if(typeof K=="string")return n(K,U);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return n(K,U)}function n(K,U){(U==null||U>K.length)&&(U=K.length);for(var z=0,B=new Array(U);z<U;z++)B[z]=K[z];return B}function u(K,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,H=!1,G=void 0;try{for(var ee=K[Symbol.iterator](),ie;!(B=(ie=ee.next()).done)&&!(z.push(ie.value),U&&z.length===U);B=!0);}catch(ue){H=!0,G=ue}finally{try{!B&&ee.return!=null&&ee.return()}finally{if(H)throw G}}return z}function p(K){if(Array.isArray(K))return K}function h(K,U){if(K==null)return{};var z=v(K,U),B,H;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(K);for(H=0;H<G.length;H++){if(B=G[H],U.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function v(K,U){if(K==null)return{};var z={},B=Object.keys(K),H,G;for(G=0;G<B.length;G++){if(H=B[G],U.indexOf(H)>=0)continue;z[H]=K[H]}return z}var g=function(U){var z=U.className,B=U.percent,H=U.prefixCls,G=U.strokeColor,ee=U.strokeLinecap,ie=U.strokeWidth,ue=U.style,xe=U.trailColor,Te=U.trailWidth,se=U.transition,ve=h(U,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ve.gapPosition;var de=Array.isArray(B)?B:[B],ne=Array.isArray(G)?G:[G],ae=f(de),Z=c(ae,1),le=Z[0],Q=ie/2,q=100-ie/2,be="M ".concat(ee==="round"?Q:0,",").concat(Q,`
L `).concat(ee==="round"?q:100,",").concat(Q),te="0 0 100 ".concat(ie),J=0;return m.a.createElement("svg",_({className:P()("".concat(H,"-line"),z),viewBox:te,preserveAspectRatio:"none",style:ue},ve),m.a.createElement("path",{className:"".concat(H,"-line-trail"),d:be,strokeLinecap:ee,stroke:xe,strokeWidth:Te||ie,fillOpacity:"0"}),de.map(function(X,$){var ge={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:se||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=ne[$]||ne[ne.length-1];return J+=X,m.a.createElement("path",{key:$,className:"".concat(H,"-line-path"),d:be,strokeLinecap:ee,stroke:fe,strokeWidth:ie,fillOpacity:"0",ref:le[$],style:ge})}))};g.defaultProps=d;var E=g;function a(){return a=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var z=arguments[U];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},a.apply(this,arguments)}function l(K,U){return L(K)||s(K,U)||C(K,U)||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 C(K,U){if(!K)return;if(typeof K=="string")return w(K,U);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return w(K,U)}function w(K,U){(U==null||U>K.length)&&(U=K.length);for(var z=0,B=new Array(U);z<U;z++)B[z]=K[z];return B}function s(K,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,H=!1,G=void 0;try{for(var ee=K[Symbol.iterator](),ie;!(B=(ie=ee.next()).done)&&!(z.push(ie.value),U&&z.length===U);B=!0);}catch(ue){H=!0,G=ue}finally{try{!B&&ee.return!=null&&ee.return()}finally{if(H)throw G}}return z}function L(K){if(Array.isArray(K))return K}function O(K,U){if(K==null)return{};var z=x(K,U),B,H;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(K);for(H=0;H<G.length;H++){if(B=G[H],U.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function x(K,U){if(K==null)return{};var z={},B=Object.keys(K),H,G;for(G=0;G<B.length;G++){if(H=B[G],U.indexOf(H)>=0)continue;z[H]=K[H]}return z}var b=0;function y(K){return+K.replace("%","")}function T(K){return Array.isArray(K)?K:[K]}function k(K,U,z,B){var H=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,ee=50-B/2,ie=0,ue=-ee,xe=0,Te=-2*ee;switch(G){case"left":ie=-ee,ue=0,xe=2*ee,Te=0;break;case"right":ie=ee,ue=0,xe=-2*ee,Te=0;break;case"bottom":ue=ee,Te=2*ee;break;default:}var se="M 50,50 m ".concat(ie,",").concat(ue,`
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(xe,",").concat(-Te,`
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(-xe,",").concat(Te),ve=Math.PI*2*ee,de={stroke:z,strokeDasharray:"".concat(U/100*(ve-H),"px ").concat(ve,"px"),strokeDashoffset:"-".concat(H/2+K/100*(ve-H),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:se,pathStyle:de}}var N=function(U){var z=U.prefixCls,B=U.strokeWidth,H=U.trailWidth,G=U.gapDegree,ee=U.gapPosition,ie=U.trailColor,ue=U.strokeLinecap,xe=U.style,Te=U.className,se=U.strokeColor,ve=U.percent,de=O(U,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ne=Object(D.useMemo)(function(){return b+=1,b},[]),ae=k(0,100,ie,B,G,ee),Z=ae.pathString,le=ae.pathStyle,Q=T(ve),q=T(se),be=q.find(function(ge){return Object.prototype.toString.call(ge)==="[object Object]"}),te=f(Q),J=l(te,1),X=J[0],$=function(){var fe=0;return Q.map(function(_e,He){var $e=q[He]||q[q.length-1],Ve=Object.prototype.toString.call($e)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ne,")"):"",et=k(fe,_e,$e,B,G,ee);return fe+=_e,m.a.createElement("path",{key:He,className:"".concat(z,"-circle-path"),d:et.pathString,stroke:Ve,strokeLinecap:ue,strokeWidth:B,opacity:_e===0?0:1,fillOpacity:"0",style:et.pathStyle,ref:X[He]})})};return m.a.createElement("svg",a({className:P()("".concat(z,"-circle"),Te),viewBox:"0 0 100 100",style:xe},de),be&&m.a.createElement("defs",null,m.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(ne),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(be).sort(function(ge,fe){return y(ge)-y(fe)}).map(function(ge,fe){return m.a.createElement("stop",{key:fe,offset:ge,stopColor:be[ge]})}))),m.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:Z,stroke:ie,strokeLinecap:ue,strokeWidth:H||B,fillOpacity:"0",style:le}),$().reverse())};N.defaultProps=d;var I=N,W={Line:E,Circle:I}},hW8S:function(j,Y,M){"use strict";M.d(Y,"a",function(){return P}),M.d(Y,"c",function(){return d}),M.d(Y,"b",function(){return f});var D=M("VTBJ"),m=M("Ff2n"),S=M("Kwbf"),P="RC_TABLE_INTERNAL_COL_DEFINE";function d(_){var c=_.expandable,o=Object(m.a)(_,["expandable"]);return"expandable"in _?Object(D.a)(Object(D.a)({},o),c):o}function f(_){return Object.keys(_).reduce(function(c,o){return(o.substr(0,5)==="data-"||o.substr(0,5)==="aria-")&&(c[o]=_[o]),c},{})}},jO9C:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.Iso97971={pad:function(m,S){m.concat(D.lib.WordArray.create([2147483648],1)),D.pad.ZeroPadding.pad(m,S)},unpad:function(m){D.pad.ZeroPadding.unpad(m),m.sigBytes--}},D.pad.Iso97971})},jwmR:function(j,Y,M){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Y,M){"use strict";M.d(Y,"a",function(){return br});var D=M("rePB"),m=M("ODXe"),S=M("Ff2n"),P=M("VTBJ"),d=M("cDcd"),f=M("TSYQ"),_=M.n(f),c=M("Zm9Q"),o=M("6cGi"),i=M("KQm4"),n=M("xEkU"),u=M.n(n),p=M("t23M");function h(Ae){var Fe=Object(d.useRef)(),We=Object(d.useRef)(!1);function Le(){for(var he=arguments.length,Ce=new Array(he),ye=0;ye<he;ye++)Ce[ye]=arguments[ye];We.current||(u.a.cancel(Fe.current),Fe.current=u()(function(){Ae.apply(void 0,Ce)}))}return Object(d.useEffect)(function(){return function(){We.current=!0,u.a.cancel(Fe.current)}},[]),Le}function v(Ae){var Fe=Object(d.useRef)([]),We=Object(d.useState)({}),Le=Object(m.a)(We,2),he=Le[1],Ce=Object(d.useRef)(typeof Ae=="function"?Ae():Ae),ye=h(function(){var je=Ce.current;Fe.current.forEach(function(Ue){je=Ue(je)}),Fe.current=[],Ce.current=je,he({})});function Pe(je){Fe.current.push(je),ye()}return[Ce.current,Pe]}var g=M("4IlW");function E(Ae,Fe){var We,Le=Ae.prefixCls,he=Ae.id,Ce=Ae.active,ye=Ae.rtl,Pe=Ae.tab,je=Pe.key,Ue=Pe.tab,Ne=Pe.disabled,ze=Pe.closeIcon,ot=Ae.tabBarGutter,xt=Ae.tabPosition,wt=Ae.closable,Ft=Ae.renderWrapper,xr=Ae.removeAriaLabel,jr=Ae.editable,Nr=Ae.onClick,Wr=Ae.onRemove,Dr=Ae.onFocus,Kr="".concat(Le,"-tab");d.useEffect(function(){return Wr},[]);var zr={};xt==="top"||xt==="bottom"?zr[ye?"marginLeft":"marginRight"]=ot:zr.marginBottom=ot;var rn=jr&&wt!==!1&&!Ne;function $r(Tr){if(Ne)return;Nr(Tr)}function vn(Tr){Tr.preventDefault(),Tr.stopPropagation(),jr.onEdit("remove",{key:je,event:Tr})}var Yr=d.createElement("div",{key:je,ref:Fe,className:_()(Kr,(We={},Object(D.a)(We,"".concat(Kr,"-with-remove"),rn),Object(D.a)(We,"".concat(Kr,"-active"),Ce),Object(D.a)(We,"".concat(Kr,"-disabled"),Ne),We)),style:zr,onClick:$r},d.createElement("div",{role:"tab","aria-selected":Ce,id:he&&"".concat(he,"-tab-").concat(je),className:"".concat(Kr,"-btn"),"aria-controls":he&&"".concat(he,"-panel-").concat(je),"aria-disabled":Ne,tabIndex:Ne?null:0,onClick:function(Or){Or.stopPropagation(),$r(Or)},onKeyDown:function(Or){[g.a.SPACE,g.a.ENTER].includes(Or.which)&&(Or.preventDefault(),$r(Or))},onFocus:Dr},Ue),rn&&d.createElement("button",{type:"button","aria-label":xr||"remove",tabIndex:0,className:"".concat(Kr,"-remove"),onClick:function(Or){Or.stopPropagation(),vn(Or)}},ze||jr.removeIcon||"\xD7"));return Ft&&(Yr=Ft(Yr)),Yr}var a=d.forwardRef(E),l={width:0,height:0,left:0,top:0};function t(Ae,Fe,We){return Object(d.useMemo)(function(){for(var Le,he=new Map,Ce=Fe.get((Le=Ae[0])===null||Le===void 0?void 0:Le.key)||l,ye=Ce.left+Ce.width,Pe=0;Pe<Ae.length;Pe+=1){var je=Ae[Pe].key,Ue=Fe.get(je);if(!Ue){var Ne;Ue=Fe.get((Ne=Ae[Pe-1])===null||Ne===void 0?void 0:Ne.key)||l}var ze=he.get(je)||Object(P.a)({},Ue);ze.right=ye-ze.left-ze.width,he.set(je,ze)}return he},[Ae.map(function(Le){return Le.key}).join("_"),Fe,We])}var C={width:0,height:0,left:0,top:0,right:0};function w(Ae,Fe,We,Le,he){var Ce=he.tabs,ye=he.tabPosition,Pe=he.rtl,je,Ue,Ne;["top","bottom"].includes(ye)?(je="width",Ue=Pe?"right":"left",Ne=Math.abs(Fe.left)):(je="height",Ue="top",Ne=-Fe.top);var ze=Fe[je],ot=We[je],xt=Le[je],wt=ze;return ot+xt>ze&&(wt=ze-xt),Object(d.useMemo)(function(){if(!Ce.length)return[0,0];for(var Ft=Ce.length,xr=Ft,jr=0;jr<Ft;jr+=1){var Nr=Ae.get(Ce[jr].key)||C;if(Nr[Ue]+Nr[je]>Ne+wt){xr=jr-1;break}}for(var Wr=0,Dr=Ft-1;Dr>=0;Dr-=1){var Kr=Ae.get(Ce[Dr].key)||C;if(Kr[Ue]<Ne){Wr=Dr+1;break}}return[Wr,xr]},[Ae,Ne,wt,ye,Ce.map(function(Ft){return Ft.key}).join("_"),Pe])}var s=M("wx14"),L=M("1OyB"),O=M("vuIU"),x=M("JX7q"),b=M("Ji7U"),y=M("LK+K"),T=M("I8Z2"),k=M("bT9E"),N=M("2GS6"),I=M("Gytx"),W=M.n(I),K=M("U8pU"),U=/iPhone/i,z=/iPod/i,B=/iPad/i,H=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,ee=/\bAndroid(?:.+)SD4930UR\b/i,ie=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ue=/Windows Phone/i,xe=/\bWindows(?:.+)ARM\b/i,Te=/BlackBerry/i,se=/BB10/i,ve=/Opera Mini/i,de=/\b(CriOS|Chrome)(?:.+)Mobile/i,ne=/Mobile(?:.+)Firefox\b/i;function ae(Ae,Fe){return Ae.test(Fe)}function Z(Ae){var Fe=Ae||(typeof navigator!="undefined"?navigator.userAgent:""),We=(Fe||"").split("[FBAN");if(typeof We[1]!="undefined"){var Le=We,he=Object(m.a)(Le,1);Fe=he[0]}if(We=Fe.split("Twitter"),typeof We[1]!="undefined"){var Ce=We,ye=Object(m.a)(Ce,1);Fe=ye[0]}var Pe={apple:{phone:ae(U,Fe)&&!ae(ue,Fe),ipod:ae(z,Fe),tablet:!ae(U,Fe)&&ae(B,Fe)&&!ae(ue,Fe),device:(ae(U,Fe)||ae(z,Fe)||ae(B,Fe))&&!ae(ue,Fe)},amazon:{phone:ae(ee,Fe),tablet:!ae(ee,Fe)&&ae(ie,Fe),device:ae(ee,Fe)||ae(ie,Fe)},android:{phone:!ae(ue,Fe)&&ae(ee,Fe)||!ae(ue,Fe)&&ae(H,Fe),tablet:!ae(ue,Fe)&&!ae(ee,Fe)&&!ae(H,Fe)&&(ae(ie,Fe)||ae(G,Fe)),device:!ae(ue,Fe)&&(ae(ee,Fe)||ae(ie,Fe)||ae(H,Fe)||ae(G,Fe))||ae(/\bokhttp\b/i,Fe)},windows:{phone:ae(ue,Fe),tablet:ae(xe,Fe),device:ae(ue,Fe)||ae(xe,Fe)},other:{blackberry:ae(Te,Fe),blackberry10:ae(se,Fe),opera:ae(ve,Fe),firefox:ae(ne,Fe),chrome:ae(de,Fe),device:ae(Te,Fe)||ae(se,Fe)||ae(ve,Fe)||ae(ne,Fe)||ae(de,Fe)},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 le=Object(P.a)(Object(P.a)({},Z()),{},{isMobile:Z}),Q=le;function q(){}function be(Ae,Fe,We){var Le=Fe||"";return Ae.key||"".concat(Le,"item_").concat(We)}function te(Ae){return"".concat(Ae,"-menu-")}function J(Ae,Fe){var We=-1;d.Children.forEach(Ae,function(Le){We+=1,Le&&Le.type&&Le.type.isMenuItemGroup?d.Children.forEach(Le.props.children,function(he){We+=1,Fe(he,We)}):Fe(Le,We)})}function X(Ae,Fe,We){if(!Ae||We.find)return;d.Children.forEach(Ae,function(Le){if(Le){var he=Le.type;if(!he||!(he.isSubMenu||he.isMenuItem||he.isMenuItemGroup))return;Fe.indexOf(Le.key)!==-1?We.find=!0:Le.props.children&&X(Le.props.children,Fe,We)}})}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"],ge=function(Fe){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=Fe&&typeof Fe.getBoundingClientRect=="function"&&Fe.getBoundingClientRect().width;if(Le){if(We){var he=getComputedStyle(Fe),Ce=he.marginLeft,ye=he.marginRight;Le+=+Ce.replace("px","")+ +ye.replace("px","")}Le=+Le.toFixed(6)}return Le||0},fe=function(Fe,We,Le){Fe&&Object(K.a)(Fe.style)==="object"&&(Fe.style[We]=Le)},_e=function(){return Q.any},He=M("bdgK"),$e=M("faye"),Ve=M.n($e),et=M("wgJM"),at=M("l4aY"),st=M("m+aA"),Me=M("c+Xe"),Se=M("zT1h"),Ye=M("QC+M");function it(Ae,Fe,We){return We?Ae[0]===Fe[0]:Ae[0]===Fe[0]&&Ae[1]===Fe[1]}function Ke(Ae,Fe,We){var Le=Ae[Fe]||{};return Object(P.a)(Object(P.a)({},Le),We)}function qe(Ae,Fe,We,Le){for(var he=We.points,Ce=Object.keys(Ae),ye=0;ye<Ce.length;ye+=1){var Pe=Ce[ye];if(it(Ae[Pe].points,he,Le))return"".concat(Fe,"-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=M("MNnm");function Re(Ae,Fe){var We={};return We[Ae.toLowerCase()]=Fe.toLowerCase(),We["Webkit".concat(Ae)]="webkit".concat(Fe),We["Moz".concat(Ae)]="moz".concat(Fe),We["ms".concat(Ae)]="MS".concat(Fe),We["O".concat(Ae)]="o".concat(Fe.toLowerCase()),We}function pe(Ae,Fe){var We={animationend:Re("Animation","AnimationEnd"),transitionend:Re("Transition","TransitionEnd")};return Ae&&("AnimationEvent"in Fe||delete We.animationend.animation,"TransitionEvent"in Fe||delete We.transitionend.transition),We}var Ee=pe(Object(Oe.a)(),typeof window!="undefined"?window:{}),we={};if(Object(Oe.a)()){var De=document.createElement("div");we=De.style}var Ge={};function nt(Ae){if(Ge[Ae])return Ge[Ae];var Fe=Ee[Ae];if(Fe)for(var We=Object.keys(Fe),Le=We.length,he=0;he<Le;he+=1){var Ce=We[he];if(Object.prototype.hasOwnProperty.call(Fe,Ce)&&Ce in we)return Ge[Ae]=Fe[Ce],Ge[Ae]}return""}var lt=nt("animationend"),ut=nt("transitionend"),Rt=!!(lt&&ut),tt=lt||"animationend",nr=ut||"transitionend";function Wt(Ae,Fe){if(!Ae)return null;if(Object(K.a)(Ae)==="object"){var We=Fe.replace(/-\w/g,function(Le){return Le[1].toUpperCase()});return Ae[We]}return"".concat(Ae,"-").concat(Fe)}var pt="none",Rr="appear",Ir="enter",Lr="leave",Jr="none",pr="prepare",Qr="start",Br="active",Cr="end";function cn(Ae){var Fe=Object(d.useRef)(!1),We=Object(d.useState)(Ae),Le=Object(m.a)(We,2),he=Le[0],Ce=Le[1];function ye(Pe){Fe.current||Ce(Pe)}return Object(d.useEffect)(function(){return function(){Fe.current=!0}},[]),[he,ye]}var wn=Object(Oe.a)()?d.useLayoutEffect:d.useEffect,Hn=wn,sn=function(){var Ae=d.useRef(null);function Fe(){et.a.cancel(Ae.current)}function We(Le){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Fe();var Ce=Object(et.a)(function(){he<=1?Le({isCanceled:function(){return Ce!==Ae.current}}):We(Le,he-1)});Ae.current=Ce}return d.useEffect(function(){return function(){Fe()}},[]),[We,Fe]},_a=[pr,Qr,Br,Cr],wa=!1,mn=!0;function sr(Ae){return Ae===Br||Ae===Cr}var Kn=function(Ae,Fe){var We=d.useState(Jr),Le=Object(m.a)(We,2),he=Le[0],Ce=Le[1],ye=sn(),Pe=Object(m.a)(ye,2),je=Pe[0],Ue=Pe[1];function Ne(){Ce(pr)}return Hn(function(){if(he!==Jr&&he!==Cr){var ze=_a.indexOf(he),ot=_a[ze+1],xt=Fe(he);xt===wa?Ce(ot):je(function(wt){function Ft(){if(wt.isCanceled())return;Ce(ot)}xt===!0?Ft():Promise.resolve(xt).then(Ft)})}},[Ae,he]),d.useEffect(function(){return function(){Ue()}},[]),[Ne,he]},Ta=function(Ae){var Fe=Object(d.useRef)(),We=Object(d.useRef)(Ae);We.current=Ae;var Le=d.useCallback(function(ye){We.current(ye)},[]);function he(ye){ye&&(ye.removeEventListener(nr,Le),ye.removeEventListener(tt,Le))}function Ce(ye){Fe.current&&Fe.current!==ye&&he(Fe.current),ye&&ye!==Fe.current&&(ye.addEventListener(nr,Le),ye.addEventListener(tt,Le),Fe.current=ye)}return d.useEffect(function(){return function(){he(Fe.current)}},[]),[Ce,he]};function jn(Ae,Fe,We,Le){var he=Le.motionEnter,Ce=he===void 0?!0:he,ye=Le.motionAppear,Pe=ye===void 0?!0:ye,je=Le.motionLeave,Ue=je===void 0?!0:je,Ne=Le.motionDeadline,ze=Le.motionLeaveImmediately,ot=Le.onAppearPrepare,xt=Le.onEnterPrepare,wt=Le.onLeavePrepare,Ft=Le.onAppearStart,xr=Le.onEnterStart,jr=Le.onLeaveStart,Nr=Le.onAppearActive,Wr=Le.onEnterActive,Dr=Le.onLeaveActive,Kr=Le.onAppearEnd,zr=Le.onEnterEnd,rn=Le.onLeaveEnd,$r=Le.onVisibleChanged,vn=cn(),Yr=Object(m.a)(vn,2),Tr=Yr[0],Or=Yr[1],Xr=cn(pt),tn=Object(m.a)(Xr,2),mr=tn[0],an=tn[1],An=cn(null),un=Object(m.a)(An,2),En=un[0],dn=un[1],kn=Object(d.useRef)(!1),Xn=Object(d.useRef)(null),Rn=Object(d.useRef)(!1),ea=Object(d.useRef)(null);function ja(){var gn=We();return gn||ea.current}var ua=Object(d.useRef)(!1);function Vn(gn){var fn=ja();if(gn&&!gn.deadline&&gn.target!==fn)return;var Bn;mr===Rr&&ua.current?Bn=Kr==null?void 0:Kr(fn,gn):mr===Ir&&ua.current?Bn=zr==null?void 0:zr(fn,gn):mr===Lr&&ua.current&&(Bn=rn==null?void 0:rn(fn,gn)),Bn!==!1&&!Rn.current&&(an(pt),dn(null))}var xn=Ta(Vn),_n=Object(m.a)(xn,1),Dn=_n[0],Cn=d.useMemo(function(){var gn,fn,Bn;switch(mr){case"appear":return gn={},Object(D.a)(gn,pr,ot),Object(D.a)(gn,Qr,Ft),Object(D.a)(gn,Br,Nr),gn;case"enter":return fn={},Object(D.a)(fn,pr,xt),Object(D.a)(fn,Qr,xr),Object(D.a)(fn,Br,Wr),fn;case"leave":return Bn={},Object(D.a)(Bn,pr,wt),Object(D.a)(Bn,Qr,jr),Object(D.a)(Bn,Br,Dr),Bn;default:return{}}},[mr]),Un=Kn(mr,function(gn){if(gn===pr){var fn=Cn[pr];return fn?fn(ja()):wa}if(hn in Cn){var Bn;dn(((Bn=Cn[hn])===null||Bn===void 0?void 0:Bn.call(Cn,ja(),null))||null)}return hn===Br&&(Dn(ja()),Ne>0&&(clearTimeout(Xn.current),Xn.current=setTimeout(function(){Vn({deadline:!0})},Ne))),mn}),pa=Object(m.a)(Un,2),$a=pa[0],hn=pa[1],Oa=sr(hn);ua.current=Oa,Hn(function(){Or(Fe);var gn=kn.current;if(kn.current=!0,!Ae)return;var fn;!gn&&Fe&&Pe&&(fn=Rr),gn&&Fe&&Ce&&(fn=Ir),(gn&&!Fe&&Ue||!gn&&ze&&!Fe&&Ue)&&(fn=Lr),fn&&(an(fn),$a())},[Fe]),Object(d.useEffect)(function(){(mr===Rr&&!Pe||mr===Ir&&!Ce||mr===Lr&&!Ue)&&an(pt)},[Pe,Ce,Ue]),Object(d.useEffect)(function(){return function(){clearTimeout(Xn.current),Rn.current=!0}},[]),Object(d.useEffect)(function(){Tr!==void 0&&mr===pt&&($r==null||$r(Tr))},[Tr,mr]);var Aa=En;return Cn[pr]&&hn===Qr&&(Aa=Object(P.a)({transition:"none"},Aa)),[mr,hn,Aa,Tr!=null?Tr:Fe]}var Zr=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(){return Object(L.a)(this,We),Fe.apply(this,arguments)}return Object(O.a)(We,[{key:"render",value:function(){return this.props.children}}]),We}(d.Component),Ln=Zr;function ga(Ae){var Fe=Ae;Object(K.a)(Ae)==="object"&&(Fe=Ae.transitionSupport);function We(he){return!!(he.motionName&&Fe)}var Le=d.forwardRef(function(he,Ce){var ye=he.visible,Pe=ye===void 0?!0:ye,je=he.removeOnLeave,Ue=je===void 0?!0:je,Ne=he.forceRender,ze=he.children,ot=he.motionName,xt=he.leavedClassName,wt=he.eventProps,Ft=We(he),xr=Object(d.useRef)(),jr=Object(d.useRef)();function Nr(){try{return Object(st.a)(xr.current||jr.current)}catch(an){return null}}var Wr=jn(Ft,Pe,Nr,he),Dr=Object(m.a)(Wr,4),Kr=Dr[0],zr=Dr[1],rn=Dr[2],$r=Dr[3],vn=d.useRef($r);$r&&(vn.current=!0);var Yr=Object(d.useRef)(Ce);Yr.current=Ce;var Tr=d.useCallback(function(an){xr.current=an,Object(Me.b)(Yr.current,an)},[]),Or,Xr=Object(P.a)(Object(P.a)({},wt),{},{visible:Pe});if(!ze)Or=null;else if(Kr===pt||!We(he))$r?Or=ze(Object(P.a)({},Xr),Tr):!Ue&&vn.current?Or=ze(Object(P.a)(Object(P.a)({},Xr),{},{className:xt}),Tr):Ne?Or=ze(Object(P.a)(Object(P.a)({},Xr),{},{style:{display:"none"}}),Tr):Or=null;else{var tn,mr;zr===pr?mr="prepare":sr(zr)?mr="active":zr===Qr&&(mr="start"),Or=ze(Object(P.a)(Object(P.a)({},Xr),{},{className:_()(Wt(ot,Kr),(tn={},Object(D.a)(tn,Wt(ot,"".concat(Kr,"-").concat(mr)),mr),Object(D.a)(tn,ot,typeof ot=="string"),tn)),style:rn}),Tr)}return d.createElement(Ln,{ref:jr},Or)});return Le.displayName="CSSMotion",Le}var fa=ga(Rt),Tt="add",fr="keep",na="remove",ha="removed";function Sa(Ae){var Fe;return Ae&&Object(K.a)(Ae)==="object"&&"key"in Ae?Fe=Ae:Fe={key:Ae},Object(P.a)(Object(P.a)({},Fe),{},{key:String(Fe.key)})}function ya(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ae.map(Sa)}function In(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],We=[],Le=0,he=Fe.length,Ce=ya(Ae),ye=ya(Fe);Ce.forEach(function(Ue){for(var Ne=!1,ze=Le;ze<he;ze+=1){var ot=ye[ze];if(ot.key===Ue.key){Le<ze&&(We=We.concat(ye.slice(Le,ze).map(function(xt){return Object(P.a)(Object(P.a)({},xt),{},{status:Tt})})),Le=ze),We.push(Object(P.a)(Object(P.a)({},ot),{},{status:fr})),Le+=1,Ne=!0;break}}Ne||We.push(Object(P.a)(Object(P.a)({},Ue),{},{status:na}))}),Le<he&&(We=We.concat(ye.slice(Le).map(function(Ue){return Object(P.a)(Object(P.a)({},Ue),{},{status:Tt})})));var Pe={};We.forEach(function(Ue){var Ne=Ue.key;Pe[Ne]=(Pe[Ne]||0)+1});var je=Object.keys(Pe).filter(function(Ue){return Pe[Ue]>1});return je.forEach(function(Ue){We=We.filter(function(Ne){var ze=Ne.key,ot=Ne.status;return ze!==Ue||ot!==na}),We.forEach(function(Ne){Ne.key===Ue&&(Ne.status=fr)})}),We}var _r=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function aa(Ae){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fa,We=function(Le){Object(b.a)(Ce,Le);var he=Object(y.a)(Ce);function Ce(){var ye;return Object(L.a)(this,Ce),ye=he.apply(this,arguments),ye.state={keyEntities:[]},ye.removeKey=function(Pe){ye.setState(function(je){var Ue=je.keyEntities;return{keyEntities:Ue.map(function(Ne){return Ne.key!==Pe?Ne:Object(P.a)(Object(P.a)({},Ne),{},{status:ha})})}})},ye}return Object(O.a)(Ce,[{key:"render",value:function(){var Pe=this,je=this.state.keyEntities,Ue=this.props,Ne=Ue.component,ze=Ue.children,ot=Ue.onVisibleChanged,xt=Object(S.a)(Ue,["component","children","onVisibleChanged"]),wt=Ne||d.Fragment,Ft={};return _r.forEach(function(xr){Ft[xr]=xt[xr],delete xt[xr]}),delete xt.keys,d.createElement(wt,xt,je.map(function(xr){var jr=xr.status,Nr=Object(S.a)(xr,["status"]),Wr=jr===Tt||jr===fr;return d.createElement(Fe,Object(s.a)({},Ft,{key:Nr.key,visible:Wr,eventProps:Nr,onVisibleChanged:function(Kr){ot==null||ot(Kr,{key:Nr.key}),Kr||Pe.removeKey(Nr.key)}}),ze)}))}}],[{key:"getDerivedStateFromProps",value:function(Pe,je){var Ue=Pe.keys,Ne=je.keyEntities,ze=ya(Ue),ot=In(Ne,ze);return{keyEntities:ot.filter(function(xt){var wt=Ne.find(function(Ft){var xr=Ft.key;return xt.key===xr});return!(wt&&wt.status===ha&&xt.status===na)})}}}]),Ce}(d.Component);return We.defaultProps={component:"div"},We}var Yn=aa(Rt),zn=fa;function On(Ae){var Fe=Ae.prefixCls,We=Ae.motion,Le=Ae.animation,he=Ae.transitionName;return We||(Le?{motionName:"".concat(Fe,"-").concat(Le)}:he?{motionName:he}:null)}function Va(Ae){var Fe=Ae.prefixCls,We=Ae.visible,Le=Ae.zIndex,he=Ae.mask,Ce=Ae.maskMotion,ye=Ae.maskAnimation,Pe=Ae.maskTransitionName;if(!he)return null;var je={};return(Ce||Pe||ye)&&(je=Object(P.a)({motionAppear:!0},On({motion:Ce,prefixCls:Fe,transitionName:Pe,animation:ye}))),d.createElement(zn,Object(s.a)({},je,{visible:We,removeOnLeave:!0}),function(Ue){var Ne=Ue.className;return d.createElement("div",{style:{zIndex:Le},className:_()("".concat(Fe,"-mask"),Ne)})})}var Ma=M("9mu1"),Dt=M("o0o1"),Za=M.n(Dt),oi=M("HaE+"),Ia=["measure","align",null,"motion"],bn=function(Ae,Fe){var We=Object(d.useState)(null),Le=Object(m.a)(We,2),he=Le[0],Ce=Le[1],ye=Object(d.useRef)(),Pe=Object(d.useRef)(!1);function je(ze){Pe.current||Ce(ze)}function Ue(){et.a.cancel(ye.current)}function Ne(ze){Ue(),ye.current=Object(et.a)(function(){je(function(ot){switch(he){case"align":return"motion";case"motion":return"stable";default:}return ot}),ze==null||ze()})}return Object(d.useEffect)(function(){je("measure")},[Ae]),Object(d.useEffect)(function(){switch(he){case"measure":Fe();break;default:}he&&(ye.current=Object(et.a)(Object(oi.a)(Za.a.mark(function ze(){var ot,xt;return Za.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:ot=Ia.indexOf(he),xt=Ia[ot+1],xt&&ot!==-1&&je(xt);case 3:case"end":return Ft.stop()}},ze)}))))},[he]),Object(d.useEffect)(function(){return function(){Pe.current=!0,Ue()}},[]),[he,Ne]},Fn=function(Ae){var Fe=d.useState({width:0,height:0}),We=Object(m.a)(Fe,2),Le=We[0],he=We[1];function Ce(Pe){he({width:Pe.offsetWidth,height:Pe.offsetHeight})}var ye=d.useMemo(function(){var Pe={};if(Ae){var je=Le.width,Ue=Le.height;Ae.indexOf("height")!==-1&&Ue?Pe.height=Ue:Ae.indexOf("minHeight")!==-1&&Ue&&(Pe.minHeight=Ue),Ae.indexOf("width")!==-1&&je?Pe.width=je:Ae.indexOf("minWidth")!==-1&&je&&(Pe.minWidth=je)}return Pe},[Ae,Le]);return[ye,Ce]},Ka=d.forwardRef(function(Ae,Fe){var We=Ae.visible,Le=Ae.prefixCls,he=Ae.className,Ce=Ae.style,ye=Ae.children,Pe=Ae.zIndex,je=Ae.stretch,Ue=Ae.destroyPopupOnHide,Ne=Ae.forceRender,ze=Ae.align,ot=Ae.point,xt=Ae.getRootDomNode,wt=Ae.getClassNameFromAlign,Ft=Ae.onAlign,xr=Ae.onMouseEnter,jr=Ae.onMouseLeave,Nr=Ae.onMouseDown,Wr=Ae.onTouchStart,Dr=Object(d.useRef)(),Kr=Object(d.useRef)(),zr=Object(d.useState)(),rn=Object(m.a)(zr,2),$r=rn[0],vn=rn[1],Yr=Fn(je),Tr=Object(m.a)(Yr,2),Or=Tr[0],Xr=Tr[1];function tn(){je&&Xr(xt())}var mr=bn(We,tn),an=Object(m.a)(mr,2),An=an[0],un=an[1],En=Object(d.useRef)();function dn(){return ot||xt}function kn(){var xn;(xn=Dr.current)===null||xn===void 0||xn.forceAlign()}function Xn(xn,_n){var Dn=wt(_n);$r!==Dn&&vn(Dn),An==="align"&&($r!==Dn?Promise.resolve().then(function(){kn()}):un(function(){var Cn;(Cn=En.current)===null||Cn===void 0||Cn.call(En)}),Ft==null||Ft(xn,_n))}var Rn=Object(P.a)({},On(Ae));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(xn){var _n=Rn[xn];Rn[xn]=function(Dn,Cn){return un(),_n==null?void 0:_n(Dn,Cn)}});function ea(){return new Promise(function(xn){En.current=xn})}d.useEffect(function(){!Rn.motionName&&An==="motion"&&un()},[Rn.motionName,An]),d.useImperativeHandle(Fe,function(){return{forceAlign:kn,getElement:function(){return Kr.current}}});var ja=Object(P.a)(Object(P.a)({},Or),{},{zIndex:Pe,opacity:An==="motion"||An==="stable"||!We?void 0:0,pointerEvents:An==="stable"?void 0:"none"},Ce),ua=!0;(ze==null?void 0:ze.points)&&(An==="align"||An==="stable")&&(ua=!1);var Vn=ye;return d.Children.count(ye)>1&&(Vn=d.createElement("div",{className:"".concat(Le,"-content")},ye)),d.createElement(zn,Object(s.a)({visible:We,ref:Kr,leavedClassName:"".concat(Le,"-hidden")},Rn,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:Ue,forceRender:Ne}),function(xn,_n){var Dn=xn.className,Cn=xn.style,Un=_()(Le,he,$r,Dn);return d.createElement(Ma.a,{target:dn(),key:"popup",ref:Dr,monitorWindowResize:!0,disabled:ua,align:ze,onAlign:Xn},d.createElement("div",{ref:_n,className:Un,onMouseEnter:xr,onMouseLeave:jr,onMouseDownCapture:Nr,onTouchStartCapture:Wr,style:Object(P.a)(Object(P.a)({},Cn),ja)},Vn))})});Ka.displayName="PopupInner";var qa=Ka,Gn=d.forwardRef(function(Ae,Fe){var We=Ae.prefixCls,Le=Ae.visible,he=Ae.zIndex,Ce=Ae.children,ye=Ae.mobile;ye=ye===void 0?{}:ye;var Pe=ye.popupClassName,je=ye.popupStyle,Ue=ye.popupMotion,Ne=Ue===void 0?{}:Ue,ze=ye.popupRender,ot=d.useRef();d.useImperativeHandle(Fe,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var xt=Object(P.a)({zIndex:he},je),wt=Ce;return d.Children.count(Ce)>1&&(wt=d.createElement("div",{className:"".concat(We,"-content")},Ce)),ze&&(wt=ze(wt)),d.createElement(zn,Object(s.a)({visible:Le,ref:ot,removeOnLeave:!0},Ne),function(Ft,xr){var jr=Ft.className,Nr=Ft.style,Wr=_()(We,Pe,jr);return d.createElement("div",{ref:xr,className:Wr,style:Object(P.a)(Object(P.a)({},Nr),xt)},wt)})});Gn.displayName="MobilePopupInner";var _i=Gn,ei=["visible","mobile"],qn=d.forwardRef(function(Ae,Fe){var We=Ae.visible,Le=Ae.mobile,he=Object(S.a)(Ae,ei),Ce=Object(d.useState)(We),ye=Object(m.a)(Ce,2),Pe=ye[0],je=ye[1],Ue=Object(d.useState)(!1),Ne=Object(m.a)(Ue,2),ze=Ne[0],ot=Ne[1],xt=Object(P.a)(Object(P.a)({},he),{},{visible:Pe});Object(d.useEffect)(function(){je(We),We&&Le&&ot(ke())},[We,Le]);var wt=ze?d.createElement(_i,Object(s.a)({},xt,{mobile:Le,ref:Fe})):d.createElement(qa,Object(s.a)({},xt,{ref:Fe}));return d.createElement("div",null,d.createElement(Va,xt),wt)});qn.displayName="Popup";var Ca=qn,mi=d.createContext(null),za=mi;function ba(){}function Ga(){return""}function ka(Ae){return Ae?Ae.ownerDocument:window.document}var vi=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function gi(Ae){var Fe=function(We){Object(b.a)(he,We);var Le=Object(y.a)(he);function he(Ce){var ye;Object(L.a)(this,he),ye=Le.call(this,Ce),ye.popupRef=d.createRef(),ye.triggerRef=d.createRef(),ye.attachId=void 0,ye.clickOutsideHandler=void 0,ye.touchOutsideHandler=void 0,ye.contextMenuOutsideHandler1=void 0,ye.contextMenuOutsideHandler2=void 0,ye.mouseDownTimeout=void 0,ye.focusTime=void 0,ye.preClickTime=void 0,ye.preTouchTime=void 0,ye.delayTimer=void 0,ye.hasPopupMouseDown=void 0,ye.onMouseEnter=function(je){var Ue=ye.props.mouseEnterDelay;ye.fireEvents("onMouseEnter",je),ye.delaySetPopupVisible(!0,Ue,Ue?null:je)},ye.onMouseMove=function(je){ye.fireEvents("onMouseMove",je),ye.setPoint(je)},ye.onMouseLeave=function(je){ye.fireEvents("onMouseLeave",je),ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onPopupMouseEnter=function(){ye.clearDelayTimer()},ye.onPopupMouseLeave=function(je){var Ue;if(je.relatedTarget&&!je.relatedTarget.setTimeout&&Object(at.a)((Ue=ye.popupRef.current)===null||Ue===void 0?void 0:Ue.getElement(),je.relatedTarget))return;ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onFocus=function(je){ye.fireEvents("onFocus",je),ye.clearDelayTimer(),ye.isFocusToShow()&&(ye.focusTime=Date.now(),ye.delaySetPopupVisible(!0,ye.props.focusDelay))},ye.onMouseDown=function(je){ye.fireEvents("onMouseDown",je),ye.preClickTime=Date.now()},ye.onTouchStart=function(je){ye.fireEvents("onTouchStart",je),ye.preTouchTime=Date.now()},ye.onBlur=function(je){ye.fireEvents("onBlur",je),ye.clearDelayTimer(),ye.isBlurToHide()&&ye.delaySetPopupVisible(!1,ye.props.blurDelay)},ye.onContextMenu=function(je){je.preventDefault(),ye.fireEvents("onContextMenu",je),ye.setPopupVisible(!0,je)},ye.onContextMenuClose=function(){ye.isContextMenuToShow()&&ye.close()},ye.onClick=function(je){if(ye.fireEvents("onClick",je),ye.focusTime){var Ue;if(ye.preClickTime&&ye.preTouchTime?Ue=Math.min(ye.preClickTime,ye.preTouchTime):ye.preClickTime?Ue=ye.preClickTime:ye.preTouchTime&&(Ue=ye.preTouchTime),Math.abs(Ue-ye.focusTime)<20)return;ye.focusTime=0}ye.preClickTime=0,ye.preTouchTime=0,ye.isClickToShow()&&(ye.isClickToHide()||ye.isBlurToHide())&&je&&je.preventDefault&&je.preventDefault();var Ne=!ye.state.popupVisible;(ye.isClickToHide()&&!Ne||Ne&&ye.isClickToShow())&&ye.setPopupVisible(!ye.state.popupVisible,je)},ye.onPopupMouseDown=function(){if(ye.hasPopupMouseDown=!0,clearTimeout(ye.mouseDownTimeout),ye.mouseDownTimeout=window.setTimeout(function(){ye.hasPopupMouseDown=!1},0),ye.context){var je;(je=ye.context).onPopupMouseDown.apply(je,arguments)}},ye.onDocumentClick=function(je){if(ye.props.mask&&!ye.props.maskClosable)return;var Ue=je.target,Ne=ye.getRootDomNode(),ze=ye.getPopupDomNode();(!Object(at.a)(Ne,Ue)||ye.isContextMenuOnly())&&!Object(at.a)(ze,Ue)&&!ye.hasPopupMouseDown&&ye.close()},ye.getRootDomNode=function(){var je=ye.props.getTriggerDOMNode;if(je)return je(ye.triggerRef.current);try{var Ue=Object(st.a)(ye.triggerRef.current);if(Ue)return Ue}catch(Ne){}return Ve.a.findDOMNode(Object(x.a)(ye))},ye.getPopupClassNameFromAlign=function(je){var Ue=[],Ne=ye.props,ze=Ne.popupPlacement,ot=Ne.builtinPlacements,xt=Ne.prefixCls,wt=Ne.alignPoint,Ft=Ne.getPopupClassNameFromAlign;return ze&&ot&&Ue.push(qe(ot,xt,je,wt)),Ft&&Ue.push(Ft(je)),Ue.join(" ")},ye.getComponent=function(){var je=ye.props,Ue=je.prefixCls,Ne=je.destroyPopupOnHide,ze=je.popupClassName,ot=je.onPopupAlign,xt=je.popupMotion,wt=je.popupAnimation,Ft=je.popupTransitionName,xr=je.popupStyle,jr=je.mask,Nr=je.maskAnimation,Wr=je.maskTransitionName,Dr=je.maskMotion,Kr=je.zIndex,zr=je.popup,rn=je.stretch,$r=je.alignPoint,vn=je.mobile,Yr=je.forceRender,Tr=ye.state,Or=Tr.popupVisible,Xr=Tr.point,tn=ye.getPopupAlign(),mr={};return ye.isMouseEnterToShow()&&(mr.onMouseEnter=ye.onPopupMouseEnter),ye.isMouseLeaveToHide()&&(mr.onMouseLeave=ye.onPopupMouseLeave),mr.onMouseDown=ye.onPopupMouseDown,mr.onTouchStart=ye.onPopupMouseDown,d.createElement(Ca,Object(s.a)({prefixCls:Ue,destroyPopupOnHide:Ne,visible:Or,point:$r&&Xr,className:ze,align:tn,onAlign:ot,animation:wt,getClassNameFromAlign:ye.getPopupClassNameFromAlign},mr,{stretch:rn,getRootDomNode:ye.getRootDomNode,style:xr,mask:jr,zIndex:Kr,transitionName:Ft,maskAnimation:Nr,maskTransitionName:Wr,maskMotion:Dr,ref:ye.popupRef,motion:xt,mobile:vn,forceRender:Yr}),typeof zr=="function"?zr():zr)},ye.attachParent=function(je){et.a.cancel(ye.attachId);var Ue=ye.props,Ne=Ue.getPopupContainer,ze=Ue.getDocument,ot=ye.getRootDomNode(),xt;Ne?(ot||Ne.length===0)&&(xt=Ne(ot)):xt=ze(ye.getRootDomNode()).body,xt?xt.appendChild(je):ye.attachId=Object(et.a)(function(){ye.attachParent(je)})},ye.getContainer=function(){var je=ye.props.getDocument,Ue=je(ye.getRootDomNode()).createElement("div");return Ue.style.position="absolute",Ue.style.top="0",Ue.style.left="0",Ue.style.width="100%",ye.attachParent(Ue),Ue},ye.setPoint=function(je){var Ue=ye.props.alignPoint;if(!Ue||!je)return;ye.setState({point:{pageX:je.pageX,pageY:je.pageY}})},ye.handlePortalUpdate=function(){ye.state.prevPopupVisible!==ye.state.popupVisible&&ye.props.afterPopupVisibleChange(ye.state.popupVisible)},ye.triggerContextValue={onPopupMouseDown:ye.onPopupMouseDown};var Pe;return"popupVisible"in Ce?Pe=!!Ce.popupVisible:Pe=!!Ce.defaultPopupVisible,ye.state={prevPopupVisible:Pe,popupVisible:Pe},vi.forEach(function(je){ye["fire".concat(je)]=function(Ue){ye.fireEvents(je,Ue)}}),ye}return Object(O.a)(he,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this.props,Pe=this.state;if(Pe.popupVisible){var je;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(je=ye.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Se.a)(je,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(je=je||ye.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Se.a)(je,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(je=je||ye.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Se.a)(je,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Se.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),et.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ye;return((ye=this.popupRef.current)===null||ye===void 0?void 0:ye.getElement())||null}},{key:"getPopupAlign",value:function(){var ye=this.props,Pe=ye.popupPlacement,je=ye.popupAlign,Ue=ye.builtinPlacements;return Pe&&Ue?Ke(Ue,Pe,je):je}},{key:"setPopupVisible",value:function(ye,Pe){var je=this.props.alignPoint,Ue=this.state.popupVisible;this.clearDelayTimer(),Ue!==ye&&("popupVisible"in this.props||this.setState({popupVisible:ye,prevPopupVisible:Ue}),this.props.onPopupVisibleChange(ye)),je&&Pe&&ye&&this.setPoint(Pe)}},{key:"delaySetPopupVisible",value:function(ye,Pe,je){var Ue=this,Ne=Pe*1e3;if(this.clearDelayTimer(),Ne){var ze=je?{pageX:je.pageX,pageY:je.pageY}:null;this.delayTimer=window.setTimeout(function(){Ue.setPopupVisible(ye,ze),Ue.clearDelayTimer()},Ne)}else this.setPopupVisible(ye,je)}},{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(ye){var Pe=this.props.children.props,je=this.props;return Pe[ye]&&je[ye]?this["fire".concat(ye)]:Pe[ye]||je[ye]}},{key:"isClickToShow",value:function(){var ye=this.props,Pe=ye.action,je=ye.showAction;return Pe.indexOf("click")!==-1||je.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ye=this.props.action;return ye==="contextMenu"||ye.length===1&&ye[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ye=this.props,Pe=ye.action,je=ye.showAction;return Pe.indexOf("contextMenu")!==-1||je.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ye=this.props,Pe=ye.action,je=ye.hideAction;return Pe.indexOf("click")!==-1||je.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ye=this.props,Pe=ye.action,je=ye.showAction;return Pe.indexOf("hover")!==-1||je.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ye=this.props,Pe=ye.action,je=ye.hideAction;return Pe.indexOf("hover")!==-1||je.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ye=this.props,Pe=ye.action,je=ye.showAction;return Pe.indexOf("focus")!==-1||je.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ye=this.props,Pe=ye.action,je=ye.hideAction;return Pe.indexOf("focus")!==-1||je.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ye;(ye=this.popupRef.current)===null||ye===void 0||ye.forceAlign()}}},{key:"fireEvents",value:function(ye,Pe){var je=this.props.children.props[ye];je&&je(Pe);var Ue=this.props[ye];Ue&&Ue(Pe)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ye=this.state.popupVisible,Pe=this.props,je=Pe.children,Ue=Pe.forceRender,Ne=Pe.alignPoint,ze=Pe.className,ot=Pe.autoDestroy,xt=d.Children.only(je),wt={key:"trigger"};this.isContextMenuToShow()?wt.onContextMenu=this.onContextMenu:wt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(wt.onClick=this.onClick,wt.onMouseDown=this.onMouseDown,wt.onTouchStart=this.onTouchStart):(wt.onClick=this.createTwoChains("onClick"),wt.onMouseDown=this.createTwoChains("onMouseDown"),wt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(wt.onMouseEnter=this.onMouseEnter,Ne&&(wt.onMouseMove=this.onMouseMove)):wt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?wt.onMouseLeave=this.onMouseLeave:wt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(wt.onFocus=this.onFocus,wt.onBlur=this.onBlur):(wt.onFocus=this.createTwoChains("onFocus"),wt.onBlur=this.createTwoChains("onBlur"));var Ft=_()(xt&&xt.props&&xt.props.className,ze);Ft&&(wt.className=Ft);var xr=Object(P.a)({},wt);Object(Me.c)(xt)&&(xr.ref=Object(Me.a)(this.triggerRef,xt.ref));var jr=d.cloneElement(xt,xr),Nr;return(ye||this.popupRef.current||Ue)&&(Nr=d.createElement(Ae,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ye&&ot&&(Nr=null),d.createElement(za.Provider,{value:this.triggerContextValue},jr,Nr)}}],[{key:"getDerivedStateFromProps",value:function(ye,Pe){var je=ye.popupVisible,Ue={};return je!==void 0&&Pe.popupVisible!==je&&(Ue.popupVisible=je,Ue.prevPopupVisible=Pe.popupVisible),Ue}}]),he}(d.Component);return Fe.contextType=za,Fe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ga,getDocument:ka,onPopupVisibleChange:ba,afterPopupVisibleChange:ba,onPopupAlign:ba,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Fe}var Na=gi(Ye.a),la={adjustX:1,adjustY:1},si={topLeft:{points:["bl","tl"],overflow:la,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:la,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:la,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:la,offset:[4,0]}},li={topLeft:{points:["bl","tl"],overflow:la,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:la,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:la,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:la,offset:[4,0]}},mt=si,Ze=0,ht={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},bt=function(Fe,We,Le){var he=te(We),Ce=Fe.getState();Fe.setState({defaultActiveFirst:Object(P.a)(Object(P.a)({},Ce.defaultActiveFirst),{},Object(D.a)({},he,Le))})},Ht=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(Le){var he;Object(L.a)(this,We),he=Fe.call(this,Le),he.onDestroy=function(Ne){he.props.onDestroy(Ne)},he.onKeyDown=function(Ne){var ze=Ne.keyCode,ot=he.menuInstance,xt=he.props.store,wt=he.getVisible();if(ze===g.a.ENTER)return he.onTitleClick(Ne),bt(xt,he.props.eventKey,!0),!0;if(ze===g.a.RIGHT)return wt?ot.onKeyDown(Ne):(he.triggerOpenChange(!0),bt(xt,he.props.eventKey,!0)),!0;if(ze===g.a.LEFT){var Ft;if(wt)Ft=ot.onKeyDown(Ne);else return;return Ft||(he.triggerOpenChange(!1),Ft=!0),Ft}return wt&&(ze===g.a.UP||ze===g.a.DOWN)?ot.onKeyDown(Ne):void 0},he.onOpenChange=function(Ne){he.props.onOpenChange(Ne)},he.onPopupVisibleChange=function(Ne){he.triggerOpenChange(Ne,Ne?"mouseenter":"mouseleave")},he.onMouseEnter=function(Ne){var ze=he.props,ot=ze.eventKey,xt=ze.onMouseEnter,wt=ze.store;bt(wt,he.props.eventKey,!1),xt({key:ot,domEvent:Ne})},he.onMouseLeave=function(Ne){var ze=he.props,ot=ze.parentMenu,xt=ze.eventKey,wt=ze.onMouseLeave;ot.subMenuInstance=Object(x.a)(he),wt({key:xt,domEvent:Ne})},he.onTitleMouseEnter=function(Ne){var ze=he.props,ot=ze.eventKey,xt=ze.onItemHover,wt=ze.onTitleMouseEnter;xt({key:ot,hover:!0}),wt({key:ot,domEvent:Ne})},he.onTitleMouseLeave=function(Ne){var ze=he.props,ot=ze.parentMenu,xt=ze.eventKey,wt=ze.onItemHover,Ft=ze.onTitleMouseLeave;ot.subMenuInstance=Object(x.a)(he),wt({key:xt,hover:!1}),Ft({key:xt,domEvent:Ne})},he.onTitleClick=function(Ne){var ze=Object(x.a)(he),ot=ze.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Ne}),ot.triggerSubMenuAction==="hover")return;he.triggerOpenChange(!he.getVisible(),"click"),bt(ot.store,he.props.eventKey,!1)},he.onSubMenuClick=function(Ne){typeof he.props.onClick=="function"&&he.props.onClick(he.addKeyPath(Ne))},he.onSelect=function(Ne){he.props.onSelect(Ne)},he.onDeselect=function(Ne){he.props.onDeselect(Ne)},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(Ne){he.menuInstance=Ne},he.addKeyPath=function(Ne){return Object(P.a)(Object(P.a)({},Ne),{},{keyPath:(Ne.keyPath||[]).concat(he.props.eventKey)})},he.triggerOpenChange=function(Ne,ze){var ot=he.props.eventKey,xt=function(){he.onOpenChange({key:ot,item:Object(x.a)(he),trigger:ze,open:Ne})};ze==="mouseenter"?he.mouseenterTimeout=setTimeout(function(){xt()},0):xt()},he.isChildrenSelected=function(){var Ne={find:!1};return X(he.props.children,he.props.selectedKeys,Ne),Ne.find},he.isInlineMode=function(){return he.getMode()==="inline"},he.adjustWidth=function(){if(!he.subMenuTitle||!he.menuInstance)return;var Ne=$e.findDOMNode(he.menuInstance);if(Ne.offsetWidth>=he.subMenuTitle.offsetWidth)return;Ne.style.minWidth="".concat(he.subMenuTitle.offsetWidth,"px")},he.saveSubMenuTitle=function(Ne){he.subMenuTitle=Ne},he.getBaseProps=function(){var Ne=Object(x.a)(he),ze=Ne.props,ot=he.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:he.getVisible(),level:ze.level+1,inlineIndent:ze.inlineIndent,focusable:!1,onClick:he.onSubMenuClick,onSelect:he.onSelect,onDeselect:he.onDeselect,onDestroy:he.onDestroy,selectedKeys:ze.selectedKeys,eventKey:"".concat(ze.eventKey,"-menu-"),openKeys:ze.openKeys,motion:ze.motion,onOpenChange:he.onOpenChange,subMenuOpenDelay:ze.subMenuOpenDelay,parentMenu:Object(x.a)(he),subMenuCloseDelay:ze.subMenuCloseDelay,forceSubMenuRender:ze.forceSubMenuRender,triggerSubMenuAction:ze.triggerSubMenuAction,builtinPlacements:ze.builtinPlacements,defaultActiveFirst:ze.store.getState().defaultActiveFirst[te(ze.eventKey)],multiple:ze.multiple,prefixCls:ze.rootPrefixCls,id:he.internalMenuId,manualRef:he.saveMenuInstance,itemIcon:ze.itemIcon,expandIcon:ze.expandIcon,direction:ze.direction}},he.getMotion=function(Ne,ze){var ot=Object(x.a)(he),xt=ot.haveRendered,wt=he.props,Ft=wt.motion,xr=wt.rootPrefixCls,jr=Object(P.a)(Object(P.a)({},Ft),{},{leavedClassName:"".concat(xr,"-hidden"),removeOnLeave:!1,motionAppear:xt||!ze||Ne!=="inline"});return jr};var Ce=Le.store,ye=Le.eventKey,Pe=Ce.getState(),je=Pe.defaultActiveFirst;he.isRootMenu=!1;var Ue=!1;return je&&(Ue=je[ye]),bt(Ce,ye,Ue),he.state={mode:Le.mode,isOpen:Le.isOpen},he}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var he=this,Ce=this.props,ye=Ce.mode,Pe=Ce.parentMenu,je=Ce.manualRef,Ue=Ce.isOpen,Ne=function(){he.setState({mode:ye,isOpen:Ue})},ze=Ue!==this.state.isOpen,ot=ye!==this.state.mode;if((ot||ze)&&(et.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(et.a)(Ne):Ne()),je&&je(this),ye!=="horizontal"||!(Pe==null?void 0:Pe.isRootMenu)||!Ue)return;this.minWidthTimeout=setTimeout(function(){return he.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var he=this.props,Ce=he.onDestroy,ye=he.eventKey;Ce&&Ce(ye),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),et.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(he,Ce){var ye=this.getBaseProps();return d.createElement(hr,Object(s.a)({},ye,{id:this.internalMenuId,className:he,style:Ce}),this.props.children)}},{key:"renderChildren",value:function(){var he=this,Ce=this.getBaseProps(),ye=Ce.mode,Pe=Ce.visible,je=Ce.forceSubMenuRender,Ue=Ce.direction,Ne=this.getMotion(ye,Pe);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Pe||je,!this.haveOpened)return d.createElement("div",null);var ze=_()("".concat(Ce.prefixCls,"-sub"),Object(D.a)({},"".concat(Ce.prefixCls,"-rtl"),Ue==="rtl"));return this.isInlineMode()?d.createElement(zn,Object(s.a)({visible:Ce.visible,forceRender:je},Ne),function(ot){var xt=ot.className,wt=ot.style,Ft=_()(ze,xt);return he.renderPopupMenu(Ft,wt)}):this.renderPopupMenu(ze)}},{key:"render",value:function(){var he,Ce,ye,Pe=Object(P.a)({},this.props),je=this.getVisible(),Ue=this.getPrefixCls(),Ne=this.isInlineMode(),ze=this.getMode(),ot=_()(Ue,"".concat(Ue,"-").concat(ze),(he={},Object(D.a)(he,Pe.className,!!Pe.className),Object(D.a)(he,this.getOpenClassName(),je),Object(D.a)(he,this.getActiveClassName(),Pe.active||je&&!Ne),Object(D.a)(he,this.getDisabledClassName(),Pe.disabled),Object(D.a)(he,this.getSelectedClassName(),this.isChildrenSelected()),he));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(Ze+=1,this.internalMenuId="$__$".concat(Ze,"$Menu")));var xt={},wt={},Ft={};Pe.disabled||(xt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},wt={onClick:this.onTitleClick},Ft={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var xr={},jr=Pe.direction,Nr=jr==="rtl";Ne&&(Nr?xr.paddingRight=Pe.inlineIndent*Pe.level:xr.paddingLeft=Pe.inlineIndent*Pe.level);var Wr={};this.getVisible()&&(Wr={"aria-owns":this.internalMenuId});var Dr=null;ze!=="horizontal"&&(Dr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Dr=d.createElement(this.props.expandIcon,Object(P.a)({},this.props))));var Kr=d.createElement("div",Object(s.a)({ref:this.saveSubMenuTitle,style:xr,className:"".concat(Ue,"-title"),role:"button"},Ft,wt,{"aria-expanded":je},Wr,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,Dr||d.createElement("i",{className:"".concat(Ue,"-arrow")})),zr=this.renderChildren(),rn=((Ce=Pe.parentMenu)===null||Ce===void 0?void 0:Ce.isRootMenu)?Pe.parentMenu.props.getPopupContainer:function(dn){return dn.parentNode},$r=ht[ze],vn=Pe.popupOffset?{offset:Pe.popupOffset}:{},Yr=_()((ye={},Object(D.a)(ye,Pe.popupClassName,Pe.popupClassName&&!Ne),Object(D.a)(ye,"".concat(Ue,"-rtl"),Nr),ye)),Tr=Pe.disabled,Or=Pe.triggerSubMenuAction,Xr=Pe.subMenuOpenDelay,tn=Pe.forceSubMenuRender,mr=Pe.subMenuCloseDelay,an=Pe.builtinPlacements;$.forEach(function(dn){return delete Pe[dn]}),delete Pe.onClick;var An=Nr?Object(P.a)(Object(P.a)({},li),an):Object(P.a)(Object(P.a)({},si),an);delete Pe.direction;var un=this.getBaseProps(),En=Ne?null:this.getMotion(un.mode,un.visible);return d.createElement("li",Object(s.a)({},Pe,xt,{className:ot,role:"menuitem"}),d.createElement(Na,{prefixCls:Ue,popupClassName:_()("".concat(Ue,"-popup"),Yr),getPopupContainer:rn,builtinPlacements:An,popupPlacement:$r,popupVisible:Ne?!1:je,popupAlign:vn,popup:Ne?null:zr,action:Tr||Ne?[]:[Or],mouseEnterDelay:Xr,mouseLeaveDelay:mr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:tn,popupMotion:En},Kr),Ne?zr:null)}}]),We}(d.Component);Ht.defaultProps={onMouseEnter:q,onMouseLeave:q,onTitleMouseEnter:q,onTitleMouseLeave:q,onTitleClick:q,manualRef:q,mode:"vertical",title:""};var Ot=Object(T.b)(function(Ae,Fe){var We=Ae.openKeys,Le=Ae.activeKey,he=Ae.selectedKeys,Ce=Fe.eventKey,ye=Fe.subMenuKey;return{isOpen:We.indexOf(Ce)>-1,active:Le[ye]===Ce,selectedKeys:he}})(Ht);Ot.isSubMenu=!0;var tr=Ot,Pt="menuitem-overflowed",ct=.5,vt=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(){var Le;return Object(L.a)(this,We),Le=Fe.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=d.createRef(),Le.getMenuItemNodes=function(){var he=Le.props.prefixCls,Ce=Le.childRef.current;return Ce?[].slice.call(Ce.children).filter(function(ye){return ye.className.split(" ").indexOf("".concat(he,"-overflowed-submenu"))<0}):[]},Le.getOverflowedSubMenuItem=function(he,Ce,ye){var Pe=Le.props,je=Pe.overflowedIndicator,Ue=Pe.level,Ne=Pe.mode,ze=Pe.prefixCls,ot=Pe.theme;if(Ue!==1||Ne!=="horizontal")return null;var xt=Le.props.children[0],wt=xt.props,Ft=wt.children,xr=wt.title,jr=wt.style,Nr=Object(S.a)(wt,["children","title","style"]),Wr=Object(P.a)({},jr),Dr="".concat(he,"-overflowed-indicator"),Kr="".concat(he,"-overflowed-indicator");Ce.length===0&&ye!==!0?Wr=Object(P.a)(Object(P.a)({},Wr),{},{display:"none"}):ye&&(Wr=Object(P.a)(Object(P.a)({},Wr),{},{visibility:"hidden",position:"absolute"}),Dr="".concat(Dr,"-placeholder"),Kr="".concat(Kr,"-placeholder"));var zr=ot?"".concat(ze,"-").concat(ot):"",rn={};return $.forEach(function($r){Nr[$r]!==void 0&&(rn[$r]=Nr[$r])}),d.createElement(tr,Object(s.a)({title:je,className:"".concat(ze,"-overflowed-submenu"),popupClassName:zr},rn,{key:Dr,eventKey:Kr,disabled:!1,style:Wr}),Ce)},Le.setChildrenWidthAndResize=function(){if(Le.props.mode!=="horizontal")return;var he=Le.childRef.current;if(!he)return;var Ce=he.children;if(!Ce||Ce.length===0)return;var ye=he.children[Ce.length-1];fe(ye,"display","inline-block");var Pe=Le.getMenuItemNodes(),je=Pe.filter(function(Ue){return Ue.className.split(" ").indexOf(Pt)>=0});je.forEach(function(Ue){fe(Ue,"display","inline-block")}),Le.menuItemSizes=Pe.map(function(Ue){return ge(Ue,!0)}),je.forEach(function(Ue){fe(Ue,"display","none")}),Le.overflowedIndicatorWidth=ge(he.children[he.children.length-1],!0),Le.originalTotalWidth=Le.menuItemSizes.reduce(function(Ue,Ne){return Ue+Ne},0),Le.handleResize(),fe(ye,"display","none")},Le.handleResize=function(){if(Le.props.mode!=="horizontal")return;var he=Le.childRef.current;if(!he)return;var Ce=ge(he);Le.overflowedItems=[];var ye=0,Pe;Le.originalTotalWidth>Ce+ct&&(Pe=-1,Le.menuItemSizes.forEach(function(je){ye+=je,ye+Le.overflowedIndicatorWidth<=Ce&&(Pe+=1)})),Le.setState({lastVisibleIndex:Pe})},Le}return Object(O.a)(We,[{key:"componentDidMount",value:function(){var he=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ce=this.childRef.current;if(!Ce)return;this.resizeObserver=new He.default(function(ye){ye.forEach(function(){var Pe=he.cancelFrameId;cancelAnimationFrame(Pe),he.cancelFrameId=requestAnimationFrame(he.setChildrenWidthAndResize)})}),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){he.resizeObserver.observe(ye)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){he.resizeObserver.disconnect(),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){he.resizeObserver.observe(ye)}),he.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ce,{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 Ce=this,ye=this.state.lastVisibleIndex;return(he||[]).reduce(function(Pe,je,Ue){var Ne=je;if(Ce.props.mode==="horizontal"){var ze=Ce.getOverflowedSubMenuItem(je.props.eventKey,[]);ye!==void 0&&Ce.props.className.indexOf("".concat(Ce.props.prefixCls,"-root"))!==-1&&(Ue>ye&&(Ne=d.cloneElement(je,{style:{display:"none"},eventKey:"".concat(je.props.eventKey,"-hidden"),className:"".concat(Pt)})),Ue===ye+1&&(Ce.overflowedItems=he.slice(ye+1).map(function(xt){return d.cloneElement(xt,{key:xt.props.eventKey,mode:"vertical-left"})}),ze=Ce.getOverflowedSubMenuItem(je.props.eventKey,Ce.overflowedItems)));var ot=[].concat(Object(i.a)(Pe),[ze,Ne]);return Ue===he.length-1&&ot.push(Ce.getOverflowedSubMenuItem(je.props.eventKey,[],!0)),ot}return[].concat(Object(i.a)(Pe),[Ne])},[])}},{key:"render",value:function(){var he=this.props,Ce=he.visible,ye=he.prefixCls,Pe=he.overflowedIndicator,je=he.mode,Ue=he.level,Ne=he.tag,ze=he.children,ot=he.theme,xt=Object(S.a)(he,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),wt=Ne;return d.createElement(wt,Object(s.a)({ref:this.childRef},xt),this.renderChildren(ze))}}]),We}(d.Component);vt.defaultProps={tag:"div",className:""};var yt=vt;function or(Ae){return Ae.length?Ae.every(function(Fe){return!!Fe.props.disabled}):!0}function Xt(Ae,Fe,We){var Le=Ae.getState();Ae.setState({activeKey:Object(P.a)(Object(P.a)({},Le.activeKey),{},Object(D.a)({},Fe,We))})}function zt(Ae){return Ae.eventKey||"0-menu-"}function jt(Ae,Fe){var We=Fe,Le=Ae.children,he=Ae.eventKey;if(We){var Ce;if(J(Le,function(ye,Pe){ye&&ye.props&&!ye.props.disabled&&We===be(ye,he,Pe)&&(Ce=!0)}),Ce)return We}return We=null,Ae.defaultActiveFirst&&J(Le,function(ye,Pe){!We&&ye&&!ye.props.disabled&&(We=be(ye,he,Pe))}),We}function Vt(Ae){if(!Ae)return;var Fe=this.instanceArray.indexOf(Ae);Fe!==-1?this.instanceArray[Fe]=Ae:this.instanceArray.push(Ae)}var Yt=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(Le){var he;return Object(L.a)(this,We),he=Fe.call(this,Le),he.onKeyDown=function(Ce,ye){var Pe=Ce.keyCode,je;if(he.getFlatInstanceArray().forEach(function(Ne){Ne&&Ne.props.active&&Ne.onKeyDown&&(je=Ne.onKeyDown(Ce))}),je)return 1;var Ue=null;return(Pe===g.a.UP||Pe===g.a.DOWN)&&(Ue=he.step(Pe===g.a.UP?-1:1)),Ue?(Ce.preventDefault(),Xt(he.props.store,zt(he.props),Ue.props.eventKey),typeof ye=="function"&&ye(Ue),1):void 0},he.onItemHover=function(Ce){var ye=Ce.key,Pe=Ce.hover;Xt(he.props.store,zt(he.props),Pe?ye:null)},he.onDeselect=function(Ce){he.props.onDeselect(Ce)},he.onSelect=function(Ce){he.props.onSelect(Ce)},he.onClick=function(Ce){he.props.onClick(Ce)},he.onOpenChange=function(Ce){he.props.onOpenChange(Ce)},he.onDestroy=function(Ce){he.props.onDestroy(Ce)},he.getFlatInstanceArray=function(){return he.instanceArray},he.step=function(Ce){var ye=he.getFlatInstanceArray(),Pe=he.props.store.getState().activeKey[zt(he.props)],je=ye.length;if(!je)return null;Ce<0&&(ye=ye.concat().reverse());var Ue=-1;if(ye.every(function(xt,wt){return xt&&xt.props.eventKey===Pe?(Ue=wt,!1):!0}),!he.props.defaultActiveFirst&&Ue!==-1&&or(ye.slice(Ue,je-1)))return;var Ne=(Ue+1)%je,ze=Ne;do{var ot=ye[ze];if(!ot||ot.props.disabled)ze=(ze+1)%je;else return ot}while(ze!==Ne);return null},he.renderCommonMenuItem=function(Ce,ye,Pe){var je=he.props.store.getState(),Ue=Object(x.a)(he),Ne=Ue.props,ze=be(Ce,Ne.eventKey,ye),ot=Ce.props;if(!ot||typeof Ce.type=="string")return Ce;var xt=ze===je.activeKey,wt=Object(P.a)(Object(P.a)({mode:ot.mode||Ne.mode,level:Ne.level,inlineIndent:Ne.inlineIndent,renderMenuItem:he.renderMenuItem,rootPrefixCls:Ne.prefixCls,index:ye,parentMenu:Ne.parentMenu,manualRef:ot.disabled?void 0:Object(N.a)(Ce.ref,Vt.bind(Object(x.a)(he))),eventKey:ze,active:!ot.disabled&&xt,multiple:Ne.multiple,onClick:function(xr){(ot.onClick||q)(xr),he.onClick(xr)},onItemHover:he.onItemHover,motion:Ne.motion,subMenuOpenDelay:Ne.subMenuOpenDelay,subMenuCloseDelay:Ne.subMenuCloseDelay,forceSubMenuRender:Ne.forceSubMenuRender,onOpenChange:he.onOpenChange,onDeselect:he.onDeselect,onSelect:he.onSelect,builtinPlacements:Ne.builtinPlacements,itemIcon:ot.itemIcon||he.props.itemIcon,expandIcon:ot.expandIcon||he.props.expandIcon},Pe),{},{direction:Ne.direction});return(Ne.mode==="inline"||_e())&&(wt.triggerSubMenuAction="click"),d.cloneElement(Ce,Object(P.a)(Object(P.a)({},wt),{},{key:ze||ye}))},he.renderMenuItem=function(Ce,ye,Pe){if(!Ce)return null;var je=he.props.store.getState(),Ue={openKeys:je.openKeys,selectedKeys:je.selectedKeys,triggerSubMenuAction:he.props.triggerSubMenuAction,subMenuKey:Pe};return he.renderCommonMenuItem(Ce,ye,Ue)},Le.store.setState({activeKey:Object(P.a)(Object(P.a)({},Le.store.getState().activeKey),{},Object(D.a)({},Le.eventKey,jt(Le,Le.activeKey)))}),he.instanceArray=[],he}return Object(O.a)(We,[{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||!W()(this.props.style,he.style)}},{key:"componentDidUpdate",value:function(he){var Ce=this.props,ye="activeKey"in Ce?Ce.activeKey:Ce.store.getState().activeKey[zt(Ce)],Pe=jt(Ce,ye);if(Pe!==ye)Xt(Ce.store,zt(Ce),Pe);else if("activeKey"in he){var je=jt(he,he.activeKey);Pe!==je&&Xt(Ce.store,zt(Ce),Pe)}}},{key:"render",value:function(){var he=this,Ce=Object(s.a)({},this.props);this.instanceArray=[];var ye=_()(Ce.prefixCls,Ce.className,"".concat(Ce.prefixCls,"-").concat(Ce.mode)),Pe={className:ye,role:Ce.role||"menu"};Ce.id&&(Pe.id=Ce.id),Ce.focusable&&(Pe.tabIndex=0,Pe.onKeyDown=this.onKeyDown);var je=Ce.prefixCls,Ue=Ce.eventKey,Ne=Ce.visible,ze=Ce.level,ot=Ce.mode,xt=Ce.overflowedIndicator,wt=Ce.theme;return $.forEach(function(Ft){return delete Ce[Ft]}),delete Ce.onClick,d.createElement(yt,Object(s.a)({},Ce,{prefixCls:je,mode:ot,tag:"ul",level:ze,theme:wt,visible:Ne,overflowedIndicator:xt},Pe),Object(c.a)(Ce.children).map(function(Ft,xr){return he.renderMenuItem(Ft,xr,Ue||"0-menu-")}))}}]),We}(d.Component);Yt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:q};var Qe=Object(T.b)()(Yt),hr=Qe,wr=M("Kwbf");function lr(Ae,Fe,We){var Le=Ae.prefixCls,he=Ae.motion,Ce=Ae.defaultMotions,ye=Ce===void 0?{}:Ce,Pe=Ae.openAnimation,je=Ae.openTransitionName,Ue=Fe.switchingModeFromInline;if(he)return he;if(Object(K.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(je)return{motionName:je};var Ne=ye[We];return Ne||(Ue?null:ye.other)}var $t=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(Le){var he;Object(L.a)(this,We),he=Fe.call(this,Le),he.onSelect=function(Pe){var je=Object(x.a)(he),Ue=je.props;if(Ue.selectable){var Ne=he.store.getState(),ze=Ne.selectedKeys,ot=Pe.key;Ue.multiple?ze=ze.concat([ot]):ze=[ot],"selectedKeys"in Ue||he.store.setState({selectedKeys:ze}),Ue.onSelect(Object(P.a)(Object(P.a)({},Pe),{},{selectedKeys:ze}))}},he.onClick=function(Pe){var je=he.getRealMenuMode(),Ue=Object(x.a)(he),Ne=Ue.store,ze=Ue.props.onOpenChange;je!=="inline"&&!("openKeys"in he.props)&&(Ne.setState({openKeys:[]}),ze([])),he.props.onClick(Pe)},he.onKeyDown=function(Pe,je){he.innerMenu.getWrappedInstance().onKeyDown(Pe,je)},he.onOpenChange=function(Pe){var je=Object(x.a)(he),Ue=je.props,Ne=he.store.getState().openKeys.concat(),ze=!1,ot=function(wt){var Ft=!1;if(wt.open)Ft=Ne.indexOf(wt.key)===-1,Ft&&Ne.push(wt.key);else{var xr=Ne.indexOf(wt.key);Ft=xr!==-1,Ft&&Ne.splice(xr,1)}ze=ze||Ft};Array.isArray(Pe)?Pe.forEach(ot):ot(Pe),ze&&("openKeys"in he.props||he.store.setState({openKeys:Ne}),Ue.onOpenChange(Ne))},he.onDeselect=function(Pe){var je=Object(x.a)(he),Ue=je.props;if(Ue.selectable){var Ne=he.store.getState().selectedKeys.concat(),ze=Pe.key,ot=Ne.indexOf(ze);ot!==-1&&Ne.splice(ot,1),"selectedKeys"in Ue||he.store.setState({selectedKeys:Ne}),Ue.onDeselect(Object(P.a)(Object(P.a)({},Pe),{},{selectedKeys:Ne}))}},he.onMouseEnter=function(Pe){he.restoreModeVerticalFromInline();var je=he.props.onMouseEnter;je&&je(Pe)},he.onTransitionEnd=function(Pe){var je=Pe.propertyName==="width"&&Pe.target===Pe.currentTarget,Ue=Pe.target.className,Ne=Object.prototype.toString.call(Ue)==="[object SVGAnimatedString]"?Ue.animVal:Ue,ze=Pe.propertyName==="font-size"&&Ne.indexOf("anticon")>=0;(je||ze)&&he.restoreModeVerticalFromInline()},he.setInnerMenu=function(Pe){he.innerMenu=Pe},he.isRootMenu=!0;var Ce=Le.defaultSelectedKeys,ye=Le.defaultOpenKeys;return"selectedKeys"in Le&&(Ce=Le.selectedKeys||[]),"openKeys"in Le&&(ye=Le.openKeys||[]),he.store=Object(T.c)({selectedKeys:Ce,openKeys:ye,activeKey:{"0-menu-":jt(Le,Le.activeKey)}}),he.state={switchingModeFromInline:!1,prevProps:Le,inlineOpenKeys:[],store:he.store},he}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(he){var Ce=this.props,ye=Ce.siderCollapsed,Pe=Ce.inlineCollapsed,je=Ce.onOpenChange;(!he.inlineCollapsed&&Pe||!he.siderCollapsed&&ye)&&je([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var he=this.props.collapsedWidth,Ce=this.store,ye=this.prevOpenKeys,Pe=this.getInlineCollapsed()&&(he===0||he==="0"||he==="0px");Pe?(this.prevOpenKeys=Ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ye&&(this.store.setState({openKeys:ye}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var he=this.props.mode,Ce=this.state.switchingModeFromInline,ye=this.getInlineCollapsed();return Ce&&ye?"inline":ye?"vertical":he}},{key:"getInlineCollapsed",value:function(){var he=this.props,Ce=he.inlineCollapsed,ye=he.siderCollapsed;return ye!==void 0?ye:Ce}},{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(P.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ce=this.getRealMenuMode();return he.className+=" ".concat(he.prefixCls,"-root"),he.direction==="rtl"&&(he.className+=" ".concat(he.prefixCls,"-rtl")),he=Object(P.a)(Object(P.a)({},he),{},{mode:Ce,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:lr(this.props,this.state,Ce)}),delete he.openAnimation,delete he.openTransitionName,d.createElement(T.a,{store:this.store},d.createElement(hr,Object(s.a)({},he,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(he,Ce){var ye=Ce.prevProps,Pe=Ce.store,je=Pe.getState(),Ue={},Ne={prevProps:he};return ye.mode==="inline"&&he.mode!=="inline"&&(Ne.switchingModeFromInline=!0),"openKeys"in he?Ue.openKeys=he.openKeys||[]:((he.inlineCollapsed&&!ye.inlineCollapsed||he.siderCollapsed&&!ye.siderCollapsed)&&(Ne.switchingModeFromInline=!0,Ne.inlineOpenKeys=je.openKeys,Ue.openKeys=[]),(!he.inlineCollapsed&&ye.inlineCollapsed||!he.siderCollapsed&&ye.siderCollapsed)&&(Ue.openKeys=Ce.inlineOpenKeys,Ne.inlineOpenKeys=[])),Object.keys(Ue).length&&Pe.setState(Ue),Ne}}]),We}(d.Component);$t.defaultProps={selectable:!0,onClick:q,onSelect:q,onOpenChange:q,onDeselect:q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:d.createElement("span",null,"\xB7\xB7\xB7")};var ar=$t,Kt=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(){var Le;return Object(L.a)(this,We),Le=Fe.apply(this,arguments),Le.onKeyDown=function(he){var Ce=he.keyCode;return Ce===g.a.ENTER?(Le.onClick(he),!0):void 0},Le.onMouseLeave=function(he){var Ce=Le.props,ye=Ce.eventKey,Pe=Ce.onItemHover,je=Ce.onMouseLeave;Pe({key:ye,hover:!1}),je({key:ye,domEvent:he})},Le.onMouseEnter=function(he){var Ce=Le.props,ye=Ce.eventKey,Pe=Ce.onItemHover,je=Ce.onMouseEnter;Pe({key:ye,hover:!0}),je({key:ye,domEvent:he})},Le.onClick=function(he){var Ce=Le.props,ye=Ce.eventKey,Pe=Ce.multiple,je=Ce.onClick,Ue=Ce.onSelect,Ne=Ce.onDeselect,ze=Ce.isSelected,ot={key:ye,keyPath:[ye],item:Object(x.a)(Le),domEvent:he};je(ot),Pe?ze?Ne(ot):Ue(ot):ze||Ue(ot)},Le.saveNode=function(he){Le.node=he},Le}return Object(O.a)(We,[{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,Ce=Object(P.a)({},this.props),ye=_()(this.getPrefixCls(),Ce.className,(he={},Object(D.a)(he,this.getActiveClassName(),!Ce.disabled&&Ce.active),Object(D.a)(he,this.getSelectedClassName(),Ce.isSelected),Object(D.a)(he,this.getDisabledClassName(),Ce.disabled),he)),Pe=Object(P.a)(Object(P.a)({},Ce.attribute),{},{title:typeof Ce.title=="string"?Ce.title:void 0,className:ye,role:Ce.role||"menuitem","aria-disabled":Ce.disabled});Ce.role==="option"?Pe=Object(P.a)(Object(P.a)({},Pe),{},{role:"option","aria-selected":Ce.isSelected}):(Ce.role===null||Ce.role==="none")&&(Pe.role="none");var je={onClick:Ce.disabled?null:this.onClick,onMouseLeave:Ce.disabled?null:this.onMouseLeave,onMouseEnter:Ce.disabled?null:this.onMouseEnter},Ue=Object(P.a)({},Ce.style);Ce.mode==="inline"&&(Ce.direction==="rtl"?Ue.paddingRight=Ce.inlineIndent*Ce.level:Ue.paddingLeft=Ce.inlineIndent*Ce.level),$.forEach(function(ze){return delete Ce[ze]}),delete Ce.direction;var Ne=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ne=d.createElement(this.props.itemIcon,this.props)),d.createElement("li",Object(s.a)({},Object(k.a)(Ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Pe,je,{style:Ue,ref:this.saveNode}),Ce.children,Ne)}}]),We}(d.Component);Kt.isMenuItem=!0,Kt.defaultProps={onSelect:q,onMouseEnter:q,onMouseLeave:q,manualRef:q};var Jt=Object(T.b)(function(Ae,Fe){var We=Ae.activeKey,Le=Ae.selectedKeys,he=Fe.eventKey,Ce=Fe.subMenuKey;return{active:We[Ce]===he,isSelected:Array.isArray(Le)?Le.indexOf(he)!==-1:Le===he}})(Kt),Ar=Jt,At=function(Ae){Object(b.a)(We,Ae);var Fe=Object(y.a)(We);function We(){var Le;return Object(L.a)(this,We),Le=Fe.apply(this,arguments),Le.renderInnerMenuItem=function(he){var Ce=Le.props,ye=Ce.renderMenuItem,Pe=Ce.index;return ye(he,Pe,Le.props.subMenuKey)},Le}return Object(O.a)(We,[{key:"render",value:function(){var he=Object(s.a)({},this.props),Ce=he.className,ye=Ce===void 0?"":Ce,Pe=he.rootPrefixCls,je="".concat(Pe,"-item-group-title"),Ue="".concat(Pe,"-item-group-list"),Ne=he.title,ze=he.children;return $.forEach(function(ot){return delete he[ot]}),delete he.direction,d.createElement("li",Object(s.a)({},he,{onClick:function(xt){return xt.stopPropagation()},className:"".concat(ye," ").concat(Pe,"-item-group")}),d.createElement("div",{className:je,title:typeof Ne=="string"?Ne:void 0},Ne),d.createElement("ul",{className:Ue},d.Children.map(ze,this.renderInnerMenuItem)))}}]),We}(d.Component);At.isMenuItemGroup=!0,At.defaultProps={disabled:!0};var kt=At,Lt=function(Fe){var We=Fe.className,Le=Fe.rootPrefixCls,he=Fe.style;return d.createElement("li",{className:"".concat(We," ").concat(Le,"-item-divider"),style:he})};Lt.defaultProps={disabled:!0,className:"",style:{}};var Qt=Lt,gr=ar,Xe=M("eDIo");function Ct(Ae,Fe){var We=Ae.prefixCls,Le=Ae.editable,he=Ae.locale,Ce=Ae.style;return!Le||Le.showAdd===!1?null:d.createElement("button",{ref:Fe,type:"button",className:"".concat(We,"-nav-add"),style:Ce,"aria-label":(he==null?void 0:he.addAriaLabel)||"Add tab",onClick:function(Pe){Le.onEdit("add",{event:Pe})}},Le.addIcon||"+")}var kr=d.forwardRef(Ct);function Ur(Ae,Fe){var We=Ae.prefixCls,Le=Ae.id,he=Ae.tabs,Ce=Ae.locale,ye=Ae.mobile,Pe=Ae.moreIcon,je=Pe===void 0?"More":Pe,Ue=Ae.moreTransitionName,Ne=Ae.style,ze=Ae.className,ot=Ae.editable,xt=Ae.tabBarGutter,wt=Ae.rtl,Ft=Ae.onTabClick,xr=Object(d.useState)(!1),jr=Object(m.a)(xr,2),Nr=jr[0],Wr=jr[1],Dr=Object(d.useState)(null),Kr=Object(m.a)(Dr,2),zr=Kr[0],rn=Kr[1],$r="".concat(Le,"-more-popup"),vn="".concat(We,"-dropdown"),Yr=zr!==null?"".concat($r,"-").concat(zr):null,Tr=Ce==null?void 0:Ce.dropdownAriaLabel,Or=d.createElement(gr,{onClick:function(En){var dn=En.key,kn=En.domEvent;Ft(dn,kn),Wr(!1)},id:$r,tabIndex:-1,role:"listbox","aria-activedescendant":Yr,selectedKeys:[zr],"aria-label":Tr!==void 0?Tr:"expanded dropdown"},he.map(function(un){return d.createElement(Ar,{key:un.key,id:"".concat($r,"-").concat(un.key),role:"option","aria-controls":Le&&"".concat(Le,"-panel-").concat(un.key),disabled:un.disabled},un.tab)}));function Xr(un){for(var En=he.filter(function(ea){return!ea.disabled}),dn=En.findIndex(function(ea){return ea.key===zr})||0,kn=En.length,Xn=0;Xn<kn;Xn+=1){dn=(dn+un+kn)%kn;var Rn=En[dn];if(!Rn.disabled){rn(Rn.key);return}}}function tn(un){var En=un.which;if(!Nr){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(En)&&(Wr(!0),un.preventDefault());return}switch(En){case g.a.UP:Xr(-1),un.preventDefault();break;case g.a.DOWN:Xr(1),un.preventDefault();break;case g.a.ESC:Wr(!1);break;case g.a.SPACE:case g.a.ENTER:zr!==null&&Ft(zr,un);break}}Object(d.useEffect)(function(){var un=document.getElementById(Yr);un&&un.scrollIntoView&&un.scrollIntoView(!1)},[zr]),Object(d.useEffect)(function(){Nr||rn(null)},[Nr]);var mr=Object(D.a)({},wt?"marginLeft":"marginRight",xt);he.length||(mr.visibility="hidden",mr.order=1);var an=_()(Object(D.a)({},"".concat(vn,"-rtl"),wt)),An=ye?null:d.createElement(Xe.a,{prefixCls:vn,overlay:Or,trigger:["hover"],visible:Nr,transitionName:Ue,onVisibleChange:Wr,overlayClassName:an,mouseEnterDelay:.1,mouseLeaveDelay:.1},d.createElement("button",{type:"button",className:"".concat(We,"-nav-more"),style:mr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":$r,id:"".concat(Le,"-more"),"aria-expanded":Nr,onKeyDown:tn},je));return d.createElement("div",{className:_()("".concat(We,"-nav-operations"),ze),style:Ne,ref:Fe},An,d.createElement(kr,{prefixCls:We,locale:Ce,editable:ot}))}var Nt=d.forwardRef(Ur),ur=Object(d.createContext)(null),Bt=.1,Et=.01,Mt=20,Zt=Math.pow(.995,Mt);function Gt(){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 dt(Ae,Fe){var We=Object(d.useState)(),Le=Object(m.a)(We,2),he=Le[0],Ce=Le[1],ye=Object(d.useState)(0),Pe=Object(m.a)(ye,2),je=Pe[0],Ue=Pe[1],Ne=Object(d.useState)(0),ze=Object(m.a)(Ne,2),ot=ze[0],xt=ze[1],wt=Object(d.useState)(),Ft=Object(m.a)(wt,2),xr=Ft[0],jr=Ft[1],Nr=Object(d.useRef)();function Wr(Tr){var Or=Tr.touches[0],Xr=Or.screenX,tn=Or.screenY;Ce({x:Xr,y:tn}),window.clearInterval(Nr.current)}function Dr(Tr){if(!he)return;Tr.preventDefault();var Or=Tr.touches[0],Xr=Or.screenX,tn=Or.screenY;Ce({x:Xr,y:tn});var mr=Xr-he.x,an=tn-he.y;Fe(mr,an);var An=Date.now();Ue(An),xt(An-je),jr({x:mr,y:an})}function Kr(){if(!he)return;if(Ce(null),jr(null),xr){var Tr=xr.x/ot,Or=xr.y/ot,Xr=Math.abs(Tr),tn=Math.abs(Or);if(Math.max(Xr,tn)<Bt)return;var mr=Tr,an=Or;Nr.current=window.setInterval(function(){if(Math.abs(mr)<Et&&Math.abs(an)<Et){window.clearInterval(Nr.current);return}mr*=Zt,an*=Zt,Fe(mr*Mt,an*Mt)},Mt)}}var zr=Object(d.useRef)(0),rn=Object(d.useRef)(!1),$r=Object(d.useRef)();function vn(Tr){var Or=Tr.deltaX,Xr=Tr.deltaY,tn=0,mr=Math.abs(Or),an=Math.abs(Xr);mr===an?tn=$r.current==="x"?Or:Xr:mr>an?(tn=Or,$r.current="x"):(tn=Xr,$r.current="y");var An=Date.now();An-zr.current>100&&(rn.current=!1),(Fe(-tn,-tn)||rn.current)&&(Tr.preventDefault(),rn.current=!0),zr.current=An}var Yr=Object(d.useRef)(null);Yr.current={onTouchStart:Wr,onTouchMove:Dr,onTouchEnd:Kr,onWheel:vn},d.useEffect(function(){function Tr(mr){Yr.current.onTouchStart(mr)}function Or(mr){Yr.current.onTouchMove(mr)}function Xr(mr){Yr.current.onTouchEnd(mr)}function tn(mr){Yr.current.onWheel(mr)}return document.addEventListener("touchmove",Or,{passive:!1}),document.addEventListener("touchend",Xr,{passive:!1}),Ae.current.addEventListener("touchstart",Tr,{passive:!1}),Ae.current.addEventListener("wheel",tn),function(){document.removeEventListener("touchmove",Or),document.removeEventListener("touchend",Xr)}},[])}function ft(){var Ae=Object(d.useRef)(new Map);function Fe(Le){return Ae.current.has(Le)||Ae.current.set(Le,d.createRef()),Ae.current.get(Le)}function We(Le){Ae.current.delete(Le)}return[Fe,We]}function It(Ae,Fe){var We=d.useRef(Ae),Le=d.useState({}),he=Object(m.a)(Le,2),Ce=he[1];function ye(Pe){var je=typeof Pe=="function"?Pe(We.current):Pe;je!==We.current&&Fe(je,We.current),We.current=je,Ce({})}return[We.current,ye]}var _t=function(Fe){var We=Fe.position,Le=Fe.prefixCls,he=Fe.extra;if(!he)return null;var Ce,ye=he;return We==="right"&&(Ce=ye.right||!ye.left&&ye||null),We==="left"&&(Ce=ye.left||null),Ce?d.createElement("div",{className:"".concat(Le,"-extra-content")},Ce):null};function Er(Ae,Fe){var We,Le=d.useContext(ur),he=Le.prefixCls,Ce=Le.tabs,ye=Ae.className,Pe=Ae.style,je=Ae.id,Ue=Ae.animated,Ne=Ae.activeKey,ze=Ae.rtl,ot=Ae.extra,xt=Ae.editable,wt=Ae.locale,Ft=Ae.tabPosition,xr=Ae.tabBarGutter,jr=Ae.children,Nr=Ae.onTabClick,Wr=Ae.onTabScroll,Dr=Object(d.useRef)(),Kr=Object(d.useRef)(),zr=Object(d.useRef)(),rn=Object(d.useRef)(),$r=ft(),vn=Object(m.a)($r,2),Yr=vn[0],Tr=vn[1],Or=Ft==="top"||Ft==="bottom",Xr=It(0,function(yn,ln){Or&&Wr&&Wr({direction:yn>ln?"left":"right"})}),tn=Object(m.a)(Xr,2),mr=tn[0],an=tn[1],An=It(0,function(yn,ln){!Or&&Wr&&Wr({direction:yn>ln?"top":"bottom"})}),un=Object(m.a)(An,2),En=un[0],dn=un[1],kn=Object(d.useState)(0),Xn=Object(m.a)(kn,2),Rn=Xn[0],ea=Xn[1],ja=Object(d.useState)(0),ua=Object(m.a)(ja,2),Vn=ua[0],xn=ua[1],_n=Object(d.useState)(0),Dn=Object(m.a)(_n,2),Cn=Dn[0],Un=Dn[1],pa=Object(d.useState)(0),$a=Object(m.a)(pa,2),hn=$a[0],Oa=$a[1],Aa=Object(d.useState)(null),gn=Object(m.a)(Aa,2),fn=gn[0],Bn=gn[1],Bi=Object(d.useState)(null),wi=Object(m.a)(Bi,2),ti=wi[0],ri=wi[1],Li=Object(d.useState)(0),Ti=Object(m.a)(Li,2),Mi=Ti[0],Wi=Ti[1],Vi=Object(d.useState)(0),Ii=Object(m.a)(Vi,2),ni=Ii[0],Si=Ii[1],yi=v(new Map),ai=Object(m.a)(yi,2),co=ai[0],bi=ai[1],Ci=t(Ce,co,Rn),ii="".concat(he,"-nav-operations-hidden"),ui=0,Fa=0;Or?ze?(ui=0,Fa=Math.max(0,Rn-fn)):(ui=Math.min(0,fn-Rn),Fa=0):(ui=Math.min(0,ti-Vn),Fa=0);function Ya(yn){return yn<ui?[ui,!1]:yn>Fa?[Fa,!1]:[yn,!0]}var dr=Object(d.useRef)(),vr=Object(d.useState)(),rr=Object(m.a)(vr,2),on=rr[0],ir=rr[1];function ci(){ir(Date.now())}function $i(){window.clearTimeout(dr.current)}dt(Dr,function(yn,ln){var ia=!1;function Da(ki,di){ki(function(zi){var Ei=Ya(zi+di),oa=Object(m.a)(Ei,2),Qi=oa[0],ho=oa[1];return ia=ho,Qi})}if(Or){if(fn>=Rn)return ia;Da(an,yn)}else{if(ti>=Vn)return ia;Da(dn,ln)}return $i(),ci(),ia}),Object(d.useEffect)(function(){return $i(),on&&(dr.current=window.setTimeout(function(){ir(0)},100)),$i},[on]);function Tn(){var yn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ne,ln=Ci.get(yn);if(!ln)return;if(Or){var ia=mr;ze?ln.right<mr?ia=ln.right:ln.right+ln.width>mr+fn&&(ia=ln.right+ln.width-fn):ln.left<-mr?ia=-ln.left:ln.left+ln.width>-mr+fn&&(ia=-(ln.left+ln.width-fn)),dn(0),an(Ya(ia)[0])}else{var Da=En;ln.top<-En?Da=-ln.top:ln.top+ln.height>-En+ti&&(Da=-(ln.top+ln.height-ti)),an(0),dn(Ya(Da)[0])}}var Oi=w(Ci,{width:fn,height:ti,left:mr,top:En},{width:Cn,height:hn},{width:Mi,height:ni},Object(P.a)(Object(P.a)({},Ae),{},{tabs:Ce})),Do=Object(m.a)(Oi,2),Jo=Do[0],Qo=Do[1],Zo=Ce.map(function(yn){var ln=yn.key;return d.createElement(a,{id:je,prefixCls:he,key:ln,rtl:ze,tab:yn,closable:yn.closable,editable:xt,active:ln===Ne,tabPosition:Ft,tabBarGutter:xr,renderWrapper:jr,removeAriaLabel:wt==null?void 0:wt.removeAriaLabel,ref:Yr(ln),onClick:function(Da){Nr(ln,Da)},onRemove:function(){Tr(ln)},onFocus:function(){Tn(ln),ci(),ze||(Dr.current.scrollLeft=0),Dr.current.scrollTop=0}})}),fo=h(function(){var yn,ln,ia,Da,ki,di,zi,Ei,oa,Qi=((yn=Dr.current)===null||yn===void 0?void 0:yn.offsetWidth)||0,ho=((ln=Dr.current)===null||ln===void 0?void 0:ln.offsetHeight)||0,po=((ia=rn.current)===null||ia===void 0?void 0:ia.offsetWidth)||0,Pa=((Da=rn.current)===null||Da===void 0?void 0:Da.offsetHeight)||0,pn=((ki=zr.current)===null||ki===void 0?void 0:ki.offsetWidth)||0,Qa=((di=zr.current)===null||di===void 0?void 0:di.offsetHeight)||0;Bn(Qi),ri(ho),Wi(po),Si(Pa);var fi=(((zi=Kr.current)===null||zi===void 0?void 0:zi.offsetWidth)||0)-po,hi=(((Ei=Kr.current)===null||Ei===void 0?void 0:Ei.offsetHeight)||0)-Pa;ea(fi),xn(hi);var mo=(oa=zr.current)===null||oa===void 0?void 0:oa.className.includes(ii);Un(fi-(mo?0:pn)),Oa(hi-(mo?0:Qa)),bi(function(){var Zi=new Map;return Ce.forEach(function(ko){var No=ko.key,Ri=Yr(No).current;Ri&&Zi.set(No,{width:Ri.offsetWidth,height:Ri.offsetHeight,left:Ri.offsetLeft,top:Ri.offsetTop})}),Zi})}),qo=Ce.slice(0,Jo),Ra=Ce.slice(Qo+1),Jn=[].concat(Object(i.a)(qo),Object(i.a)(Ra)),ma=Object(d.useState)(),Qn=Object(m.a)(ma,2),Hi=Qn[0],es=Qn[1],Ja=Ci.get(Ne),Po=Object(d.useRef)();function Lo(){u.a.cancel(Po.current)}Object(d.useEffect)(function(){var yn={};return Ja&&(Or?(ze?yn.right=Ja.right:yn.left=Ja.left,yn.width=Ja.width):(yn.top=Ja.top,yn.height=Ja.height)),Lo(),Po.current=u()(function(){es(yn)}),Lo},[Ja,Or,ze]),Object(d.useEffect)(function(){Tn()},[Ne,Ja,Ci,Or]),Object(d.useEffect)(function(){fo()},[ze,xr,Ne,Ce.map(function(yn){return yn.key}).join("_")]);var Mo=!!Jn.length,Ai="".concat(he,"-nav-wrap"),Yi,Ki,Io,Ji;return Or?ze?(Ki=mr>0,Yi=mr+fn<Rn):(Yi=mr<0,Ki=-mr+fn<Rn):(Io=En<0,Ji=-En+ti<Vn),d.createElement("div",{ref:Fe,role:"tablist",className:_()("".concat(he,"-nav"),ye),style:Pe,onKeyDown:function(){ci()}},d.createElement(_t,{position:"left",extra:ot,prefixCls:he}),d.createElement(p.a,{onResize:fo},d.createElement("div",{className:_()(Ai,(We={},Object(D.a)(We,"".concat(Ai,"-ping-left"),Yi),Object(D.a)(We,"".concat(Ai,"-ping-right"),Ki),Object(D.a)(We,"".concat(Ai,"-ping-top"),Io),Object(D.a)(We,"".concat(Ai,"-ping-bottom"),Ji),We)),ref:Dr},d.createElement(p.a,{onResize:fo},d.createElement("div",{ref:Kr,className:"".concat(he,"-nav-list"),style:{transform:"translate(".concat(mr,"px, ").concat(En,"px)"),transition:on?"none":void 0}},Zo,d.createElement(kr,{ref:rn,prefixCls:he,locale:wt,editable:xt,style:{visibility:Mo?"hidden":null}}),d.createElement("div",{className:_()("".concat(he,"-ink-bar"),Object(D.a)({},"".concat(he,"-ink-bar-animated"),Ue.inkBar)),style:Hi}))))),d.createElement(Nt,Object.assign({},Ae,{ref:zr,prefixCls:he,tabs:Jn,className:!Mo&&ii})),d.createElement(_t,{position:"right",extra:ot,prefixCls:he}))}var Gr=d.forwardRef(Er);function Vr(Ae){var Fe=Ae.id,We=Ae.activeKey,Le=Ae.animated,he=Ae.tabPosition,Ce=Ae.rtl,ye=Ae.destroyInactiveTabPane,Pe=d.useContext(ur),je=Pe.prefixCls,Ue=Pe.tabs,Ne=Le.tabPane,ze=Ue.findIndex(function(ot){return ot.key===We});return d.createElement("div",{className:_()("".concat(je,"-content-holder"))},d.createElement("div",{className:_()("".concat(je,"-content"),"".concat(je,"-content-").concat(he),Object(D.a)({},"".concat(je,"-content-animated"),Ne)),style:ze&&Ne?Object(D.a)({},Ce?"marginRight":"marginLeft","-".concat(ze,"00%")):null},Ue.map(function(ot){return d.cloneElement(ot.node,{key:ot.key,prefixCls:je,tabKey:ot.key,id:Fe,animated:Ne,active:ot.key===We,destroyInactiveTabPane:ye})})))}function br(Ae){var Fe=Ae.prefixCls,We=Ae.forceRender,Le=Ae.className,he=Ae.style,Ce=Ae.id,ye=Ae.active,Pe=Ae.animated,je=Ae.destroyInactiveTabPane,Ue=Ae.tabKey,Ne=Ae.children,ze=d.useState(We),ot=Object(m.a)(ze,2),xt=ot[0],wt=ot[1];d.useEffect(function(){ye?wt(!0):je&&wt(!1)},[ye,je]);var Ft={};return ye||(Pe?(Ft.visibility="hidden",Ft.height=0,Ft.overflowY="hidden"):Ft.display="none"),d.createElement("div",{id:Ce&&"".concat(Ce,"-panel-").concat(Ue),role:"tabpanel",tabIndex:ye?0:-1,"aria-labelledby":Ce&&"".concat(Ce,"-tab-").concat(Ue),"aria-hidden":!ye,style:Object(P.a)(Object(P.a)({},Ft),he),className:_()("".concat(Fe,"-tabpane"),ye&&"".concat(Fe,"-tabpane-active"),Le)},(ye||xt||We)&&Ne)}var Hr=0;function Sr(Ae){return Object(c.a)(Ae).map(function(Fe){if(d.isValidElement(Fe)){var We=Fe.key!==void 0?String(Fe.key):void 0;return Object(P.a)(Object(P.a)({key:We},Fe.props),{},{node:Fe})}return null}).filter(function(Fe){return Fe})}function qr(Ae,Fe){var We,Le=Ae.id,he=Ae.prefixCls,Ce=he===void 0?"rc-tabs":he,ye=Ae.className,Pe=Ae.children,je=Ae.direction,Ue=Ae.activeKey,Ne=Ae.defaultActiveKey,ze=Ae.editable,ot=Ae.animated,xt=Ae.tabPosition,wt=xt===void 0?"top":xt,Ft=Ae.tabBarGutter,xr=Ae.tabBarStyle,jr=Ae.tabBarExtraContent,Nr=Ae.locale,Wr=Ae.moreIcon,Dr=Ae.moreTransitionName,Kr=Ae.destroyInactiveTabPane,zr=Ae.renderTabBar,rn=Ae.onChange,$r=Ae.onTabClick,vn=Ae.onTabScroll,Yr=Object(S.a)(Ae,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Tr=Sr(Pe),Or=je==="rtl",Xr;ot===!1?Xr={inkBar:!1,tabPane:!1}:Xr=Object(P.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var tn=Object(d.useState)(!1),mr=Object(m.a)(tn,2),an=mr[0],An=mr[1];Object(d.useEffect)(function(){An(Gt())},[]);var un=Object(o.a)(function(){var hn;return(hn=Tr[0])===null||hn===void 0?void 0:hn.key},{value:Ue,defaultValue:Ne}),En=Object(m.a)(un,2),dn=En[0],kn=En[1],Xn=Object(d.useState)(function(){return Tr.findIndex(function(hn){return hn.key===dn})}),Rn=Object(m.a)(Xn,2),ea=Rn[0],ja=Rn[1];Object(d.useEffect)(function(){var hn=Tr.findIndex(function(Aa){return Aa.key===dn});if(hn===-1){var Oa;hn=Math.max(0,Math.min(ea,Tr.length-1)),kn((Oa=Tr[hn])===null||Oa===void 0?void 0:Oa.key)}ja(hn)},[Tr.map(function(hn){return hn.key}).join("_"),dn,ea]);var ua=Object(o.a)(null,{value:Le}),Vn=Object(m.a)(ua,2),xn=Vn[0],_n=Vn[1],Dn=wt;an&&!["left","right"].includes(wt)&&(Dn="top"),Object(d.useEffect)(function(){Le||(_n("rc-tabs-".concat(Hr)),Hr+=1)},[]);function Cn(hn,Oa){$r==null||$r(hn,Oa),kn(hn),rn==null||rn(hn)}var Un={id:xn,activeKey:dn,animated:Xr,tabPosition:Dn,rtl:Or,mobile:an},pa,$a=Object(P.a)(Object(P.a)({},Un),{},{editable:ze,locale:Nr,moreIcon:Wr,moreTransitionName:Dr,tabBarGutter:Ft,onTabClick:Cn,onTabScroll:vn,extra:jr,style:xr,panes:Pe});return zr?pa=zr($a,Gr):pa=d.createElement(Gr,Object.assign({},$a)),d.createElement(ur.Provider,{value:{tabs:Tr,prefixCls:Ce}},d.createElement("div",Object.assign({ref:Fe,id:Le,className:_()(Ce,"".concat(Ce,"-").concat(Dn),(We={},Object(D.a)(We,"".concat(Ce,"-mobile"),an),Object(D.a)(We,"".concat(Ce,"-editable"),ze),Object(D.a)(We,"".concat(Ce,"-rtl"),Or),We),ye)},Yr),pa,d.createElement(Vr,Object.assign({destroyInactiveTabPane:Kr},Un,{animated:Xr}))))}var Mr=d.forwardRef(qr);Mr.TabPane=br;var en=Mr,Mn=Y.b=en},kSUc:function(j,Y,M){},lPiR:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(m){var S=D,P=S.lib,d=P.WordArray,f=P.Hasher,_=S.algo,c=[],o=[];(function(){function u(g){for(var E=m.sqrt(g),a=2;a<=E;a++)if(!(g%a))return!1;return!0}function p(g){return(g-(g|0))*4294967296|0}for(var h=2,v=0;v<64;)u(h)&&(v<8&&(c[v]=p(m.pow(h,1/2))),o[v]=p(m.pow(h,1/3)),v++),h++})();var i=[],n=_.SHA256=f.extend({_doReset:function(){this._hash=new d.init(c.slice(0))},_doProcessBlock:function(u,p){for(var h=this._hash.words,v=h[0],g=h[1],E=h[2],a=h[3],l=h[4],t=h[5],C=h[6],w=h[7],s=0;s<64;s++){if(s<16)i[s]=u[p+s]|0;else{var L=i[s-15],O=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,x=i[s-2],b=(x<<15|x>>>17)^(x<<13|x>>>19)^x>>>10;i[s]=O+i[s-7]+b+i[s-16]}var y=l&t^~l&C,T=v&g^v&E^g&E,k=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),N=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),I=w+N+y+o[s]+i[s],W=k+T;w=C,C=t,t=l,l=a+I|0,a=E,E=g,g=v,v=I+W|0}h[0]=h[0]+v|0,h[1]=h[1]+g|0,h[2]=h[2]+E|0,h[3]=h[3]+a|0,h[4]=h[4]+l|0,h[5]=h[5]+t|0,h[6]=h[6]+C|0,h[7]=h[7]+w|0},_doFinalize:function(){var u=this._data,p=u.words,h=this._nDataBytes*8,v=u.sigBytes*8;return p[v>>>5]|=128<<24-v%32,p[(v+64>>>9<<4)+14]=m.floor(h/4294967296),p[(v+64>>>9<<4)+15]=h,u.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var u=f.clone.call(this);return u._hash=this._hash.clone(),u}});S.SHA256=f._createHelper(n),S.HmacSHA256=f._createHmacHelper(n)}(Math),D.SHA256})},lZu9:function(j,Y,M){(function(D){D(M("VrN/"),M("1eCo"),M("8EBN"))})(function(D){"use strict";D.defineMode("markdown",function(m,S){var P=D.getMode(m,"text/html"),d=P.name=="null";function f(B){if(D.findModeByName){var H=D.findModeByName(B);H&&(B=H.mime||H.mimes[0])}var G=D.getMode(m,B);return G.name=="null"?null:G}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var _={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 c in _)_.hasOwnProperty(c)&&S.tokenTypeOverrides[c]&&(_[c]=S.tokenTypeOverrides[c]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,i=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,u=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,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]/,a=" ";function l(B,H,G){return H.f=H.inline=G,G(B,H)}function t(B,H,G){return H.f=H.block=G,G(B,H)}function C(B){return!B||!/\S/.test(B.string)}function w(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==L){var H=d;if(!H){var G=D.innerMode(P,B.htmlState);H=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}H&&(B.f=y,B.block=s,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function s(B,H){var G=B.column()===H.indentation,ee=C(H.prevLine.stream),ie=H.indentedCode,ue=H.prevLine.hr,xe=H.list!==!1,Te=(H.listStack[H.listStack.length-1]||0)+3;H.indentedCode=!1;var se=H.indentation;if(H.indentationDiff===null&&(H.indentationDiff=H.indentation,xe)){for(H.list=null;se<H.listStack[H.listStack.length-1];)H.listStack.pop(),H.listStack.length?H.indentation=H.listStack[H.listStack.length-1]:H.list=!1;H.list!==!1&&(H.indentationDiff=se-H.listStack[H.listStack.length-1])}var ve=!ee&&!ue&&!H.prevLine.header&&(!xe||!ie)&&!H.prevLine.fencedCodeEnd,de=(H.list===!1||ue||ee)&&H.indentation<=Te&&B.match(o),ne=null;if(H.indentationDiff>=4&&(ie||H.prevLine.fencedCodeEnd||H.prevLine.header||ee))return B.skipToEnd(),H.indentedCode=!0,_.code;if(B.eatSpace())return null;if(G&&H.indentation<=Te&&(ne=B.match(u))&&ne[1].length<=6)return H.quote=0,H.header=ne[1].length,H.thisLine.header=!0,S.highlightFormatting&&(H.formatting="header"),H.f=H.inline,x(H);if(H.indentation<=Te&&B.eat(">"))return H.quote=G?1:H.quote+1,S.highlightFormatting&&(H.formatting="quote"),B.eatSpace(),x(H);if(!de&&!H.setext&&G&&H.indentation<=Te&&(ne=B.match(i))){var ae=ne[1]?"ol":"ul";return H.indentation=se+B.current().length,H.list=!0,H.quote=0,H.listStack.push(H.indentation),H.em=!1,H.strong=!1,H.code=!1,H.strikethrough=!1,S.taskLists&&B.match(n,!1)&&(H.taskList=!0),H.f=H.inline,S.highlightFormatting&&(H.formatting=["list","list-"+ae]),x(H)}else{if(G&&H.indentation<=Te&&(ne=B.match(v,!0)))return H.quote=0,H.fencedEndRE=new RegExp(ne[1]+"+ *$"),H.localMode=S.fencedCodeBlockHighlighting&&f(ne[2]||S.fencedCodeBlockDefaultMode),H.localMode&&(H.localState=D.startState(H.localMode)),H.f=H.block=O,S.highlightFormatting&&(H.formatting="code-block"),H.code=-1,x(H);if(H.setext||(!ve||!xe)&&!H.quote&&H.list===!1&&!H.code&&!de&&!g.test(B.string)&&(ne=B.lookAhead(1))&&(ne=ne.match(p)))return H.setext?(H.header=H.setext,H.setext=0,B.skipToEnd(),S.highlightFormatting&&(H.formatting="header")):(H.header=ne[0].charAt(0)=="="?1:2,H.setext=H.header),H.thisLine.header=!0,H.f=H.inline,x(H);if(de)return B.skipToEnd(),H.hr=!0,H.thisLine.hr=!0,_.hr;if(B.peek()==="[")return l(B,H,W)}return l(B,H,H.inline)}function L(B,H){var G=P.token(B,H.htmlState);if(!d){var ee=D.innerMode(P,H.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||H.md_inside&&B.current().indexOf(">")>-1)&&(H.f=y,H.block=s,H.htmlState=null)}return G}function O(B,H){var G=H.listStack[H.listStack.length-1]||0,ee=H.indentation<G,ie=G+3;if(H.fencedEndRE&&H.indentation<=ie&&(ee||B.match(H.fencedEndRE))){S.highlightFormatting&&(H.formatting="code-block");var ue;return ee||(ue=x(H)),H.localMode=H.localState=null,H.block=s,H.f=y,H.fencedEndRE=null,H.code=0,H.thisLine.fencedCodeEnd=!0,ee?t(B,H,H.block):ue}else return H.localMode?H.localMode.token(B,H.localState):(B.skipToEnd(),_.code)}function x(B){var H=[];if(B.formatting){H.push(_.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var G=0;G<B.formatting.length;G++)H.push(_.formatting+"-"+B.formatting[G]),B.formatting[G]==="header"&&H.push(_.formatting+"-"+B.formatting[G]+"-"+B.header),B.formatting[G]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?H.push(_.formatting+"-"+B.formatting[G]+"-"+B.quote):H.push("error"))}if(B.taskOpen)return H.push("meta"),H.length?H.join(" "):null;if(B.taskClosed)return H.push("property"),H.length?H.join(" "):null;if(B.linkHref?H.push(_.linkHref,"url"):(B.strong&&H.push(_.strong),B.em&&H.push(_.em),B.strikethrough&&H.push(_.strikethrough),B.emoji&&H.push(_.emoji),B.linkText&&H.push(_.linkText),B.code&&H.push(_.code),B.image&&H.push(_.image),B.imageAltText&&H.push(_.imageAltText,"link"),B.imageMarker&&H.push(_.imageMarker)),B.header&&H.push(_.header,_.header+"-"+B.header),B.quote&&(H.push(_.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?H.push(_.quote+"-"+B.quote):H.push(_.quote+"-"+S.maxBlockquoteDepth)),B.list!==!1){var ee=(B.listStack.length-1)%3;ee?ee===1?H.push(_.list2):H.push(_.list3):H.push(_.list1)}return B.trailingSpaceNewLine?H.push("trailing-space-new-line"):B.trailingSpace&&H.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),H.length?H.join(" "):null}function b(B,H){return B.match(h,!0)?x(H):void 0}function y(B,H){var G=H.text(B,H);if(typeof G!="undefined")return G;if(H.list)return H.list=null,x(H);if(H.taskList){var ee=B.match(n,!0)[1]===" ";return ee?H.taskOpen=!0:H.taskClosed=!0,S.highlightFormatting&&(H.formatting="task"),H.taskList=!1,x(H)}if(H.taskOpen=!1,H.taskClosed=!1,H.header&&B.match(/^#+$/,!0))return S.highlightFormatting&&(H.formatting="header"),x(H);var ie=B.next();if(H.linkTitle){H.linkTitle=!1;var ue=ie;ie==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xe="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(B.match(new RegExp(xe),!0))return _.linkHref}if(ie==="`"){var Te=H.formatting;S.highlightFormatting&&(H.formatting="code"),B.eatWhile("`");var se=B.current().length;if(H.code==0&&(!H.quote||se==1))return H.code=se,x(H);if(se==H.code){var ve=x(H);return H.code=0,ve}else return H.formatting=Te,x(H)}else if(H.code)return x(H);if(ie==="\\"&&(B.next(),S.highlightFormatting)){var de=x(H),ne=_.formatting+"-escape";return de?de+" "+ne:ne}if(ie==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return H.imageMarker=!0,H.image=!0,S.highlightFormatting&&(H.formatting="image"),x(H);if(ie==="["&&H.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return H.imageMarker=!1,H.imageAltText=!0,S.highlightFormatting&&(H.formatting="image"),x(H);if(ie==="]"&&H.imageAltText){S.highlightFormatting&&(H.formatting="image");var de=x(H);return H.imageAltText=!1,H.image=!1,H.inline=H.f=k,de}if(ie==="["&&!H.image)return H.linkText&&B.match(/^.*?\]/)||(H.linkText=!0,S.highlightFormatting&&(H.formatting="link")),x(H);if(ie==="]"&&H.linkText){S.highlightFormatting&&(H.formatting="link");var de=x(H);return H.linkText=!1,H.inline=H.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?k:y,de}if(ie==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){H.f=H.inline=T,S.highlightFormatting&&(H.formatting="link");var de=x(H);return de?de+=" ":de="",de+_.linkInline}if(ie==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){H.f=H.inline=T,S.highlightFormatting&&(H.formatting="link");var de=x(H);return de?de+=" ":de="",de+_.linkEmail}if(S.xml&&ie==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=B.string.indexOf(">",B.pos);if(ae!=-1){var Z=B.string.substring(B.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Z)&&(H.md_inside=!0)}return B.backUp(1),H.htmlState=D.startState(P),t(B,H,L)}if(S.xml&&ie==="<"&&B.match(/^\/\w*?>/))return H.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var le=1,Q=B.pos==1?" ":B.string.charAt(B.pos-2);le<3&&B.eat(ie);)le++;var q=B.peek()||" ",be=!/\s/.test(q)&&(!E.test(q)||/\s/.test(Q)||E.test(Q)),te=!/\s/.test(Q)&&(!E.test(Q)||/\s/.test(q)||E.test(q)),J=null,X=null;if(le%2&&(!H.em&&be&&(ie==="*"||!te||E.test(Q))?J=!0:H.em==ie&&te&&(ie==="*"||!be||E.test(q))&&(J=!1)),le>1&&(!H.strong&&be&&(ie==="*"||!te||E.test(Q))?X=!0:H.strong==ie&&te&&(ie==="*"||!be||E.test(q))&&(X=!1)),X!=null||J!=null){S.highlightFormatting&&(H.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(H.em=ie),X===!0&&(H.strong=ie);var ve=x(H);return J===!1&&(H.em=!1),X===!1&&(H.strong=!1),ve}}else if(ie===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return x(H);B.backUp(1)}if(S.strikethrough){if(ie==="~"&&B.eatWhile(ie)){if(H.strikethrough){S.highlightFormatting&&(H.formatting="strikethrough");var ve=x(H);return H.strikethrough=!1,ve}else if(B.match(/^[^\s]/,!1))return H.strikethrough=!0,S.highlightFormatting&&(H.formatting="strikethrough"),x(H)}else if(ie===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return x(H);B.backUp(2)}}if(S.emoji&&ie===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){H.emoji=!0,S.highlightFormatting&&(H.formatting="emoji");var $=x(H);return H.emoji=!1,$}return ie===" "&&(B.match(/^ +$/,!1)?H.trailingSpace++:H.trailingSpace&&(H.trailingSpaceNewLine=!0)),x(H)}function T(B,H){var G=B.next();if(G===">"){H.f=H.inline=y,S.highlightFormatting&&(H.formatting="link");var ee=x(H);return ee?ee+=" ":ee="",ee+_.linkInline}return B.match(/^[^>]+/,!0),_.linkInline}function k(B,H){if(B.eatSpace())return null;var G=B.next();return G==="("||G==="["?(H.f=H.inline=I(G==="("?")":"]"),S.highlightFormatting&&(H.formatting="link-string"),H.linkHref=!0,x(H)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(B){return function(H,G){var ee=H.next();if(ee===B){G.f=G.inline=y,S.highlightFormatting&&(G.formatting="link-string");var ie=x(G);return G.linkHref=!1,ie}return H.match(N[B]),G.linkHref=!0,x(G)}}function W(B,H){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(H.f=K,B.next(),S.highlightFormatting&&(H.formatting="link"),H.linkText=!0,x(H)):l(B,H,y)}function K(B,H){if(B.match(/^\]:/,!0)){H.f=H.inline=U,S.highlightFormatting&&(H.formatting="link");var G=x(H);return H.linkText=!1,G}return B.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function U(B,H){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?H.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),H.f=H.inline=y,_.linkHref+" url")}var z={startState:function(){return{f:s,prevLine:{stream:null},thisLine:{stream:null},block:s,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(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&D.copyState(P,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?D.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,H){if(H.formatting=!1,B!=H.thisLine.stream){if(H.header=0,H.hr=!1,B.match(/^\s*$/,!0))return w(H),null;if(H.prevLine=H.thisLine,H.thisLine={stream:B},H.taskList=!1,H.trailingSpace=0,H.trailingSpaceNewLine=!1,!H.localState&&(H.f=H.block,H.f!=L)){var G=B.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(H.indentation=G,H.indentationDiff=null,G>0)return null}}return H.f(B,H)},innerMode:function(B){return B.block==L?{state:B.htmlState,mode:P}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:z}},indent:function(B,H,G){return B.block==L&&P.indent?P.indent(B.htmlState,H,G):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,H,G):D.Pass},blankLine:w,getType:x,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),D.defineMIME("text/markdown","markdown"),D.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Y,M){j.exports=M.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 Y})(function(){var define,module,exports;return function(){function j(Y,M,D){function m(d,f){if(!M[d]){if(!Y[d]){var _=typeof require=="function"&&require;if(!f&&_)return require(d,!0);if(S)return S(d,!0);var c=new Error("Cannot find module '"+d+"'");throw c.code="MODULE_NOT_FOUND",c}var o=M[d]={exports:{}};Y[d][0].call(o.exports,function(i){var n=Y[d][1][i];return m(n||i)},o,o.exports,j,Y,M,D)}return M[d].exports}for(var S=typeof require=="function"&&require,P=0;P<D.length;P++)m(D[P]);return m}return j}()({1:[function(j,Y,M){"use strict";var D=j("./browser/client");D.Buffer=j("buffer").Buffer,D.urllib=j("../shims/xhr"),D.version=j("./browser/version").version,Y.exports=D},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,Y,M){(function(D,m){"use strict";var S=j("babel-runtime/core-js/promise"),P=o(S),d=j("babel-runtime/regenerator"),f=o(d),_=j("babel-runtime/core-js/object/assign"),c=o(_);function o(W){return W&&W.__esModule?W:{default:W}}var i=j("debug")("ali-oss"),n=j("copy-to"),u=j("xml2js"),p=j("agentkeepalive"),h=j("merge-descriptors"),v=j("url"),g=j("is-type-of"),E=j("platform"),a=j("utility"),l=j("urllib"),t=j("./version"),C=j("bowser"),w=j("../common/signUtils"),s=j("../common/utils/isIP"),L=s.isIP,O=j("../common/client/initOptions"),x=j("../common/utils/createRequest"),b=x.createRequest,y=new p;function T(){var W=E.name,K=E.version;W&&W.toLowerCase&&W.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function k(){return location&&location.protocol==="https:"}function N(W,K){if(T(),!(this instanceof N))return new N(W,K);W&&W.inited?this.options=W:this.options=N.initOptions(W),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=l,this.agent=this.options.agent||y),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Y.exports=N,N.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var U=(0,c.default)({secure:k(),useFetch:!1},K);return O(U)};var I=N.prototype;I.debug=i,h(I,j("./object")),h(I,j("../common/bucket/getBucketWebsite")),h(I,j("../common/bucket/putBucketWebsite")),h(I,j("../common/bucket/deleteBucketWebsite")),h(I,j("../common/bucket/getBucketLifecycle")),h(I,j("../common/bucket/putBucketLifecycle")),h(I,j("../common/bucket/deleteBucketLifecycle")),h(I,j("../common/bucket/putBucketVersioning")),h(I,j("../common/bucket/getBucketVersioning")),h(I,j("./managed-upload")),h(I,j("../common/multipart")),h(I,j("../common/parallel")),I.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),w.computeSignature(this.options.accessKeySecret,K)},I.authorization=function(K,U,z,B){var H=w.buildCanonicalString(K.toUpperCase(),U,{headers:B,parameters:z});return w.authorization(this.options.accessKeyId,this.options.accessKeySecret,H)},I.request=function(K){var U,z,B,H,G,ee;return f.default.async(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return U=b.call(this,K),this.options.useFetch||(U.params.mode="disable-fetch"),z=void 0,B=void 0,H=!!K.stream,ue.prev=5,ue.next=8,f.default.awrap(this.urllib.request(U.url,U.params));case 8:z=ue.sent,this.debug("response %s %s, got %s, headers: %j",K.method,U.url,z.status,z.headers,"info"),ue.next=15;break;case 12:ue.prev=12,ue.t0=ue.catch(5),B=ue.t0;case 15:if(G=void 0,!(z&&K.successStatuses&&K.successStatuses.indexOf(z.status)===-1)){ue.next=28;break}return ue.next=19,f.default.awrap(this.requestError(z));case 19:if(G=ue.sent,!(G.code==="RequestTimeTooSkewed"&&!H)){ue.next=25;break}return this.options.amendTimeSkewed=+new Date(G.serverTime)-new Date,ue.next=24,f.default.awrap(this.request(K));case 24:return ue.abrupt("return",ue.sent);case 25:G.params=K,ue.next=32;break;case 28:if(!B){ue.next=32;break}return ue.next=31,f.default.awrap(this.requestError(B));case 31:G=ue.sent;case 32:if(!G){ue.next=34;break}throw G;case 34:if(!K.xmlResponse){ue.next=39;break}return ue.next=37,f.default.awrap(this.parseXML(z.data));case 37:ee=ue.sent,z.data=ee;case 39:return ue.abrupt("return",z);case 40:case"end":return ue.stop()}},null,this,[[5,12]])},I._getResource=function(K){var U="/";return K.bucket&&(U+=K.bucket+"/"),K.object&&(U+=K.object),U},I._isIP=L,I._escape=function(K){return a.encodeURIComponent(K).replace(/%2F/g,"/")},I._getReqUrl=function(K){var U={};n(this.options.endpoint).to(U);var z=this._isIP(U.hostname),B=this.options.cname;K.bucket&&!B&&!z&&(U.host=K.bucket+"."+U.host);var H="/";K.bucket&&z&&(H+=K.bucket+"/"),K.object&&(H+=this._escape(K.object).replace(/\+/g,"%2B")),U.pathname=H;var G={};if(K.query&&h(G,K.query),K.subres){var ee={};g.string(K.subres)?ee[K.subres]="":g.array(K.subres)?K.subres.forEach(function(ie){ee[ie]=""}):ee=K.subres,h(G,ee)}return U.query=G,v.format(U)},I._getUserAgent=function(){var K=m&&m.browser?"js":"nodejs",U="aliyun-sdk-"+K+"/"+t.version,z=E.description;return!z&&m&&(z="Node.js "+m.version.slice(1)+" on "+m.platform+" "+m.arch),this._checkUserAgent(U+" "+z)},I._checkUserAgent=function(K){var U=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return U},I.checkBrowserAndVersion=function(K,U){return C.name===K&&C.version.split(".")[0]===U},I.parseXML=function(K){return new P.default(function(U,z){D.isBuffer(K)&&(K=K.toString()),u.parseString(K,{explicitRoot:!1,explicitArray:!1},function(B,H){B?z(B):U(H)})})},I.requestError=function(K){var U,z,B,H;return f.default.async(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(U=null,!(!K.data||!K.data.length)){ee.next=5;break}K.status===-1||K.status===-2?(U=new Error(K.message),U.name=K.name,U.status=K.status,U.code=K.name):(K.status===404?(U=new Error("Object not exists"),U.name="NoSuchKeyError",U.status=404,U.code="NoSuchKey"):K.status===412?(U=new Error("Pre condition failed"),U.name="PreconditionFailedError",U.status=412,U.code="PreconditionFailed"):(U=new Error("Unknow error, status: "+K.status),U.name="UnknowError",U.status=K.status),U.requestId=K.headers["x-oss-request-id"],U.host=""),ee.next=33;break;case 5:return z=String(K.data),this.debug("request response error data: %s",z,"error"),B=void 0,ee.prev=8,ee.next=11,f.default.awrap(this.parseXML(z));case 11:if(ee.t0=ee.sent,ee.t0){ee.next=14;break}ee.t0={};case 14:B=ee.t0,ee.next=24;break;case 17:return ee.prev=17,ee.t1=ee.catch(8),this.debug(z,"error"),ee.t1.message+=`
raw xml: `+z,ee.t1.status=K.status,ee.t1.requestId=K.headers["x-oss-request-id"],ee.abrupt("return",ee.t1);case 24:H=B.Message||"unknow request error, status: "+K.status,B.Condition&&(H+=" (condition: "+B.Condition+")"),U=new Error(H),U.name=B.Code?B.Code+"Error":"UnknowError",U.status=K.status,U.code=B.Code,U.requestId=B.RequestId,U.hostId=B.HostId,U.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",U,"error"),ee.abrupt("return",U);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,Y,M){(function(D){"use strict";var m=j("babel-runtime/core-js/array/from"),S=c(m),P=j("babel-runtime/core-js/promise"),d=c(P),f=j("babel-runtime/regenerator"),_=c(f);function c(w){return w&&w.__esModule?w:{default:w}}var o=j("is-type-of"),i=j("util"),n=j("path"),u=j("mime"),p=j("copy-to"),h=j("../common/utils/isBlob"),v=h.isBlob,g=j("../common/utils/isFile"),E=g.isFile,a=M;a.multipartUpload=function(s,L,O){var x,b,y,T,k,N,I,W,K;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){z.next=6;break}return z.next=5,_.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return z.abrupt("return",z.sent);case 6:return x=100*1024,O.mime||(E(L)?O.mime=u.getType(n.extname(L.name)):v(L)?O.mime=L.type:O.mime=u.getType(n.extname(L))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),z.next=12,_.default.awrap(this._getFileSize(L));case 12:if(b=z.sent,!(b<x)){z.next=25;break}return y=this._createStream(L,0,b),O.contentLength=b,z.next=18,_.default.awrap(this.putStream(s,y,O));case 18:if(T=z.sent,!(O&&O.progress)){z.next=22;break}return z.next=22,_.default.awrap(O.progress(1));case 22:return k={res:T.res,bucket:this.options.bucket,name:s,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(k.data=T.data),z.abrupt("return",k);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<x)){z.next=29;break}throw new Error("partSize must not be smaller than "+x);case 29:return z.next=31,_.default.awrap(this.initMultipartUpload(s,O));case 31:if(N=z.sent,I=N.uploadId,W=this._getPartSize(b,O.partSize),K={file:L,name:s,fileSize:b,partSize:W,uploadId:I,doneParts:[]},!(O&&O.progress)){z.next=38;break}return z.next=38,_.default.awrap(O.progress(0,K,N.res));case 38:return z.next=40,_.default.awrap(this._resumeMultipart(K,O));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},a._resumeMultipart=function(s,L){var O,x,b,y,T,k,N,I,W,K,U,z,B,H,G,ee,ie,ue;return _.default.async(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(O=this,!this.isCancel()){Te.next=3;break}throw this._makeCancelEvent();case 3:return x=s.file,b=s.fileSize,y=s.partSize,T=s.uploadId,k=s.doneParts,N=s.name,I=[],k.length>0&&p(k).to(I),W=this._divideParts(b,y),K=W.length,U=!1,z=function(ve,de){var ne=this;return new d.default(function(Z,le){var Q,q,be,te;return _.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,ve.isCancel()){X.next=18;break}return Q=W[de-1],q={stream:ve._createStream(x,Q.start,Q.end),size:Q.end-Q.start},X.next=6,_.default.awrap(ve._uploadPart(N,T,de,q));case 6:if(be=X.sent,!(!ve.isCancel()&&!U)){X.next=15;break}if(s.doneParts.push({number:de,etag:be.res.headers.etag}),!L.progress){X.next=12;break}return X.next=12,_.default.awrap(L.progress(k.length/K,s,be.res));case 12:Z({number:de,etag:be.res.headers.etag}),X.next=16;break;case 15:Z();case 16:X.next=19;break;case 18:Z();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),te=new Error,te.name=X.t0.name,te.message=X.t0.message,te.stack=X.t0.stack,te.partNum=de,p(X.t0).to(te),le(te);case 30:case"end":return X.stop()}},null,ne,[[0,21]])})},B=(0,S.default)(new Array(K),function(se,ve){return ve+1}),H=I.map(function(se){return se.number}),G=B.filter(function(se){return H.indexOf(se)<0}),ee=5,ie=L.parallel||ee,Te.next=17,_.default.awrap(this._parallel(G,ie,function(se){return new d.default(function(ve,de){z(O,se).then(function(ne){ne&&I.push(ne),ve()}).catch(function(ne){de(ne)})})}));case 17:if(ue=Te.sent,U=!0,!this.isCancel()){Te.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(ue&&ue.length>0)){Te.next=25;break}throw ue[0].message="Failed to upload some parts with error: "+ue[0].toString()+" part_num: "+ue[0].partNum,ue[0];case 25:return Te.next=27,_.default.awrap(this.completeMultipartUpload(N,T,I,L));case 27:return Te.abrupt("return",Te.sent);case 28:case"end":return Te.stop()}},null,this)},a._getFileSize=function(s){return _.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!o.buffer(s)){O.next=4;break}return O.abrupt("return",s.length);case 4:if(!(v(s)||E(s))){O.next=6;break}return O.abrupt("return",s.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var l=j("stream"),t=l.Readable;function C(w,s){if(!(this instanceof C))return new C(w,s);t.call(this,s),this.file=w,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}i.inherits(C,t),C.prototype.readFileAndPush=function(s){if(this.fileBuffer)for(var L=!0;L&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,x=O+s;x=x>this.fileBuffer.length?this.fileBuffer.length:x,this.start=x,L=this.push(this.fileBuffer.slice(O,x))}},C.prototype._read=function(s){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var L=16*1024;s=s||L;var O=this;this.reader.onload=function(b){O.fileBuffer=D.from(new Uint8Array(b.target.result)),O.file=null,O.readFileAndPush(s)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(s)},a._createStream=function(s,L,O){if(v(s)||E(s))return new C(s.slice(L,O));throw new Error("_createStream requires File/Blob.")},a._getPartSize=function(s,L){var O=10*1e3,x=1024*1024;return L?Math.max(Math.ceil(s/O),L):x},a._divideParts=function(s,L){for(var O=Math.ceil(s/L),x=[],b=0;b<O;b++){var y=L*b,T=Math.min(y+L,s);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,Y,M){"use strict";var D=j("babel-runtime/core-js/promise"),m=o(D),S=j("babel-runtime/core-js/object/keys"),P=o(S),d=j("babel-runtime/core-js/object/assign"),f=o(d),_=j("babel-runtime/regenerator"),c=o(_);function o(O){return O&&O.__esModule?O:{default:O}}var i=j("utility"),n=j("fs"),u=j("is-type-of"),p=j("url"),h=j("copy-to"),v=j("path"),g=j("mime"),E=j("../common/callback"),a=j("../common/signUtils"),l=j("merge-descriptors"),t=j("../common/utils/isBlob"),C=t.isBlob,w=j("../common/utils/isFile"),s=w.isFile,L=M;L.append=function(x,b,y){var T;return c.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return y=y||{},y.position===void 0&&(y.position="0"),y.subres={append:"",position:y.position},y.method="POST",N.next=6,c.default.awrap(this.put(x,b,y));case 6:return T=N.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],N.abrupt("return",T);case 9:case"end":return N.stop()}},null,this)},L.put=function(x,b,y){var T,k,N,I,W,K,U;return c.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(T=void 0,y=y||{},x=this._objectName(x),!u.buffer(b)){B.next=7;break}T=b,B.next=33;break;case 7:if(!(C(b)||s(b))){B.next=32;break}return y.mime||(s(b)?y.mime=g.getType(v.extname(b.name)):y.mime=b.type),k=this._createStream(b,0,b.size),B.next=12,c.default.awrap(this._getFileSize(b));case 12:return y.contentLength=B.sent,B.prev=13,B.next=16,c.default.awrap(this.putStream(x,k,y));case 16:return N=B.sent,B.abrupt("return",N);case 20:if(B.prev=20,B.t0=B.catch(13),!(B.t0.code==="RequestTimeTooSkewed")){B.next=29;break}return this.options.amendTimeSkewed=+new Date(B.t0.serverTime)-new Date,B.next=26,c.default.awrap(this.put(x,b,y));case 26:return B.abrupt("return",B.sent);case 29:throw B.t0;case 30:B.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),I=y.method||"PUT",W=this._objectRequestParams(I,x,y),E.encodeCallback(W,y),W.mime=y.mime,W.content=T,W.successStatuses=[200],B.next=43,c.default.awrap(this.request(W));case 43:return K=B.sent,U={name:x,url:this._objectUrl(x),res:K.res},W.headers&&W.headers["x-oss-callback"]&&(U.data=JSON.parse(K.data.toString())),B.abrupt("return",U);case 47:case"end":return B.stop()}},null,this,[[13,20]])},L.putStream=function(x,b,y){var T,k,N,I;return c.default.async(function(K){for(;;)switch(K.prev=K.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",k=this._objectRequestParams(T,x,y),E.encodeCallback(k,y),k.mime=y.mime,k.stream=b,k.successStatuses=[200],K.next=13,c.default.awrap(this.request(k));case 13:return N=K.sent,I={name:x,url:this._objectUrl(x),res:N.res},k.headers&&k.headers["x-oss-callback"]&&(I.data=JSON.parse(N.data.toString())),K.abrupt("return",I);case 17:case"end":return K.stop()}},null,this)},l(L,j("../common/object/copyObject")),l(L,j("../common/object/getObjectTagging")),l(L,j("../common/object/putObjectTagging")),l(L,j("../common/object/deleteObjectTagging")),l(L,j("../common/image")),l(L,j("../common/object/getBucketVersions")),l(L,j("../common/object/getACL")),l(L,j("../common/object/putACL")),l(L,j("../common/object/head")),l(L,j("../common/object/delete")),l(L,j("../common/object/get")),l(L,j("../common/object/putSymlink")),l(L,j("../common/object/getSymlink")),l(L,j("../common/object/deleteMulti")),l(L,j("../common/object/getObjectMeta")),L.putMeta=function(x,b,y){var T;return c.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,c.default.awrap(this.copy(x,x,{meta:b||{},timeout:y&&y.timeout,ctx:y&&y.ctx}));case 2:return T=N.sent,N.abrupt("return",T);case 4:case"end":return N.stop()}},null,this)},L.list=function(x,b){var y,T,k,N,I;return c.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return y=this._objectRequestParams("GET","",b),y.query=x,y.xmlResponse=!0,y.successStatuses=[200],K.next=6,c.default.awrap(this.request(y));case 6:return T=K.sent,k=T.data.Contents,N=this,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(U){return{name:U.Key,url:N._objectUrl(U.Key),lastModified:U.LastModified,etag:U.ETag,type:U.Type,size:Number(U.Size),storageClass:U.StorageClass,owner:{id:U.Owner.ID,displayName:U.Owner.DisplayName}}})),I=T.data.CommonPrefixes||null,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(U){return U.Prefix})),K.abrupt("return",{res:T.res,objects:k,prefixes:I,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},L.restore=function(x,b){var y,T;return c.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return b=b||{},b.subres=(0,f.default)({restore:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),y=this._objectRequestParams("POST",x,b),y.successStatuses=[202],N.next=7,c.default.awrap(this.request(y));case 7:return T=N.sent,N.abrupt("return",{res:T.res});case 9:case"end":return N.stop()}},null,this)},L.signatureUrl=function(x,b){b=b||{},x=this._objectName(x),b.method=b.method||"GET";var y=i.timestamp()+(b.expires||1800),T={bucket:this.options.bucket,object:x},k=this._getResource(T);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var N=a._signatureForURL(this.options.accessKeySecret,b,k,y),I=p.parse(this._getReqUrl(T));return I.query={OSSAccessKeyId:this.options.accessKeyId,Expires:y,Signature:N.Signature},h(N.subResource).to(I.query),I.format()},L.getObjectUrl=function(x,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(x))},L._objectUrl=function(x){return this._getReqUrl({bucket:this.options.bucket,object:x})},L.generateObjectUrl=function(O,x){if(x)x[x.length-1]!=="/"&&(x+="/");else{x=this.options.endpoint.format();var b=p.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))},L._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={},h(y.headers).to(T.headers)),T},L._objectName=function(x){return x.replace(/^\/+/,"")},L._convertMetaToHeaders=function(x,b){if(!x)return;(0,P.default)(x).forEach(function(y){b["x-oss-meta-"+y]=x[y]})},L._deleteFileSafe=function(x){var b=this;return new m.default(function(y){n.exists(x,function(T){T?n.unlink(x,function(k){k&&b.debug("unlink %j error: %s",x,k,"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,Y,M){"use strict";M.version="6.10.0"},{}],6:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(_){return _&&_.__esModule?_:{default:_}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=M;f.deleteBucketLifecycle=function(c,o){var i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return d(c),i=this._bucketRequestParams("DELETE",c,"lifecycle",o),i.successStatuses=[204],p.next=5,m.default.awrap(this.request(i));case 5:return n=p.sent,p.abrupt("return",{res:n.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(_){return _&&_.__esModule?_:{default:_}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=M;f.deleteBucketWebsite=function(c,o){var i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return d(c),i=this._bucketRequestParams("DELETE",c,"website",o),i.successStatuses=[204],p.next=5,m.default.awrap(this.request(i));case 5:return n=p.sent,p.abrupt("return",{res:n.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("../utils/isArray"),_=f.isArray,c=j("../utils/formatObjKey"),o=c.formatObjKey,i=M;i.getBucketLifecycle=function(u,p){var h,v,g;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return d(u),h=this._bucketRequestParams("GET",u,"lifecycle",p),h.successStatuses=[200],h.xmlResponse=!0,a.next=6,m.default.awrap(this.request(h));case 6:return v=a.sent,g=v.data.Rule||null,g&&(_(g)||(g=[g]),g=g.map(function(l){return l.ID&&(l.id=l.ID,delete l.ID),l.Tag&&!_(l.Tag)&&(l.Tag=[l.Tag]),o(l,"firstLowerCase")})),a.abrupt("return",{rules:g,res:v.res});case 10:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(_){return _&&_.__esModule?_:{default:_}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=M;f.getBucketVersioning=function(c,o){var i,n,u;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return d(c),i=this._bucketRequestParams("GET",c,"versioning",o),i.xmlResponse=!0,i.successStatuses=[200],h.next=6,m.default.awrap(this.request(i));case 6:return n=h.sent,u=n.data.Status,h.abrupt("return",{status:n.status,versionStatus:u,res:n.res});case 9:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("../utils/isObject"),_=f.isObject,c=M;c.getBucketWebsite=function(i,n){var u,p,h;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return d(i),u=this._bucketRequestParams("GET",i,"website",n),u.successStatuses=[200],u.xmlResponse=!0,g.next=6,m.default.awrap(this.request(u));case 6:return p=g.sent,h=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(_(p.data.RoutingRules.RoutingRule)?h=[p.data.RoutingRules.RoutingRule]:h=p.data.RoutingRules.RoutingRule),g.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:h,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(s){return s&&s.__esModule?s:{default:s}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("../utils/isArray"),_=f.isArray,c=j("../utils/deepCopy"),o=c.deepCopy,i=j("../utils/isObject"),n=i.isObject,u=j("../utils/obj2xml"),p=u.obj2xml,h=j("../utils/checkObjectTag"),v=h.checkObjectTag,g=j("../utils/getStrBytesCount"),E=g.getStrBytesCount,a=M;a.putBucketLifecycle=function(L,O,x){var b,y,T,k,N;return m.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:if(d(L),_(O)){W.next=3;break}throw new Error("rules must be Array");case 3:return b=this._bucketRequestParams("PUT",L,"lifecycle",x),y=[],T={LifecycleConfiguration:{Rule:y}},O.forEach(function(K){l(K),w(K),K.id&&(K.ID=K.id,delete K.id),y.push(K)}),k=p(T,{headers:!0,firstUpperCase:!0}),b.content=k,b.mime="xml",b.successStatuses=[200],W.next=13,m.default.awrap(this.request(b));case 13:return N=W.sent,W.abrupt("return",{res:N.res});case 15:case"end":return W.stop()}},null,this)};function l(s){s.days&&(s.expiration={days:s.days}),s.date&&(s.expiration={createdBeforeDate:s.date})}function t(s,L){var O=s.days,x=s.createdBeforeDate;if(!O&&!x)throw new Error(L+" 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 C(s){if(!_(s)&&!n(s))throw new Error("tag must be Object or Array");s=n(s)?[s]:s;var L={},O=o(s);O.forEach(function(x){L[x.key]=x.value}),v(L)}function w(s){if(s.id&&E(s.id)>255)throw new Error("ID is composed of 255 bytes at most");if(s.prefix===""||s.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(s.status))throw new Error("Status must be Enabled or Disabled");if(s.transition){if(!["IA","Archive"].includes(s.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(s.transition,"Transition")}if(s.expiration){if(!s.expiration.expiredObjectDeleteMarker)t(s.expiration,"Expiration");else if(s.expiration.days||s.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(s.abortMultipartUpload&&t(s.abortMultipartUpload,"AbortMultipartUpload"),!s.expiration&&!s.abortMultipartUpload&&!s.transition&&!s.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(s.tag){if(s.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");C(s.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("../utils/obj2xml"),_=f.obj2xml,c=M;c.putBucketVersioning=function(i,n){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,h,v;return m.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(d(i),["Enabled","Suspended"].includes(n)){E.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",i,"versioning",u),h={VersioningConfiguration:{Status:n}},p.mime="xml",p.content=_(h,{headers:!0}),E.next=9,m.default.awrap(this.request(p));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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("../utils/obj2xml"),_=f.obj2xml,c=j("../utils/isArray"),o=c.isArray,i=M;i.putBucketWebsite=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],v,g,E,a,l;return m.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(d(u),v=this._bucketRequestParams("PUT",u,"website",h),g={Suffix:p.index||"index.html"},E={IndexDocument:g},a={WebsiteConfiguration:E},p.supportSubDir&&(g.SupportSubDir=p.supportSubDir),p.type&&(g.Type=p.type),p.error&&(E.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){C.next=12;break}if(o(p.routingRules)){C.next=11;break}throw new Error("RoutingRules must be Array");case 11:E.RoutingRules={RoutingRule:p.routingRules};case 12:return a=_(a),v.content=a,v.mime="xml",v.successStatuses=[200],C.next=18,m.default.awrap(this.request(v));case 18:return l=C.sent,C.abrupt("return",{res:l.res});case 20:case"end":return C.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/core-js/object/keys"),S=f(m),P=j("babel-runtime/core-js/json/stringify"),d=f(P);function f(_){return _&&_.__esModule?_:{default:_}}M.encodeCallback=function(c,o){if(c.headers=c.headers||{},!Object.prototype.hasOwnProperty.call(c.headers,"x-oss-callback")&&o.callback){var i={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(i.callbackHost=o.callback.host),o.callback.contentType&&(i.callbackBodyType=o.callback.contentType);var n=D.from((0,d.default)(i)).toString("base64");if(c.headers["x-oss-callback"]=n,o.callback.customValue){var u={};(0,S.default)(o.callback.customValue).forEach(function(p){u["x:"+p]=o.callback.customValue[p]}),c.headers["x-oss-callback-var"]=D.from((0,d.default)(u)).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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/assign"),m=S(D);function S(i){return i&&i.__esModule?i:{default:i}}var P=j("humanize-ms"),d=j("url"),f=j("../utils/checkBucketName"),_=f.checkBucketName;function c(i,n){var u=d.parse(i);if(u.protocol||(u=d.parse("http"+(n?"s":"")+"://"+i)),u.protocol!=="http:"&&u.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return u}function o(i,n,u){var p=u?"https://":"http://",h=n?"-internal.aliyuncs.com":".aliyuncs.com",v="vpc100-oss-cn-";return i.substr(0,v.length)===v&&(h=".aliyuncs.com"),d.parse(p+i+h)}Y.exports=function(i){if(!i||!i.accessKeyId||!i.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");i.bucket&&_(i.bucket);var n=(0,m.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},i);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=P(n.timeout)),n.endpoint)n.endpoint=c(n.endpoint,n.secure);else if(n.region)n.endpoint=o(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(j,Y,M){"use strict";var D=j("merge-descriptors"),m=M;D(m,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),d=P.checkBucketName,f=j("querystring"),_=j("js-base64"),c=_.Base64.encode,o=M;o.processObjectSave=function(u,p,h,v){var g,E,a,l;return m.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:return i(u,"sourceObject"),i(p,"targetObject"),i(h,"process"),p=this._objectName(p),v&&d(v),g=this._objectRequestParams("POST",u,{subres:"x-oss-process"}),E=v?",b_"+c(v):"",p=c(p),a={"x-oss-process":h+"|sys/saveas,o_"+p+E},g.content=f.stringify(a),C.next=12,m.default.awrap(this.request(g));case 12:return l=C.sent,C.abrupt("return",{res:l.res,status:l.res.status});case 14:case"end":return C.stop()}},null,this)};function i(n,u){if(!n)throw new Error(u+" is required");if(typeof n!="string")throw new Error(u+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=S(D);function S(o){return o&&o.__esModule?o:{default:o}}var P=j("copy-to"),d=j("./callback"),f=j("./utils/deepCopy"),_=f.deepCopy,c=M;c.listUploads=function(i,n){var u,p,h,v;return m.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return n=n||{},u={},P(n).to(u),u.subres="uploads",p=this._objectRequestParams("GET","",u),p.query=i,p.xmlResponse=!0,p.successStatuses=[200],E.next=10,m.default.awrap(this.request(p));case 10:return h=E.sent,v=h.data.Upload||[],Array.isArray(v)||(v=[v]),v=v.map(function(a){return{name:a.Key,uploadId:a.UploadId,initiated:a.Initiated}}),E.abrupt("return",{res:h.res,uploads:v,bucket:h.data.Bucket,nextKeyMarker:h.data.NextKeyMarker,nextUploadIdMarker:h.data.NextUploadIdMarker,isTruncated:h.data.IsTruncated==="true"});case 15:case"end":return E.stop()}},null,this)},c.listParts=function(i,n,u,p){var h,v,g;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return p=p||{},h={},P(p).to(h),h.subres={uploadId:n},v=this._objectRequestParams("GET",i,h),v.query=u,v.xmlResponse=!0,v.successStatuses=[200],a.next=10,m.default.awrap(this.request(v));case 10:return g=a.sent,a.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 a.stop()}},null,this)},c.abortMultipartUpload=function(i,n,u){var p,h,v;return m.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return this._stop(),u=u||{},p={},P(u).to(p),p.subres={uploadId:n},h=this._objectRequestParams("DELETE",i,p),h.successStatuses=[204],E.next=9,m.default.awrap(this.request(h));case 9:return v=E.sent,E.abrupt("return",{res:v.res});case 11:case"end":return E.stop()}},null,this)},c.initMultipartUpload=function(i,n){var u,p,h;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return n=n||{},u={},P(n).to(u),u.headers=u.headers||{},this._convertMetaToHeaders(n.meta,u.headers),u.subres="uploads",p=this._objectRequestParams("POST",i,u),p.mime=n.mime,p.xmlResponse=!0,p.successStatuses=[200],g.next=12,m.default.awrap(this.request(p));case 12:return h=g.sent,g.abrupt("return",{res:h.res,bucket:h.data.Bucket,name:h.data.Key,uploadId:h.data.UploadId});case 14:case"end":return g.stop()}},null,this)},c.uploadPart=function(i,n,u,p,h,v,g){var E;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return E={stream:this._createStream(p,h,v),size:v-h},l.next=3,m.default.awrap(this._uploadPart(i,n,u,E,g));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},c.completeMultipartUpload=function(i,n,u,p){var h,v,g,E,a,l,t,C;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:for(h=u.concat().sort(function(L,O){return L.number-O.number}).filter(function(L,O,x){return!O||L.number!==x[O-1].number}),v=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,g=0;g<h.length;g++)E=h[g],v+=`<Part>
`,v+="<PartNumber>"+E.number+`</PartNumber>
`,v+="<ETag>"+E.etag+`</ETag>
`,v+=`</Part>
`;return v+="</CompleteMultipartUpload>",p=p||{},a={},a=_(p),a.headers&&delete a.headers["x-oss-server-side-encryption"],a.subres={uploadId:n},l=this._objectRequestParams("POST",i,a),d.encodeCallback(l,a),l.mime="xml",l.content=v,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],s.next=17,m.default.awrap(this.request(l));case 17:return t=s.sent,C={res:t.res,bucket:l.bucket,name:i,etag:t.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(C.data=JSON.parse(t.data.toString())),s.abrupt("return",C);case 21:case"end":return s.stop()}},null,this)},c._uploadPart=function(i,n,u,p,h){var v,g,E;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return h=h||{},v={},P(h).to(v),v.headers={"Content-Length":p.size},v.subres={partNumber:u,uploadId:n},g=this._objectRequestParams("PUT",i,v),g.mime=v.mime,g.stream=p.stream,g.successStatuses=[200],l.next=11,m.default.awrap(this.request(g));case 11:if(E=l.sent,E.res.headers.etag){l.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 p.stream=null,g.stream=null,l.abrupt("return",{name:i,etag:E.res.headers.etag,res:E.res});case 17:case"end":return l.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=_(D),S=j("babel-runtime/core-js/object/keys"),P=_(S),d=j("babel-runtime/helpers/typeof"),f=_(d);function _(n){return n&&n.__esModule?n:{default:n}}var c=j("../utils/checkBucketName"),o=c.checkBucketName,i=M;i.copy=function(u,p,h,v){var g,E,a;return m.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof h=="undefined"?"undefined":(0,f.default)(h))==="object"&&(v=h),v=v||{},v.headers=v.headers||{},(0,P.default)(v.headers).forEach(function(C){v.headers["x-oss-copy-source-"+C.toLowerCase()]=v.headers[C]}),v.meta&&(v.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(v.meta,v.headers),p=this._getSourceName(p,h),v.versionId&&(p=p+"?versionId="+v.versionId),v.headers["x-oss-copy-source"]=p,g=this._objectRequestParams("PUT",u,v),g.xmlResponse=!0,g.successStatuses=[200,304],t.next=14,m.default.awrap(this.request(g));case 14:return E=t.sent,a=E.data,a&&(a={etag:a.ETag,lastModified:a.LastModified}),t.abrupt("return",{data:a,res:E.res});case 18:case"end":return t.stop()}},null,this)},i._getSourceName=function(u,p){return typeof p=="string"?u=this._objectName(u):u[0]!=="/"?p=this.options.bucket:(p=u.replace(/\/(.+?)(\/.*)/,"$1"),u=u.replace(/(\/.+?\/)(.*)/,"$2")),o(p),u=encodeURI(u),u="/"+p+"/"+u,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.delete=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("DELETE",c,o),i.successStatuses=[204],p.next=6,m.default.awrap(this.request(i));case 6:return n=p.sent,p.abrupt("return",{res:n.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(i){return i&&i.__esModule?i:{default:i}}var f=j("utility"),_=j("../utils/obj2xml"),c=_.obj2xml,o=M;o.deleteMulti=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,h,v,g,E,a,l,t,C,w,s,L;return m.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(p=[],!(!n||!n.length)){x.next=3;break}throw new Error("names is required");case 3:for(h=0;h<n.length;h++)v={},typeof n[h]=="string"?v.Key=f.escape(this._objectName(n[h])):(g=n[h],E=g.key,a=g.versionId,v.Key=f.escape(this._objectName(E)),v.VersionId=a),p.push(v);return l={Delete:{Quiet:!!u.quiet,Object:p}},t=c(l,{headers:!0}),u.subres=(0,P.default)({delete:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),C=this._objectRequestParams("POST","",u),C.mime="xml",C.content=t,C.xmlResponse=!0,C.successStatuses=[200],x.next=15,m.default.awrap(this.request(C));case 15:return w=x.sent,s=w.data,L=s&&s.Deleted||null,L&&(Array.isArray(L)||(L=[L])),x.abrupt("return",{res:w.res,deleted:L||[]});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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.deleteObjectTagging=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),c=this._objectName(c),i=this._objectRequestParams("DELETE",c,o),i.successStatuses=[204],p.next=7,m.default.awrap(this.request(i));case 7:return n=p.sent,p.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(o){return o&&o.__esModule?o:{default:o}}var f=j("fs"),_=j("is-type-of"),c=M;c.get=function(i,n){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,h,v,g;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return p=null,h=!1,_.writableStream(n)?p=n:_.string(n)?(p=f.createWriteStream(n),h=!0):u=n,u=u||{},u.subres=(0,P.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),v=void 0,a.prev=8,g=this._objectRequestParams("GET",i,u),g.writeStream=p,g.successStatuses=[200,206,304],a.next=14,m.default.awrap(this.request(g));case 14:v=a.sent,h&&p.destroy(),a.next=25;break;case 18:if(a.prev=18,a.t0=a.catch(8),!h){a.next=24;break}return p.destroy(),a.next=24,m.default.awrap(this._deleteFileSafe(n));case 24:throw a.t0;case 25:return a.abrupt("return",{res:v.res,content:v.data});case 26:case"end":return a.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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.getACL=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o.subres=(0,P.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),c=this._objectName(c),i=this._objectRequestParams("GET",c,o),i.successStatuses=[200],i.xmlResponse=!0,p.next=8,m.default.awrap(this.request(i));case 8:return n=p.sent,p.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=_(D),S=j("babel-runtime/regenerator"),P=_(S),d=j("babel-runtime/core-js/object/assign"),f=_(d);function _(g){return g&&g.__esModule?g:{default:g}}var c=M,o=j("../utils/isObject"),i=o.isObject,n=j("../utils/isArray"),u=n.isArray;c.getBucketVersions=p,c.listObjectVersions=p;function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,t,C,w,s;return P.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,f.default)({versions:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),a=this._objectRequestParams("GET","",E),a.xmlResponse=!0,a.successStatuses=[200],a.query=v(g),O.next=10,P.default.awrap(this.request(a));case 10:return l=O.sent,t=l.data.Version||[],C=l.data.DeleteMarker||[],w=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(x){return{name:x.Key,url:w._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}}})),C&&(u(C)||(C=[C]),C=C.map(function(x){return{name:x.Key,lastModified:x.LastModified,versionId:x.VersionId,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),s=l.data.CommonPrefixes||null,s&&(u(s)||(s=[s]),s=s.map(function(x){return x.Prefix})),O.abrupt("return",{res:l.res,objects:t,deleteMarker:C,prefixes:s,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function h(g){return g.replace(/([A-Z])/g,"-$1").toLowerCase()}function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E={};return i(g)&&(0,m.default)(g).forEach(function(a){E[h(a)]=g[a]}),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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.getObjectMeta=function(c,o){var i,n;return m.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return o=o||{},c=this._objectName(c),o.subres=(0,P.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("HEAD",c,o),i.successStatuses=[200],p.next=8,m.default.awrap(this.request(i));case 8:return n=p.sent,p.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(o){return o&&o.__esModule?o:{default:o}}var f=M,_=j("../utils/isObject"),c=_.isObject;f.getObjectTagging=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,h,v,g;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return n.subres=(0,P.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),i=this._objectName(i),u=this._objectRequestParams("GET",i,n),u.successStatuses=[200],a.next=7,m.default.awrap(this.request(u));case 7:return p=a.sent,a.next=10,m.default.awrap(this.parseXML(p.data));case 10:return h=a.sent,v=h.TagSet.Tag,v=v&&c(v)?[v]:v||[],g={},v.forEach(function(l){g[l.Key]=l.Value}),a.abrupt("return",{status:p.status,res:p.res,tag:g});case 16:case"end":return a.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.getSymlink=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n,u;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return o.subres=(0,P.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),c=this._objectName(c),i=this._objectRequestParams("GET",c,o),i.successStatuses=[200],h.next=7,m.default.awrap(this.request(i));case 7:return n=h.sent,u=n.res.headers["x-oss-symlink-target"],h.abrupt("return",{targetName:decodeURIComponent(u),res:n.res});case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=_(D),S=j("babel-runtime/core-js/object/keys"),P=_(S),d=j("babel-runtime/core-js/object/assign"),f=_(d);function _(o){return o&&o.__esModule?o:{default:o}}var c=M;c.head=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,p,h;return m.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return n.subres=(0,f.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),u=this._objectRequestParams("HEAD",i,n),u.successStatuses=[200,304],g.next=6,m.default.awrap(this.request(u));case 6:return p=g.sent,h={meta:null,res:p.res,status:p.status},p.status===200&&(0,P.default)(p.headers).forEach(function(E){E.indexOf("x-oss-meta-")===0&&(h.meta||(h.meta={}),h.meta[E.substring(11)]=p.headers[E])}),g.abrupt("return",h);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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.putACL=function(c,o,i){var n,u;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i=i||{},i.subres=(0,P.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.headers=i.headers||{},i.headers["x-oss-object-acl"]=o,c=this._objectName(c),n=this._objectRequestParams("PUT",c,i),n.successStatuses=[200],h.next=10,m.default.awrap(this.request(n));case 10:return u=h.sent,h.abrupt("return",{res:u.res});case 12:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=_(D),S=j("babel-runtime/core-js/object/keys"),P=_(S),d=j("babel-runtime/core-js/object/assign"),f=_(d);function _(p){return p&&p.__esModule?p:{default:p}}var c=j("../utils/obj2xml"),o=c.obj2xml,i=j("../utils/checkObjectTag"),n=i.checkObjectTag,u=M;u.putObjectTagging=function(h,v){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E,a,l;return m.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:return n(v),g.subres=(0,f.default)({tagging:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),h=this._objectName(h),E=this._objectRequestParams("PUT",h,g),E.successStatuses=[200],v=(0,P.default)(v).map(function(w){return{Key:w,Value:v[w]}}),a={Tagging:{TagSet:{Tag:v}}},E.mime="xml",E.content=o(a),C.next=12,m.default.awrap(this.request(E));case 12:return l=C.sent,C.abrupt("return",{res:l.res,status:l.status});case 14:case"end":return C.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,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/object/assign"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f.putSymlink=function(c,o,i){var n,u;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i=i||{},i.headers=i.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(i.meta,i.headers),i.headers["x-oss-symlink-target"]=o,i.subres=(0,P.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.storageClass&&(i.headers["x-oss-storage-class"]=i.storageClass),c=this._objectName(c),n=this._objectRequestParams("PUT",c,i),n.successStatuses=[200],h.next=13,m.default.awrap(this.request(n));case 13:return u=h.sent,h.abrupt("return",{res:u.res});case 15:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Y,M){"use strict";var D=j("babel-runtime/regenerator"),m=d(D),S=j("babel-runtime/core-js/promise"),P=d(S);function d(_){return _&&_.__esModule?_:{default:_}}var f=M;f._parallelNode=function(c,o,i,n){var u,p,h,v,g,E,a,l;return m.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:u=this,p=[],h=[],v=c.length/o,g=c.length%o,E=g===0?v:(c.length-g)/o+1,a=1,l=0;case 8:if(!(l<c.length)){C.next=26;break}if(!u.isCancel()){C.next=11;break}return C.abrupt("break",26);case 11:if(n?h.push(i(u,c[l],n)):h.push(i(u,c[l])),!(h.length===o||a===E&&l===c.length-1)){C.next=23;break}return C.prev=13,a+=1,C.next=17,m.default.awrap(P.default.all(h));case 17:C.next=22;break;case 19:C.prev=19,C.t0=C.catch(13),p.push(C.t0);case 22:h=[];case 23:l++,C.next=8;break;case 26:return C.abrupt("return",p);case 27:case"end":return C.stop()}},null,this,[[13,19]])},f._parallel=function(c,o,i){var n=this;return new P.default(function(u){var p=[];if(o<=0||!c){u(p);return}function h(s){return function(){if(s===null)throw new Error("Callback was already called.");var L=s;s=null;for(var O=arguments.length,x=Array(O),b=0;b<O;b++)x[b]=arguments[b];L.apply(this,x)}}function v(s){var L=-1,O=s.length;return function(){return++L<O&&!n.isCancel()?{value:s[L],key:L}:null}}var g=v(c),E=!1,a=0,l=!1;function t(s,L){a-=1,s?(E=!0,p.push(s),u(p)):L==={}||E&&a<=0?(E=!0,u(p)):l||(n.isCancel()?u(p):w())}function C(s,L){i(s).then(function(O){L(null,O)}).catch(function(O){L(O)})}function w(){for(l=!0;a<o&&!E&&!n.isCancel();){var s=g();if(s===null||p.length>0){E=!0,a<=0&&u(p);return}a+=1,C(s.value,h(t))}l=!1}w()})},f.cancel=function(c){this.options.cancelFlag=!0,c&&this.abortMultipartUpload(c.name,c.uploadId,c.options)},f.isCancel=function(){return this.options.cancelFlag},f.resetCancelFlag=function(){this.options.cancelFlag=!1},f._stop=function(){this.options.cancelFlag=!0},f._makeCancelEvent=function(){var c={status:0,name:"cancel"};return c}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/core-js/json/stringify"),S=f(m),P=j("babel-runtime/core-js/object/keys"),d=f(P);function f(o){return o&&o.__esModule?o:{default:o}}var _=j("./../../shims/crypto/crypto.js"),c=j("is-type-of");M.buildCanonicalizedResource=function(i,n){var u=""+i,p="?";if(c.string(n)&&n.trim()!=="")u+=p+n;else if(c.array(n))n.sort(),u+=p+n.join("&");else if(n){var h=function(E,a){return E[0]>a[0]?1:E[0]<a[0]?-1:0},v=function(E){u+=p+E,n[E]&&(u+="="+n[E]),p="&"};(0,d.default)(n).sort(h).forEach(v)}return u},M.buildCanonicalString=function(i,n,u,p){u=u||{};var h=u.headers||{},v="x-oss-",g=[],E={},a=[i.toUpperCase(),h["Content-Md5"]||"",h["Content-Type"]||h["Content-Type".toLowerCase()],p||h["x-oss-date"]];return(0,d.default)(h).forEach(function(l){var t=l.toLowerCase();t.indexOf(v)===0&&(E[t]=String(h[l]).trim())}),(0,d.default)(E).sort().forEach(function(l){g.push(l+":"+E[l])}),a=a.concat(g),a.push(this.buildCanonicalizedResource(n,u.parameters)),a.join(`
`)},M.computeSignature=function(i,n){var u=_.createHmac("sha1",i);return u.update(D.from(n,"utf8")).digest("base64")},M.authorization=function(i,n,u){return"OSS "+i+":"+this.computeSignature(n,u)},M._signatureForURL=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=arguments[2],p=arguments[3],h={},v=n.subResource,g=v===void 0?{}:v;if(n.process){var E="x-oss-process";g[E]=n.process}if(n.trafficLimit){var a="x-oss-traffic-limit";g[a]=n.trafficLimit}if(n.response&&(0,d.default)(n.response).forEach(function(w){var s="response-"+w.toLowerCase();g[s]=n.response[w]}),(0,d.default)(n).forEach(function(w){var s=w.toLowerCase(),L=n[w];s.indexOf("x-oss-")===0?h[s]=L:(s.indexOf("content-md5")===0||s.indexOf("content-type")===0)&&(h[w]=L)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(g["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var l={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(l.callbackHost=n.callback.host),n.callback.contentType&&(l.callbackBodyType=n.callback.contentType),g.callback=D.from((0,S.default)(l)).toString("base64"),n.callback.customValue){var t={};(0,d.default)(n.callback.customValue).forEach(function(w){t["x:"+w]=n.callback.customValue[w]}),g["callback-var"]=D.from((0,S.default)(t)).toString("base64")}}var C=this.buildCanonicalString(n.method,u,{headers:h,parameters:g},p.toString());return{Signature:this.computeSignature(i,C),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,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.checkBucketName=void 0,M.checkBucketName=function(D,m){var S=m?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(D))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/entries"),m=S(D);function S(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(M,"__esModule",{value:!0}),M.checkObjectTag=void 0;var P=j("./checkValid"),d=P.checkValid,f=j("./isObject"),_=f.isObject,c=[{validator:function(u){if(typeof u!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],o={key:[].concat(c,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(c,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function i(n){if(!_(n))throw new Error("tag must be Object");var u=(0,m.default)(n);if(u.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];u.forEach(function(h){h.forEach(function(v,g){d(v,o[p[g]])})})}M.checkObjectTag=i},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.checkValid=void 0;function D(m,S){S.forEach(function(P){if(P.validator)P.validator(m);else if(P.pattern&&!P.pattern.test(m))throw new Error(P.msg)})}M.checkValid=D},{}],38:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/core-js/object/assign"),S=P(m);function P(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(M,"__esModule",{value:!0}),M.createRequest=void 0;var d=j("./../../../shims/crypto/crypto.js"),f=j("debug")("ali-oss"),_=j("mime"),c=j("dateformat"),o=j("copy-to"),i=j("path");function n(h,v){return h[v]||h[v.toLowerCase()]}function u(h,v){delete h[v],delete h[v.toLowerCase()]}function p(h){var v=new Date;this.options.amendTimeSkewed&&(v=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":c(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,S.default)(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),o(h.headers).to(g),n(g,"Content-Type")||(h.mime&&h.mime.indexOf("/")>0?g["Content-Type"]=h.mime:g["Content-Type"]=_.getType(h.mime||i.extname(h.object||""))),n(g,"Content-Type")||u(g,"Content-Type"),h.content&&(g["Content-Md5"]=d.createHash("md5").update(D.from(h.content,"utf8")).digest("base64"),g["Content-Length"]||(g["Content-Length"]=h.content.length));var E=this._getResource(h);g.authorization=this.authorization(h.method,E,h.subres,g);var a=this._getReqUrl(h);f("request %s %s, with headers %j, !!stream: %s",h.method,a,g,!!h.stream);var l=h.timeout||this.options.timeout,t={method:h.method,content:h.content,stream:h.stream,headers:g,timeout:l,writeStream:h.writeStream,customResponse:h.customResponse,ctx:h.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:a,params:t}}M.createRequest=p}).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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=d(D),S=j("babel-runtime/helpers/typeof"),P=d(S);function d(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(M,"__esModule",{value:!0}),M.deepCopy=void 0,M.deepCopy=function(f){if(f===null||(typeof f=="undefined"?"undefined":(0,P.default)(f))!=="object")return f;var _=Array.isArray(f)?[]:{};return(0,m.default)(f).forEach(function(c){_[c]=M.deepCopy(f[c])}),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=d(D),S=j("babel-runtime/helpers/typeof"),P=d(S);function d(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(M,"__esModule",{value:!0}),M.formatObjKey=void 0;function f(c,o){if(c===null||(typeof c=="undefined"?"undefined":(0,P.default)(c))!=="object")return c;var i=void 0;if(Array.isArray(c)){i=[];for(var n=0;n<c.length;n++)i.push(f(c[n],o))}else i={},(0,m.default)(c).forEach(function(u){i[_(u,o)]=f(c[u],o)});return i}M.formatObjKey=f;function _(c,o){return o==="firstUpperCase"?c=c.replace(/^./,function(i){return i.toUpperCase()}):o==="firstLowerCase"&&(c=c.replace(/^./,function(i){return i.toLowerCase()})),c}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.getStrBytesCount=void 0;function D(m){for(var S=0,P=0;P<m.length;P++){var d=m.charAt(P);/^[\u00-\uff]$/.test(d)?S+=1:S+=2}return S}M.getStrBytesCount=D},{}],42:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isArray=void 0,M.isArray=function(D){return Object.prototype.toString.call(D)==="[object Array]"}},{}],43:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isBlob=void 0;function D(m){return typeof Blob!="undefined"&&m instanceof Blob}M.isBlob=D},{}],44:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isFile=void 0,M.isFile=function(D){return typeof File!="undefined"&&D instanceof File}},{}],45:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isIP=void 0,M.isIP=function(D){var m=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,S=/^\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 m.test(D)||S.test(D)}},{}],46:[function(j,Y,M){"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.isObject=void 0,M.isObject=function(D){return Object.prototype.toString.call(D)==="[object Object]"}},{}],47:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=S(D);function S(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(M,"__esModule",{value:!0}),M.obj2xml=void 0;var P=j("./formatObjKey");function d(_){return Object.prototype.toString.call(_).replace(/(.*? |])/g,"").toLowerCase()}function f(_,c){var o="";return c&&c.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
`),c&&c.firstUpperCase&&(_=P.formatObjKey(_,"firstUpperCase")),d(_)==="object"?(0,m.default)(_).forEach(function(i){d(_[i])==="string"||d(_[i])==="number"?o+="<"+i+">"+_[i]+"</"+i+">":d(_[i])==="object"?o+="<"+i+">"+f(_[i])+"</"+i+">":d(_[i])==="array"?o+=_[i].map(function(n){return"<"+i+">"+f(n)+"</"+i+">"}).join(""):o+="<"+i+">"+_[i].toString()+"</"+i+">"}):o+=_.toString(),o}M.obj2xml=f},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Y,M){Y.exports=D,Y.exports.HttpsAgent=D;function D(){}},{}],49:[function(j,Y,M){Y.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Y,M){"use strict";var D="@@any-promise/REGISTRATION",m=null;Y.exports=function(S,P){return function(f,_){f=f||null,_=_||{};var c=_.global!==!1;if(m===null&&c&&(m=S[D]||null),m!==null&&f!==null&&m.implementation!==f)throw new Error('any-promise already defined as "'+m.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return m===null&&(f!==null&&typeof _.Promise!="undefined"?m={Promise:_.Promise,implementation:f}:m=P(f),c&&(S[D]=m)),m}}},{}],51:[function(j,Y,M){"use strict";Y.exports=j("./loader")(window,D);function D(){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,Y,M){Y.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Y,M){Y.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,Y,M){Y.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,Y,M){Y.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Y,M){Y.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,Y,M){Y.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Y,M){Y.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Y,M){"use strict";M.__esModule=!0;var D=j("../core-js/symbol/iterator"),m=f(D),S=j("../core-js/symbol"),P=f(S),d=typeof P.default=="function"&&typeof m.default=="symbol"?function(_){return typeof _}:function(_){return _&&typeof P.default=="function"&&_.constructor===P.default&&_!==P.default.prototype?"symbol":typeof _};function f(_){return _&&_.__esModule?_:{default:_}}M.default=typeof P.default=="function"&&d(m.default)==="symbol"?function(_){return typeof _=="undefined"?"undefined":d(_)}:function(_){return _&&typeof P.default=="function"&&_.constructor===P.default&&_!==P.default.prototype?"symbol":typeof _=="undefined"?"undefined":d(_)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Y,M){Y.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Y,M){"use strict";M.byteLength=c,M.toByteArray=i,M.fromByteArray=p;for(var D=[],m=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=P.length;d<f;++d)D[d]=P[d],m[P.charCodeAt(d)]=d;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;function _(h){var v=h.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=h.indexOf("=");g===-1&&(g=v);var E=g===v?0:4-g%4;return[g,E]}function c(h){var v=_(h),g=v[0],E=v[1];return(g+E)*3/4-E}function o(h,v,g){return(v+g)*3/4-g}function i(h){var v,g=_(h),E=g[0],a=g[1],l=new S(o(h,E,a)),t=0,C=a>0?E-4:E,w;for(w=0;w<C;w+=4)v=m[h.charCodeAt(w)]<<18|m[h.charCodeAt(w+1)]<<12|m[h.charCodeAt(w+2)]<<6|m[h.charCodeAt(w+3)],l[t++]=v>>16&255,l[t++]=v>>8&255,l[t++]=v&255;return a===2&&(v=m[h.charCodeAt(w)]<<2|m[h.charCodeAt(w+1)]>>4,l[t++]=v&255),a===1&&(v=m[h.charCodeAt(w)]<<10|m[h.charCodeAt(w+1)]<<4|m[h.charCodeAt(w+2)]>>2,l[t++]=v>>8&255,l[t++]=v&255),l}function n(h){return D[h>>18&63]+D[h>>12&63]+D[h>>6&63]+D[h&63]}function u(h,v,g){for(var E,a=[],l=v;l<g;l+=3)E=(h[l]<<16&16711680)+(h[l+1]<<8&65280)+(h[l+2]&255),a.push(n(E));return a.join("")}function p(h){for(var v,g=h.length,E=g%3,a=[],l=16383,t=0,C=g-E;t<C;t+=l)a.push(u(h,t,t+l>C?C:t+l));return E===1?(v=h[g-1],a.push(D[v>>2]+D[v<<4&63]+"==")):E===2&&(v=(h[g-2]<<8)+h[g-1],a.push(D[v>>10]+D[v>>4&63]+D[v<<2&63]+"=")),a.join("")}},{}],70:[function(j,Y,M){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(D,m,S){typeof Y!="undefined"&&Y.exports?Y.exports=S():typeof define=="function"&&define.amd?define(m,S):D[m]=S()}(this,"bowser",function(){var D=!0;function m(o){function i(z){var B=o.match(z);return B&&B.length>1&&B[1]||""}function n(z){var B=o.match(z);return B&&B.length>1&&B[2]||""}var u=i(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(o),h=!p&&/android/i.test(o),v=/nexus\s*[0-6]\s*/i.test(o),g=!v&&/nexus\s*[0-9]+/i.test(o),E=/CrOS/.test(o),a=/silk/i.test(o),l=/sailfish/i.test(o),t=/tizen/i.test(o),C=/(web|hpw)(o|0)s/i.test(o),w=/windows phone/i.test(o),s=/SamsungBrowser/i.test(o),L=!w&&/windows/i.test(o),O=!u&&!a&&/macintosh/i.test(o),x=!h&&!l&&!t&&!C&&/linux/i.test(o),b=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=i(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(o)&&!/tablet pc/i.test(o),k=!T&&/[^-]mobi/i.test(o),N=/xbox/i.test(o),I;/opera/i.test(o)?I={name:"Opera",opera:D,version:y||i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?I={name:"Opera",opera:D,version:i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(o)?I={name:"Samsung Internet for Android",samsungBrowser:D,version:y||i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?I={name:"NAVER Whale browser",whale:D,version:i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?I={name:"MZ Browser",mzbrowser:D,version:i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?I={name:"Opera Coast",coast:D,version:y||i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?I={name:"Focus",focus:D,version:i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?I={name:"Yandex Browser",yandexbrowser:D,version:y||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?I={name:"UC Browser",ucbrowser:D,version:i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?I={name:"Maxthon",maxthon:D,version:i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?I={name:"Epiphany",epiphany:D,version:i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?I={name:"Puffin",puffin:D,version:i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?I={name:"Sleipnir",sleipnir:D,version:i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?I={name:"K-Meleon",kMeleon:D,version:i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:w?(I={name:"Windows Phone",osname:"Windows Phone",windowsphone:D},b?(I.msedge=D,I.version=b):(I.msie=D,I.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?I={name:"Internet Explorer",msie:D,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:E?I={name:"Chrome",osname:"Chrome OS",chromeos:D,chromeBook:D,chrome:D,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?I={name:"Microsoft Edge",msedge:D,version:b}:/vivaldi/i.test(o)?I={name:"Vivaldi",vivaldi:D,version:i(/vivaldi\/(\d+(\.\d+)?)/i)||y}:l?I={name:"Sailfish",osname:"Sailfish OS",sailfish:D,version:i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?I={name:"SeaMonkey",seamonkey:D,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(I={name:"Firefox",firefox:D,version:i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(I.firefoxos=D,I.osname="Firefox OS")):a?I={name:"Amazon Silk",silk:D,version:i(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?I={name:"PhantomJS",phantom:D,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?I={name:"SlimerJS",slimer:D,version:i(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?I={name:"BlackBerry",osname:"BlackBerry OS",blackberry:D,version:y||i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:C?(I={name:"WebOS",osname:"WebOS",webos:D,version:y||i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(I.touchpad=D)):/bada/i.test(o)?I={name:"Bada",osname:"Bada",bada:D,version:i(/dolfin\/(\d+(\.\d+)?)/i)}:t?I={name:"Tizen",osname:"Tizen",tizen:D,version:i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(o)?I={name:"QupZilla",qupzilla:D,version:i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(o)?I={name:"Chromium",chromium:D,version:i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(o)?I={name:"Chrome",chrome:D,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:h?I={name:"Android",version:y}:/safari|applewebkit/i.test(o)?(I={name:"Safari",safari:D},y&&(I.version=y)):u?(I={name:u=="iphone"?"iPhone":u=="ipad"?"iPad":"iPod"},y&&(I.version=y)):/googlebot/i.test(o)?I={name:"Googlebot",googlebot:D,version:i(/googlebot\/(\d+(\.\d+))/i)||y}:I={name:i(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!I.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(I.name=I.name||"Blink",I.blink=D):(I.name=I.name||"Webkit",I.webkit=D),!I.version&&y&&(I.version=y)):!I.opera&&/gecko\//i.test(o)&&(I.name=I.name||"Gecko",I.gecko=D,I.version=I.version||i(/gecko\/(\d+(\.\d+)?)/i)),!I.windowsphone&&(h||I.silk)?(I.android=D,I.osname="Android"):!I.windowsphone&&u?(I[u]=D,I.ios=D,I.osname="iOS"):O?(I.mac=D,I.osname="macOS"):N?(I.xbox=D,I.osname="Xbox"):L?(I.windows=D,I.osname="Windows"):x&&(I.linux=D,I.osname="Linux");function W(z){switch(z){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var K="";I.windows?K=W(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)):I.windowsphone?K=i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):I.mac?(K=i(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):u?(K=i(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):h?K=i(/android[ \/-](\d+(\.\d+)*)/i):I.webos?K=i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):I.blackberry?K=i(/rim\stablet\sos\s(\d+(\.\d+)*)/i):I.bada?K=i(/bada\/(\d+(\.\d+)*)/i):I.tizen&&(K=i(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(I.osversion=K);var U=!I.windows&&K.split(".")[0];return T||g||u=="ipad"||h&&(U==3||U>=4&&!k)||I.silk?I.tablet=D:(k||u=="iphone"||u=="ipod"||h||v||I.blackberry||I.webos||I.bada)&&(I.mobile=D),I.msedge||I.msie&&I.version>=10||I.yandexbrowser&&I.version>=15||I.vivaldi&&I.version>=1||I.chrome&&I.version>=20||I.samsungBrowser&&I.version>=4||I.whale&&f([I.version,"1.0"])===1||I.mzbrowser&&f([I.version,"6.0"])===1||I.focus&&f([I.version,"1.0"])===1||I.firefox&&I.version>=20||I.safari&&I.version>=6||I.opera&&I.version>=10||I.ios&&I.osversion&&I.osversion.split(".")[0]>=6||I.blackberry&&I.version>=10.1||I.chromium&&I.version>=20?I.a=D:I.msie&&I.version<10||I.chrome&&I.version<20||I.firefox&&I.version<20||I.safari&&I.version<6||I.opera&&I.version<10||I.ios&&I.osversion&&I.osversion.split(".")[0]<6||I.chromium&&I.version<20?I.c=D:I.x=D,I}var S=m(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(o){for(var i=0;i<o.length;++i){var n=o[i];if(typeof n=="string"&&n in S)return!0}return!1};function P(o){return o.split(".").length}function d(o,i){var n=[],u;if(Array.prototype.map)return Array.prototype.map.call(o,i);for(u=0;u<o.length;u++)n.push(i(o[u]));return n}function f(o){for(var i=Math.max(P(o[0]),P(o[1])),n=d(o,function(u){var p=i-P(u);return u=u+new Array(p+1).join(".0"),d(u.split("."),function(h){return new Array(20-h.length).join("0")+h}).reverse()});--i>=0;){if(n[0][i]>n[1][i])return 1;if(n[0][i]===n[1][i]){if(i===0)return 0}else return-1}}function _(o,i,n){var u=S;typeof i=="string"&&(n=i,i=void 0),i===void 0&&(i=!1),n&&(u=m(n));var p=""+u.version;for(var h in o)if(o.hasOwnProperty(h)&&u[h]){if(typeof o[h]!="string")throw new Error("Browser version in the minVersion map should be a string: "+h+": "+String(o));return f([p,o[h]])<0}return i}function c(o,i,n){return!_(o,i,n)}return S.isUnsupportedBrowser=_,S.compareVersions=f,S.check=c,S._detect=m,S.detect=m,S})},{}],71:[function(j,Y,M){},{}],72:[function(j,Y,M){var D=j("buffer").Buffer,m=D.isEncoding||function(c){switch(c&&c.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(c){if(c&&!m(c))throw new Error("Unknown encoding: "+c)}var P=M.StringDecoder=function(c){this.encoding=(c||"utf8").toLowerCase().replace(/[-_]/,""),S(c);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=_;break;default:this.write=d;return}this.charBuffer=new D(6),this.charReceived=0,this.charLength=0};P.prototype.write=function(c){for(var o="";this.charLength;){var i=c.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";c=c.slice(i,c.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var u=o.charCodeAt(o.length-1);if(u>=55296&&u<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,c.length===0)return o;break}this.detectIncompleteChar(c);var n=c.length;this.charLength&&(c.copy(this.charBuffer,0,c.length-this.charReceived,n),n-=this.charReceived),o+=c.toString(this.encoding,0,n);var n=o.length-1,u=o.charCodeAt(n);if(u>=55296&&u<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),c.copy(this.charBuffer,0,0,p),o.substring(0,n)}return o},P.prototype.detectIncompleteChar=function(c){for(var o=c.length>=3?3:c.length;o>0;o--){var i=c[c.length-o];if(o==1&&i>>5==6){this.charLength=2;break}if(o<=2&&i>>4==14){this.charLength=3;break}if(o<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=o},P.prototype.end=function(c){var o="";if(c&&c.length&&(o=this.write(c)),this.charReceived){var i=this.charReceived,n=this.charBuffer,u=this.encoding;o+=n.slice(0,i).toString(u)}return o};function d(c){return c.toString(this.encoding)}function f(c){this.charReceived=c.length%2,this.charLength=this.charReceived?2:0}function _(c){this.charReceived=c.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,Y,M){(function(D,m){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var S=j("base64-js"),P=j("ieee754"),d=j("isarray");M.Buffer=m,M.SlowBuffer=a,M.INSPECT_MAX_BYTES=50,m.TYPED_ARRAY_SUPPORT=D.TYPED_ARRAY_SUPPORT!==void 0?D.TYPED_ARRAY_SUPPORT:f(),M.kMaxLength=_();function f(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch(J){return!1}}function _(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(te,J){if(_()<J)throw new RangeError("Invalid typed array length");return m.TYPED_ARRAY_SUPPORT?(te=new Uint8Array(J),te.__proto__=m.prototype):(te===null&&(te=new m(J)),te.length=J),te}function m(te,J,X){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m))return new m(te,J,X);if(typeof te=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return u(this,te)}return o(this,te,J,X)}m.poolSize=8192,m._augment=function(te){return te.__proto__=m.prototype,te};function o(te,J,X,$){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?v(te,J,X,$):typeof J=="string"?p(te,J,X):g(te,J)}m.from=function(te,J,X){return o(null,te,J,X)},m.TYPED_ARRAY_SUPPORT&&(m.prototype.__proto__=Uint8Array.prototype,m.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&m[Symbol.species]===m&&Object.defineProperty(m,Symbol.species,{value:null,configurable:!0}));function i(te){if(typeof te!="number")throw new TypeError('"size" argument must be a number');if(te<0)throw new RangeError('"size" argument must not be negative')}function n(te,J,X,$){return i(J),J<=0?c(te,J):X!==void 0?typeof $=="string"?c(te,J).fill(X,$):c(te,J).fill(X):c(te,J)}m.alloc=function(te,J,X){return n(null,te,J,X)};function u(te,J){if(i(J),te=c(te,J<0?0:E(J)|0),!m.TYPED_ARRAY_SUPPORT)for(var X=0;X<J;++X)te[X]=0;return te}m.allocUnsafe=function(te){return u(null,te)},m.allocUnsafeSlow=function(te){return u(null,te)};function p(te,J,X){if((typeof X!="string"||X==="")&&(X="utf8"),!m.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var $=l(J,X)|0;te=c(te,$);var ge=te.write(J,X);return ge!==$&&(te=te.slice(0,ge)),te}function h(te,J){var X=J.length<0?0:E(J.length)|0;te=c(te,X);for(var $=0;$<X;$+=1)te[$]=J[$]&255;return te}function v(te,J,X,$){if(J.byteLength,X<0||J.byteLength<X)throw new RangeError("'offset' is out of bounds");if(J.byteLength<X+($||0))throw new RangeError("'length' is out of bounds");return X===void 0&&$===void 0?J=new Uint8Array(J):$===void 0?J=new Uint8Array(J,X):J=new Uint8Array(J,X,$),m.TYPED_ARRAY_SUPPORT?(te=J,te.__proto__=m.prototype):te=h(te,J),te}function g(te,J){if(m.isBuffer(J)){var X=E(J.length)|0;return te=c(te,X),te.length===0||J.copy(te,0,0,X),te}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||be(J.length)?c(te,0):h(te,J);if(J.type==="Buffer"&&d(J.data))return h(te,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function E(te){if(te>=_())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_().toString(16)+" bytes");return te|0}function a(te){return+te!=te&&(te=0),m.alloc(+te)}m.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},m.compare=function(J,X){if(!m.isBuffer(J)||!m.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var $=J.length,ge=X.length,fe=0,_e=Math.min($,ge);fe<_e;++fe)if(J[fe]!==X[fe]){$=J[fe],ge=X[fe];break}return $<ge?-1:ge<$?1:0},m.isEncoding=function(J){switch(String(J).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}},m.concat=function(J,X){if(!d(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return m.alloc(0);var $;if(X===void 0)for(X=0,$=0;$<J.length;++$)X+=J[$].length;var ge=m.allocUnsafe(X),fe=0;for($=0;$<J.length;++$){var _e=J[$];if(!m.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(ge,fe),fe+=_e.length}return ge};function l(te,J){if(m.isBuffer(te))return te.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(te)||te instanceof ArrayBuffer))return te.byteLength;typeof te!="string"&&(te=""+te);var X=te.length;if(X===0)return 0;for(var $=!1;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return ae(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Q(te).length;default:if($)return ae(te).length;J=(""+J).toLowerCase(),$=!0}}m.byteLength=l;function t(te,J,X){var $=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,J>>>=0,X<=J)return"";for(te||(te="utf8");;)switch(te){case"hex":return z(this,J,X);case"utf8":case"utf-8":return N(this,J,X);case"ascii":return K(this,J,X);case"latin1":case"binary":return U(this,J,X);case"base64":return k(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,J,X);default:if($)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),$=!0}}m.prototype._isBuffer=!0;function C(te,J,X){var $=te[J];te[J]=te[X],te[X]=$}m.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<J;X+=2)C(this,X,X+1);return this},m.prototype.swap32=function(){var J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<J;X+=4)C(this,X,X+3),C(this,X+1,X+2);return this},m.prototype.swap64=function(){var J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<J;X+=8)C(this,X,X+7),C(this,X+1,X+6),C(this,X+2,X+5),C(this,X+3,X+4);return this},m.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?N(this,0,J):t.apply(this,arguments)},m.prototype.equals=function(J){if(!m.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:m.compare(this,J)===0},m.prototype.inspect=function(){var J="",X=M.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),"<Buffer "+J+">"},m.prototype.compare=function(J,X,$,ge,fe){if(!m.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),$===void 0&&($=J?J.length:0),ge===void 0&&(ge=0),fe===void 0&&(fe=this.length),X<0||$>J.length||ge<0||fe>this.length)throw new RangeError("out of range index");if(ge>=fe&&X>=$)return 0;if(ge>=fe)return-1;if(X>=$)return 1;if(X>>>=0,$>>>=0,ge>>>=0,fe>>>=0,this===J)return 0;for(var _e=fe-ge,He=$-X,$e=Math.min(_e,He),Ve=this.slice(ge,fe),et=J.slice(X,$),at=0;at<$e;++at)if(Ve[at]!==et[at]){_e=Ve[at],He=et[at];break}return _e<He?-1:He<_e?1:0};function w(te,J,X,$,ge){if(te.length===0)return-1;if(typeof X=="string"?($=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=ge?0:te.length-1),X<0&&(X=te.length+X),X>=te.length){if(ge)return-1;X=te.length-1}else if(X<0)if(ge)X=0;else return-1;if(typeof J=="string"&&(J=m.from(J,$)),m.isBuffer(J))return J.length===0?-1:s(te,J,X,$,ge);if(typeof J=="number")return J=J&255,m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(te,J,X):Uint8Array.prototype.lastIndexOf.call(te,J,X):s(te,[J],X,$,ge);throw new TypeError("val must be string, number or Buffer")}function s(te,J,X,$,ge){var fe=1,_e=te.length,He=J.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(te.length<2||J.length<2)return-1;fe=2,_e/=2,He/=2,X/=2}function $e(Me,Se){return fe===1?Me[Se]:Me.readUInt16BE(Se*fe)}var Ve;if(ge){var et=-1;for(Ve=X;Ve<_e;Ve++)if($e(te,Ve)===$e(J,et===-1?0:Ve-et)){if(et===-1&&(et=Ve),Ve-et+1===He)return et*fe}else et!==-1&&(Ve-=Ve-et),et=-1}else for(X+He>_e&&(X=_e-He),Ve=X;Ve>=0;Ve--){for(var at=!0,st=0;st<He;st++)if($e(te,Ve+st)!==$e(J,st)){at=!1;break}if(at)return Ve}return-1}m.prototype.includes=function(J,X,$){return this.indexOf(J,X,$)!==-1},m.prototype.indexOf=function(J,X,$){return w(this,J,X,$,!0)},m.prototype.lastIndexOf=function(J,X,$){return w(this,J,X,$,!1)};function L(te,J,X,$){X=Number(X)||0;var ge=te.length-X;$?($=Number($),$>ge&&($=ge)):$=ge;var fe=J.length;if(fe%2!==0)throw new TypeError("Invalid hex string");$>fe/2&&($=fe/2);for(var _e=0;_e<$;++_e){var He=parseInt(J.substr(_e*2,2),16);if(isNaN(He))return _e;te[X+_e]=He}return _e}function O(te,J,X,$){return q(ae(J,te.length-X),te,X,$)}function x(te,J,X,$){return q(Z(J),te,X,$)}function b(te,J,X,$){return x(te,J,X,$)}function y(te,J,X,$){return q(Q(J),te,X,$)}function T(te,J,X,$){return q(le(J,te.length-X),te,X,$)}m.prototype.write=function(J,X,$,ge){if(X===void 0)ge="utf8",$=this.length,X=0;else if($===void 0&&typeof X=="string")ge=X,$=this.length,X=0;else if(isFinite(X))X=X|0,isFinite($)?($=$|0,ge===void 0&&(ge="utf8")):(ge=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var fe=this.length-X;if(($===void 0||$>fe)&&($=fe),J.length>0&&($<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");ge||(ge="utf8");for(var _e=!1;;)switch(ge){case"hex":return L(this,J,X,$);case"utf8":case"utf-8":return O(this,J,X,$);case"ascii":return x(this,J,X,$);case"latin1":case"binary":return b(this,J,X,$);case"base64":return y(this,J,X,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,J,X,$);default:if(_e)throw new TypeError("Unknown encoding: "+ge);ge=(""+ge).toLowerCase(),_e=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(te,J,X){return J===0&&X===te.length?S.fromByteArray(te):S.fromByteArray(te.slice(J,X))}function N(te,J,X){X=Math.min(te.length,X);for(var $=[],ge=J;ge<X;){var fe=te[ge],_e=null,He=fe>239?4:fe>223?3:fe>191?2:1;if(ge+He<=X){var $e,Ve,et,at;switch(He){case 1:fe<128&&(_e=fe);break;case 2:$e=te[ge+1],($e&192)===128&&(at=(fe&31)<<6|$e&63,at>127&&(_e=at));break;case 3:$e=te[ge+1],Ve=te[ge+2],($e&192)===128&&(Ve&192)===128&&(at=(fe&15)<<12|($e&63)<<6|Ve&63,at>2047&&(at<55296||at>57343)&&(_e=at));break;case 4:$e=te[ge+1],Ve=te[ge+2],et=te[ge+3],($e&192)===128&&(Ve&192)===128&&(et&192)===128&&(at=(fe&15)<<18|($e&63)<<12|(Ve&63)<<6|et&63,at>65535&&at<1114112&&(_e=at))}}_e===null?(_e=65533,He=1):_e>65535&&(_e-=65536,$.push(_e>>>10&1023|55296),_e=56320|_e&1023),$.push(_e),ge+=He}return W($)}var I=4096;function W(te){var J=te.length;if(J<=I)return String.fromCharCode.apply(String,te);for(var X="",$=0;$<J;)X+=String.fromCharCode.apply(String,te.slice($,$+=I));return X}function K(te,J,X){var $="";X=Math.min(te.length,X);for(var ge=J;ge<X;++ge)$+=String.fromCharCode(te[ge]&127);return $}function U(te,J,X){var $="";X=Math.min(te.length,X);for(var ge=J;ge<X;++ge)$+=String.fromCharCode(te[ge]);return $}function z(te,J,X){var $=te.length;(!J||J<0)&&(J=0),(!X||X<0||X>$)&&(X=$);for(var ge="",fe=J;fe<X;++fe)ge+=ne(te[fe]);return ge}function B(te,J,X){for(var $=te.slice(J,X),ge="",fe=0;fe<$.length;fe+=2)ge+=String.fromCharCode($[fe]+$[fe+1]*256);return ge}m.prototype.slice=function(J,X){var $=this.length;J=~~J,X=X===void 0?$:~~X,J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),X<0?(X+=$,X<0&&(X=0)):X>$&&(X=$),X<J&&(X=J);var ge;if(m.TYPED_ARRAY_SUPPORT)ge=this.subarray(J,X),ge.__proto__=m.prototype;else{var fe=X-J;ge=new m(fe,void 0);for(var _e=0;_e<fe;++_e)ge[_e]=this[_e+J]}return ge};function H(te,J,X){if(te%1!==0||te<0)throw new RangeError("offset is not uint");if(te+J>X)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function(J,X,$){J=J|0,X=X|0,$||H(J,X,this.length);for(var ge=this[J],fe=1,_e=0;++_e<X&&(fe*=256);)ge+=this[J+_e]*fe;return ge},m.prototype.readUIntBE=function(J,X,$){J=J|0,X=X|0,$||H(J,X,this.length);for(var ge=this[J+--X],fe=1;X>0&&(fe*=256);)ge+=this[J+--X]*fe;return ge},m.prototype.readUInt8=function(J,X){return X||H(J,1,this.length),this[J]},m.prototype.readUInt16LE=function(J,X){return X||H(J,2,this.length),this[J]|this[J+1]<<8},m.prototype.readUInt16BE=function(J,X){return X||H(J,2,this.length),this[J]<<8|this[J+1]},m.prototype.readUInt32LE=function(J,X){return X||H(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},m.prototype.readUInt32BE=function(J,X){return X||H(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},m.prototype.readIntLE=function(J,X,$){J=J|0,X=X|0,$||H(J,X,this.length);for(var ge=this[J],fe=1,_e=0;++_e<X&&(fe*=256);)ge+=this[J+_e]*fe;return fe*=128,ge>=fe&&(ge-=Math.pow(2,8*X)),ge},m.prototype.readIntBE=function(J,X,$){J=J|0,X=X|0,$||H(J,X,this.length);for(var ge=X,fe=1,_e=this[J+--ge];ge>0&&(fe*=256);)_e+=this[J+--ge]*fe;return fe*=128,_e>=fe&&(_e-=Math.pow(2,8*X)),_e},m.prototype.readInt8=function(J,X){return X||H(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},m.prototype.readInt16LE=function(J,X){X||H(J,2,this.length);var $=this[J]|this[J+1]<<8;return $&32768?$|4294901760:$},m.prototype.readInt16BE=function(J,X){X||H(J,2,this.length);var $=this[J+1]|this[J]<<8;return $&32768?$|4294901760:$},m.prototype.readInt32LE=function(J,X){return X||H(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},m.prototype.readInt32BE=function(J,X){return X||H(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},m.prototype.readFloatLE=function(J,X){return X||H(J,4,this.length),P.read(this,J,!0,23,4)},m.prototype.readFloatBE=function(J,X){return X||H(J,4,this.length),P.read(this,J,!1,23,4)},m.prototype.readDoubleLE=function(J,X){return X||H(J,8,this.length),P.read(this,J,!0,52,8)},m.prototype.readDoubleBE=function(J,X){return X||H(J,8,this.length),P.read(this,J,!1,52,8)};function G(te,J,X,$,ge,fe){if(!m.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>ge||J<fe)throw new RangeError('"value" argument is out of bounds');if(X+$>te.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function(J,X,$,ge){if(J=+J,X=X|0,$=$|0,!ge){var fe=Math.pow(2,8*$)-1;G(this,J,X,$,fe,0)}var _e=1,He=0;for(this[X]=J&255;++He<$&&(_e*=256);)this[X+He]=J/_e&255;return X+$},m.prototype.writeUIntBE=function(J,X,$,ge){if(J=+J,X=X|0,$=$|0,!ge){var fe=Math.pow(2,8*$)-1;G(this,J,X,$,fe,0)}var _e=$-1,He=1;for(this[X+_e]=J&255;--_e>=0&&(He*=256);)this[X+_e]=J/He&255;return X+$},m.prototype.writeUInt8=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,1,255,0),m.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function ee(te,J,X,$){J<0&&(J=65535+J+1);for(var ge=0,fe=Math.min(te.length-X,2);ge<fe;++ge)te[X+ge]=(J&255<<8*($?ge:1-ge))>>>($?ge:1-ge)*8}m.prototype.writeUInt16LE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ee(this,J,X,!0),X+2},m.prototype.writeUInt16BE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ee(this,J,X,!1),X+2};function ie(te,J,X,$){J<0&&(J=4294967295+J+1);for(var ge=0,fe=Math.min(te.length-X,4);ge<fe;++ge)te[X+ge]=J>>>($?ge:3-ge)*8&255}m.prototype.writeUInt32LE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):ie(this,J,X,!0),X+4},m.prototype.writeUInt32BE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ie(this,J,X,!1),X+4},m.prototype.writeIntLE=function(J,X,$,ge){if(J=+J,X=X|0,!ge){var fe=Math.pow(2,8*$-1);G(this,J,X,$,fe-1,-fe)}var _e=0,He=1,$e=0;for(this[X]=J&255;++_e<$&&(He*=256);)J<0&&$e===0&&this[X+_e-1]!==0&&($e=1),this[X+_e]=(J/He>>0)-$e&255;return X+$},m.prototype.writeIntBE=function(J,X,$,ge){if(J=+J,X=X|0,!ge){var fe=Math.pow(2,8*$-1);G(this,J,X,$,fe-1,-fe)}var _e=$-1,He=1,$e=0;for(this[X+_e]=J&255;--_e>=0&&(He*=256);)J<0&&$e===0&&this[X+_e+1]!==0&&($e=1),this[X+_e]=(J/He>>0)-$e&255;return X+$},m.prototype.writeInt8=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,1,127,-128),m.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},m.prototype.writeInt16LE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ee(this,J,X,!0),X+2},m.prototype.writeInt16BE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ee(this,J,X,!1),X+2},m.prototype.writeInt32LE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,4,2147483647,-2147483648),m.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):ie(this,J,X,!0),X+4},m.prototype.writeInt32BE=function(J,X,$){return J=+J,X=X|0,$||G(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),m.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ie(this,J,X,!1),X+4};function ue(te,J,X,$,ge,fe){if(X+$>te.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function xe(te,J,X,$,ge){return ge||ue(te,J,X,4,34028234663852886e22,-34028234663852886e22),P.write(te,J,X,$,23,4),X+4}m.prototype.writeFloatLE=function(J,X,$){return xe(this,J,X,!0,$)},m.prototype.writeFloatBE=function(J,X,$){return xe(this,J,X,!1,$)};function Te(te,J,X,$,ge){return ge||ue(te,J,X,8,17976931348623157e292,-17976931348623157e292),P.write(te,J,X,$,52,8),X+8}m.prototype.writeDoubleLE=function(J,X,$){return Te(this,J,X,!0,$)},m.prototype.writeDoubleBE=function(J,X,$){return Te(this,J,X,!1,$)},m.prototype.copy=function(J,X,$,ge){if($||($=0),!ge&&ge!==0&&(ge=this.length),X>=J.length&&(X=J.length),X||(X=0),ge>0&&ge<$&&(ge=$),ge===$)return 0;if(J.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(ge<0)throw new RangeError("sourceEnd out of bounds");ge>this.length&&(ge=this.length),J.length-X<ge-$&&(ge=J.length-X+$);var fe=ge-$,_e;if(this===J&&$<X&&X<ge)for(_e=fe-1;_e>=0;--_e)J[_e+X]=this[_e+$];else if(fe<1e3||!m.TYPED_ARRAY_SUPPORT)for(_e=0;_e<fe;++_e)J[_e+X]=this[_e+$];else Uint8Array.prototype.set.call(J,this.subarray($,$+fe),X);return fe},m.prototype.fill=function(J,X,$,ge){if(typeof J=="string"){if(typeof X=="string"?(ge=X,X=0,$=this.length):typeof $=="string"&&(ge=$,$=this.length),J.length===1){var fe=J.charCodeAt(0);fe<256&&(J=fe)}if(ge!==void 0&&typeof ge!="string")throw new TypeError("encoding must be a string");if(typeof ge=="string"&&!m.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge)}else typeof J=="number"&&(J=J&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,J||(J=0);var _e;if(typeof J=="number")for(_e=X;_e<$;++_e)this[_e]=J;else{var He=m.isBuffer(J)?J:ae(new m(J,ge).toString()),$e=He.length;for(_e=0;_e<$-X;++_e)this[_e+X]=He[_e%$e]}return this};var se=/[^+\/0-9A-Za-z-_]/g;function ve(te){if(te=de(te).replace(se,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function de(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function ne(te){return te<16?"0"+te.toString(16):te.toString(16)}function ae(te,J){J=J||Infinity;for(var X,$=te.length,ge=null,fe=[],_e=0;_e<$;++_e){if(X=te.charCodeAt(_e),X>55295&&X<57344){if(!ge){if(X>56319){(J-=3)>-1&&fe.push(239,191,189);continue}else if(_e+1===$){(J-=3)>-1&&fe.push(239,191,189);continue}ge=X;continue}if(X<56320){(J-=3)>-1&&fe.push(239,191,189),ge=X;continue}X=(ge-55296<<10|X-56320)+65536}else ge&&((J-=3)>-1&&fe.push(239,191,189));if(ge=null,X<128){if((J-=1)<0)break;fe.push(X)}else if(X<2048){if((J-=2)<0)break;fe.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;fe.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;fe.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return fe}function Z(te){for(var J=[],X=0;X<te.length;++X)J.push(te.charCodeAt(X)&255);return J}function le(te,J){for(var X,$,ge,fe=[],_e=0;_e<te.length&&!((J-=2)<0);++_e)X=te.charCodeAt(_e),$=X>>8,ge=X%256,fe.push(ge),fe.push($);return fe}function Q(te){return S.toByteArray(ve(te))}function q(te,J,X,$){for(var ge=0;ge<$&&!(ge+X>=J.length||ge>=te.length);++ge)J[ge+X]=te[ge];return ge}function be(te){return te!==te}}).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,Y,M){Y.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,Y,M){Y.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,Y,M){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var D=Array.prototype.slice;Y.exports=m;function m(P,d){if(!(this instanceof m))return new m(P,d);this.src=P,this._withAccess=d}m.prototype.withAccess=function(P){return this._withAccess=P!==!1,this},m.prototype.pick=function(P){return Array.isArray(P)||(P=D.call(arguments)),P.length&&(this.keys=P),this},m.prototype.to=function(P){if(P=P||{},!this.src)return P;var d=this.keys||Object.keys(this.src);if(!this._withAccess){for(var f=0;f<d.length;f++){if(_=d[f],P[_]!==void 0)continue;P[_]=this.src[_]}return P}for(var f=0;f<d.length;f++){var _=d[f];if(!S(P,_))continue;var c=this.src.__lookupGetter__(_),o=this.src.__lookupSetter__(_);c&&P.__defineGetter__(_,c),o&&P.__defineSetter__(_,o),!c&&!o&&(P[_]=this.src[_])}return P},m.prototype.toCover=function(P){for(var d=this.keys||Object.keys(this.src),f=0;f<d.length;f++){var _=d[f];delete P[_];var c=this.src.__lookupGetter__(_),o=this.src.__lookupSetter__(_);c&&P.__defineGetter__(_,c),o&&P.__defineSetter__(_,o),!c&&!o&&(P[_]=this.src[_])}},m.prototype.override=m.prototype.toCover,m.prototype.and=function(P){var d={};return this.to(d),this.src=P,this.to(d),this.src=d,this};function S(P,d){return P[d]===void 0&&P.__lookupGetter__(d)===void 0&&P.__lookupSetter__(d)===void 0}},{}],77:[function(j,Y,M){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),Y.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,Y,M){var D=j("../../modules/_core"),m=D.JSON||(D.JSON={stringify:JSON.stringify});Y.exports=function(P){return m.stringify.apply(m,arguments)}},{"../../modules/_core":99}],79:[function(j,Y,M){j("../../modules/es6.object.assign"),Y.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,Y,M){j("../../modules/es6.object.create");var D=j("../../modules/_core").Object;Y.exports=function(S,P){return D.create(S,P)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,Y,M){j("../../modules/es6.object.define-property");var D=j("../../modules/_core").Object;Y.exports=function(S,P,d){return D.defineProperty(S,P,d)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,Y,M){j("../../modules/es7.object.entries"),Y.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,Y,M){j("../../modules/es6.object.get-own-property-names");var D=j("../../modules/_core").Object;Y.exports=function(S){return D.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,Y,M){j("../../modules/es6.object.get-prototype-of"),Y.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,Y,M){j("../../modules/es6.object.keys"),Y.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,Y,M){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"),Y.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,Y,M){j("../modules/web.immediate"),Y.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,Y,M){j("../../modules/es6.string.from-code-point"),Y.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,Y,M){j("../../modules/es6.function.has-instance"),Y.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,Y,M){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),Y.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,Y,M){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),Y.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,Y,M){Y.exports=function(D){if(typeof D!="function")throw TypeError(D+" is not a function!");return D}},{}],93:[function(j,Y,M){Y.exports=function(){}},{}],94:[function(j,Y,M){Y.exports=function(D,m,S,P){if(!(D instanceof m)||P!==void 0&&P in D)throw TypeError(S+": incorrect invocation!");return D}},{}],95:[function(j,Y,M){var D=j("./_is-object");Y.exports=function(m){if(!D(m))throw TypeError(m+" is not an object!");return m}},{"./_is-object":119}],96:[function(j,Y,M){var D=j("./_to-iobject"),m=j("./_to-length"),S=j("./_to-absolute-index");Y.exports=function(P){return function(d,f,_){var c=D(d),o=m(c.length),i=S(_,o),n;if(P&&f!=f){for(;o>i;)if(n=c[i++],n!=n)return!0}else for(;o>i;i++)if((P||i in c)&&c[i]===f)return P||i||0;return!P&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Y,M){var D=j("./_cof"),m=j("./_wks")("toStringTag"),S=D(function(){return arguments}())=="Arguments",P=function(d,f){try{return d[f]}catch(_){}};Y.exports=function(d){var f,_,c;return d===void 0?"Undefined":d===null?"Null":typeof(_=P(f=Object(d),m))=="string"?_:S?D(f):(c=D(f))=="Object"&&typeof f.callee=="function"?"Arguments":c}},{"./_cof":98,"./_wks":166}],98:[function(j,Y,M){var D={}.toString;Y.exports=function(m){return D.call(m).slice(8,-1)}},{}],99:[function(j,Y,M){var D=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=D)},{}],100:[function(j,Y,M){"use strict";var D=j("./_object-dp"),m=j("./_property-desc");Y.exports=function(S,P,d){P in S?D.f(S,P,m(0,d)):S[P]=d}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Y,M){var D=j("./_a-function");Y.exports=function(m,S,P){if(D(m),S===void 0)return m;switch(P){case 1:return function(d){return m.call(S,d)};case 2:return function(d,f){return m.call(S,d,f)};case 3:return function(d,f,_){return m.call(S,d,f,_)}}return function(){return m.apply(S,arguments)}}},{"./_a-function":92}],102:[function(j,Y,M){Y.exports=function(D){if(D==null)throw TypeError("Can't call method on "+D);return D}},{}],103:[function(j,Y,M){Y.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Y,M){var D=j("./_is-object"),m=j("./_global").document,S=D(m)&&D(m.createElement);Y.exports=function(P){return S?m.createElement(P):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Y,M){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Y,M){var D=j("./_object-keys"),m=j("./_object-gops"),S=j("./_object-pie");Y.exports=function(P){var d=D(P),f=m.f;if(f)for(var _=f(P),c=S.f,o=0,i;_.length>o;)c.call(P,i=_[o++])&&d.push(i);return d}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Y,M){var D=j("./_global"),m=j("./_core"),S=j("./_ctx"),P=j("./_hide"),d=j("./_has"),f="prototype",_=function(c,o,i){var n=c&_.F,u=c&_.G,p=c&_.S,h=c&_.P,v=c&_.B,g=c&_.W,E=u?m:m[o]||(m[o]={}),a=E[f],l=u?D:p?D[o]:(D[o]||{})[f],t,C,w;u&&(i=o);for(t in i){if(C=!n&&l&&l[t]!==void 0,C&&d(E,t))continue;w=C?l[t]:i[t],E[t]=u&&typeof l[t]!="function"?i[t]:v&&C?S(w,D):g&&l[t]==w?function(s){var L=function(O,x,b){if(this instanceof s){switch(arguments.length){case 0:return new s;case 1:return new s(O);case 2:return new s(O,x)}return new s(O,x,b)}return s.apply(this,arguments)};return L[f]=s[f],L}(w):h&&typeof w=="function"?S(Function.call,w):w,h&&((E.virtual||(E.virtual={}))[t]=w,c&_.R&&a&&!a[t]&&P(a,t,w))}};_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128,Y.exports=_},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Y,M){Y.exports=function(D){try{return!!D()}catch(m){return!0}}},{}],109:[function(j,Y,M){var D=j("./_ctx"),m=j("./_iter-call"),S=j("./_is-array-iter"),P=j("./_an-object"),d=j("./_to-length"),f=j("./core.get-iterator-method"),_={},c={},M=Y.exports=function(o,i,n,u,p){var h=p?function(){return o}:f(o),v=D(n,u,i?2:1),g=0,E,a,l,t;if(typeof h!="function")throw TypeError(o+" is not iterable!");if(S(h)){for(E=d(o.length);E>g;g++)if(t=i?v(P(a=o[g])[0],a[1]):v(o[g]),t===_||t===c)return t}else for(l=h.call(o);!(a=l.next()).done;)if(t=m(l,v,a.value,i),t===_||t===c)return t};M.BREAK=_,M.RETURN=c},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Y,M){var D=Y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)},{}],111:[function(j,Y,M){var D={}.hasOwnProperty;Y.exports=function(m,S){return D.call(m,S)}},{}],112:[function(j,Y,M){var D=j("./_object-dp"),m=j("./_property-desc");Y.exports=j("./_descriptors")?function(S,P,d){return D.f(S,P,m(1,d))}:function(S,P,d){return S[P]=d,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Y,M){var D=j("./_global").document;Y.exports=D&&D.documentElement},{"./_global":110}],114:[function(j,Y,M){Y.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,Y,M){Y.exports=function(D,m,S){var P=S===void 0;switch(m.length){case 0:return P?D():D.call(S);case 1:return P?D(m[0]):D.call(S,m[0]);case 2:return P?D(m[0],m[1]):D.call(S,m[0],m[1]);case 3:return P?D(m[0],m[1],m[2]):D.call(S,m[0],m[1],m[2]);case 4:return P?D(m[0],m[1],m[2],m[3]):D.call(S,m[0],m[1],m[2],m[3])}return D.apply(S,m)}},{}],116:[function(j,Y,M){var D=j("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(m){return D(m)=="String"?m.split(""):Object(m)}},{"./_cof":98}],117:[function(j,Y,M){var D=j("./_iterators"),m=j("./_wks")("iterator"),S=Array.prototype;Y.exports=function(P){return P!==void 0&&(D.Array===P||S[m]===P)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Y,M){var D=j("./_cof");Y.exports=Array.isArray||function(S){return D(S)=="Array"}},{"./_cof":98}],119:[function(j,Y,M){Y.exports=function(D){return typeof D=="object"?D!==null:typeof D=="function"}},{}],120:[function(j,Y,M){var D=j("./_an-object");Y.exports=function(m,S,P,d){try{return d?S(D(P)[0],P[1]):S(P)}catch(_){var f=m.return;throw f!==void 0&&D(f.call(m)),_}}},{"./_an-object":95}],121:[function(j,Y,M){"use strict";var D=j("./_object-create"),m=j("./_property-desc"),S=j("./_set-to-string-tag"),P={};j("./_hide")(P,j("./_wks")("iterator"),function(){return this}),Y.exports=function(d,f,_){d.prototype=D(P,{next:m(1,_)}),S(d,f+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Y,M){"use strict";var D=j("./_library"),m=j("./_export"),S=j("./_redefine"),P=j("./_hide"),d=j("./_iterators"),f=j("./_iter-create"),_=j("./_set-to-string-tag"),c=j("./_object-gpo"),o=j("./_wks")("iterator"),i=!([].keys&&"next"in[].keys()),n="@@iterator",u="keys",p="values",h=function(){return this};Y.exports=function(v,g,E,a,l,t,C){f(E,g,a);var w=function(K){if(!i&&K in x)return x[K];switch(K){case u:return function(){return new E(this,K)};case p:return function(){return new E(this,K)}}return function(){return new E(this,K)}},s=g+" Iterator",L=l==p,O=!1,x=v.prototype,b=x[o]||x[n]||l&&x[l],y=b||w(l),T=l?L?w("entries"):y:void 0,k=g=="Array"&&x.entries||b,N,I,W;if(k&&(W=c(k.call(new v)),W!==Object.prototype&&W.next&&(_(W,s,!0),!D&&typeof W[o]!="function"&&P(W,o,h))),L&&b&&b.name!==p&&(O=!0,y=function(){return b.call(this)}),(!D||C)&&(i||O||!x[o])&&P(x,o,y),d[g]=y,d[s]=h,l)if(N={values:L?y:w(p),keys:t?y:w(u),entries:T},C)for(I in N)I in x||S(x,I,N[I]);else m(m.P+m.F*(i||O),g,N);return N}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(j,Y,M){var D=j("./_wks")("iterator"),m=!1;try{var S=[7][D]();S.return=function(){m=!0},Array.from(S,function(){throw 2})}catch(P){}Y.exports=function(P,d){if(!d&&!m)return!1;var f=!1;try{var _=[7],c=_[D]();c.next=function(){return{done:f=!0}},_[D]=function(){return c},P(_)}catch(o){}return f}},{"./_wks":166}],124:[function(j,Y,M){Y.exports=function(D,m){return{value:m,done:!!D}}},{}],125:[function(j,Y,M){Y.exports={}},{}],126:[function(j,Y,M){Y.exports=!0},{}],127:[function(j,Y,M){var D=j("./_uid")("meta"),m=j("./_is-object"),S=j("./_has"),P=j("./_object-dp").f,d=0,f=Object.isExtensible||function(){return!0},_=!j("./_fails")(function(){return f(Object.preventExtensions({}))}),c=function(p){P(p,D,{value:{i:"O"+ ++d,w:{}}})},o=function(p,h){if(!m(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!S(p,D)){if(!f(p))return"F";if(!h)return"E";c(p)}return p[D].i},i=function(p,h){if(!S(p,D)){if(!f(p))return!0;if(!h)return!1;c(p)}return p[D].w},n=function(p){return _&&u.NEED&&f(p)&&!S(p,D)&&c(p),p},u=Y.exports={KEY:D,NEED:!1,fastKey:o,getWeak:i,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Y,M){var D=j("./_global"),m=j("./_task").set,S=D.MutationObserver||D.WebKitMutationObserver,P=D.process,d=D.Promise,f=j("./_cof")(P)=="process";Y.exports=function(){var _,c,o,i=function(){var h,v;for(f&&(h=P.domain)&&h.exit();_;){v=_.fn,_=_.next;try{v()}catch(g){throw _?o():c=void 0,g}}c=void 0,h&&h.enter()};if(f)o=function(){P.nextTick(i)};else if(S&&!(D.navigator&&D.navigator.standalone)){var n=!0,u=document.createTextNode("");new S(i).observe(u,{characterData:!0}),o=function(){u.data=n=!n}}else if(d&&d.resolve){var p=d.resolve(void 0);o=function(){p.then(i)}}else o=function(){m.call(D,i)};return function(h){var v={fn:h,next:void 0};c&&(c.next=v),_||(_=v,o()),c=v}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Y,M){"use strict";var D=j("./_a-function");function m(S){var P,d;this.promise=new S(function(f,_){if(P!==void 0||d!==void 0)throw TypeError("Bad Promise constructor");P=f,d=_}),this.resolve=D(P),this.reject=D(d)}Y.exports.f=function(S){return new m(S)}},{"./_a-function":92}],130:[function(j,Y,M){"use strict";var D=j("./_descriptors"),m=j("./_object-keys"),S=j("./_object-gops"),P=j("./_object-pie"),d=j("./_to-object"),f=j("./_iobject"),_=Object.assign;Y.exports=!_||j("./_fails")(function(){var c={},o={},i=Symbol(),n="abcdefghijklmnopqrst";return c[i]=7,n.split("").forEach(function(u){o[u]=u}),_({},c)[i]!=7||Object.keys(_({},o)).join("")!=n})?function(o,i){for(var n=d(o),u=arguments.length,p=1,h=S.f,v=P.f;u>p;)for(var g=f(arguments[p++]),E=h?m(g).concat(h(g)):m(g),a=E.length,l=0,t;a>l;)t=E[l++],(!D||v.call(g,t))&&(n[t]=g[t]);return n}:_},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Y,M){var D=j("./_an-object"),m=j("./_object-dps"),S=j("./_enum-bug-keys"),P=j("./_shared-key")("IE_PROTO"),d=function(){},f="prototype",_=function(){var c=j("./_dom-create")("iframe"),o=S.length,i="<",n=">",u;for(c.style.display="none",j("./_html").appendChild(c),c.src="javascript:",u=c.contentWindow.document,u.open(),u.write(i+"script"+n+"document.F=Object"+i+"/script"+n),u.close(),_=u.F;o--;)delete _[f][S[o]];return _()};Y.exports=Object.create||function(o,i){var n;return o!==null?(d[f]=D(o),n=new d,d[f]=null,n[P]=o):n=_(),i===void 0?n:m(n,i)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Y,M){var D=j("./_an-object"),m=j("./_ie8-dom-define"),S=j("./_to-primitive"),P=Object.defineProperty;M.f=j("./_descriptors")?Object.defineProperty:function(f,_,c){if(D(f),_=S(_,!0),D(c),m)try{return P(f,_,c)}catch(o){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(f[_]=c.value),f}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Y,M){var D=j("./_object-dp"),m=j("./_an-object"),S=j("./_object-keys");Y.exports=j("./_descriptors")?Object.defineProperties:function(d,f){m(d);for(var _=S(f),c=_.length,o=0,i;c>o;)D.f(d,i=_[o++],f[i]);return d}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Y,M){var D=j("./_object-pie"),m=j("./_property-desc"),S=j("./_to-iobject"),P=j("./_to-primitive"),d=j("./_has"),f=j("./_ie8-dom-define"),_=Object.getOwnPropertyDescriptor;M.f=j("./_descriptors")?_:function(o,i){if(o=S(o),i=P(i,!0),f)try{return _(o,i)}catch(n){}if(d(o,i))return m(!D.f.call(o,i),o[i])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Y,M){var D=j("./_to-iobject"),m=j("./_object-gopn").f,S={}.toString,P=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return m(f)}catch(_){return P.slice()}};Y.exports.f=function(_){return P&&S.call(_)=="[object Window]"?d(_):m(D(_))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Y,M){var D=j("./_object-keys-internal"),m=j("./_enum-bug-keys").concat("length","prototype");M.f=Object.getOwnPropertyNames||function(P){return D(P,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Y,M){M.f=Object.getOwnPropertySymbols},{}],138:[function(j,Y,M){var D=j("./_has"),m=j("./_to-object"),S=j("./_shared-key")("IE_PROTO"),P=Object.prototype;Y.exports=Object.getPrototypeOf||function(d){return d=m(d),D(d,S)?d[S]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?P:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Y,M){var D=j("./_has"),m=j("./_to-iobject"),S=j("./_array-includes")(!1),P=j("./_shared-key")("IE_PROTO");Y.exports=function(d,f){var _=m(d),c=0,o=[],i;for(i in _)i!=P&&(D(_,i)&&o.push(i));for(;f.length>c;)D(_,i=f[c++])&&(~S(o,i)||o.push(i));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Y,M){var D=j("./_object-keys-internal"),m=j("./_enum-bug-keys");Y.exports=Object.keys||function(P){return D(P,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Y,M){M.f={}.propertyIsEnumerable},{}],142:[function(j,Y,M){var D=j("./_export"),m=j("./_core"),S=j("./_fails");Y.exports=function(P,d){var f=(m.Object||{})[P]||Object[P],_={};_[P]=d(f),D(D.S+D.F*S(function(){f(1)}),"Object",_)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Y,M){var D=j("./_descriptors"),m=j("./_object-keys"),S=j("./_to-iobject"),P=j("./_object-pie").f;Y.exports=function(d){return function(f){for(var _=S(f),c=m(_),o=c.length,i=0,n=[],u;o>i;)u=c[i++],(!D||P.call(_,u))&&n.push(d?[u,_[u]]:_[u]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Y,M){Y.exports=function(D){try{return{e:!1,v:D()}}catch(m){return{e:!0,v:m}}}},{}],145:[function(j,Y,M){var D=j("./_an-object"),m=j("./_is-object"),S=j("./_new-promise-capability");Y.exports=function(P,d){if(D(P),m(d)&&d.constructor===P)return d;var f=S.f(P),_=f.resolve;return _(d),f.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Y,M){Y.exports=function(D,m){return{enumerable:!(D&1),configurable:!(D&2),writable:!(D&4),value:m}}},{}],147:[function(j,Y,M){var D=j("./_hide");Y.exports=function(m,S,P){for(var d in S)P&&m[d]?m[d]=S[d]:D(m,d,S[d]);return m}},{"./_hide":112}],148:[function(j,Y,M){Y.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Y,M){"use strict";var D=j("./_global"),m=j("./_core"),S=j("./_object-dp"),P=j("./_descriptors"),d=j("./_wks")("species");Y.exports=function(f){var _=typeof m[f]=="function"?m[f]:D[f];P&&_&&!_[d]&&S.f(_,d,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Y,M){var D=j("./_object-dp").f,m=j("./_has"),S=j("./_wks")("toStringTag");Y.exports=function(P,d,f){P&&!m(P=f?P:P.prototype,S)&&D(P,S,{configurable:!0,value:d})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Y,M){var D=j("./_shared")("keys"),m=j("./_uid");Y.exports=function(S){return D[S]||(D[S]=m(S))}},{"./_shared":152,"./_uid":162}],152:[function(j,Y,M){var D=j("./_core"),m=j("./_global"),S="__core-js_shared__",P=m[S]||(m[S]={});(Y.exports=function(d,f){return P[d]||(P[d]=f!==void 0?f:{})})("versions",[]).push({version:D.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Y,M){var D=j("./_an-object"),m=j("./_a-function"),S=j("./_wks")("species");Y.exports=function(P,d){var f=D(P).constructor,_;return f===void 0||(_=D(f)[S])==null?d:m(_)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Y,M){var D=j("./_to-integer"),m=j("./_defined");Y.exports=function(S){return function(P,d){var f=String(m(P)),_=D(d),c=f.length,o,i;return _<0||_>=c?S?"":void 0:(o=f.charCodeAt(_),o<55296||o>56319||_+1===c||(i=f.charCodeAt(_+1))<56320||i>57343?S?f.charAt(_):o:S?f.slice(_,_+2):(o-55296<<10)+(i-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Y,M){var D=j("./_ctx"),m=j("./_invoke"),S=j("./_html"),P=j("./_dom-create"),d=j("./_global"),f=d.process,_=d.setImmediate,c=d.clearImmediate,o=d.MessageChannel,i=d.Dispatch,n=0,u={},p="onreadystatechange",h,v,g,E=function(){var l=+this;if(u.hasOwnProperty(l)){var t=u[l];delete u[l],t()}},a=function(l){E.call(l.data)};(!_||!c)&&(_=function(t){for(var C=[],w=1;arguments.length>w;)C.push(arguments[w++]);return u[++n]=function(){m(typeof t=="function"?t:Function(t),C)},h(n),n},c=function(t){delete u[t]},j("./_cof")(f)=="process"?h=function(l){f.nextTick(D(E,l,1))}:i&&i.now?h=function(l){i.now(D(E,l,1))}:o?(v=new o,g=v.port2,v.port1.onmessage=a,h=D(g.postMessage,g,1)):d.addEventListener&&typeof postMessage=="function"&&!d.importScripts?(h=function(l){d.postMessage(l+"","*")},d.addEventListener("message",a,!1)):p in P("script")?h=function(l){S.appendChild(P("script"))[p]=function(){S.removeChild(this),E.call(l)}}:h=function(l){setTimeout(D(E,l,1),0)}),Y.exports={set:_,clear:c}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Y,M){var D=j("./_to-integer"),m=Math.max,S=Math.min;Y.exports=function(P,d){return P=D(P),P<0?m(P+d,0):S(P,d)}},{"./_to-integer":157}],157:[function(j,Y,M){var D=Math.ceil,m=Math.floor;Y.exports=function(S){return isNaN(S=+S)?0:(S>0?m:D)(S)}},{}],158:[function(j,Y,M){var D=j("./_iobject"),m=j("./_defined");Y.exports=function(S){return D(m(S))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Y,M){var D=j("./_to-integer"),m=Math.min;Y.exports=function(S){return S>0?m(D(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Y,M){var D=j("./_defined");Y.exports=function(m){return Object(D(m))}},{"./_defined":102}],161:[function(j,Y,M){var D=j("./_is-object");Y.exports=function(m,S){if(!D(m))return m;var P,d;if(S&&typeof(P=m.toString)=="function"&&!D(d=P.call(m)))return d;if(typeof(P=m.valueOf)=="function"&&!D(d=P.call(m)))return d;if(!S&&typeof(P=m.toString)=="function"&&!D(d=P.call(m)))return d;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Y,M){var D=0,m=Math.random();Y.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++D+m).toString(36))}},{}],163:[function(j,Y,M){var D=j("./_global"),m=D.navigator;Y.exports=m&&m.userAgent||""},{"./_global":110}],164:[function(j,Y,M){var D=j("./_global"),m=j("./_core"),S=j("./_library"),P=j("./_wks-ext"),d=j("./_object-dp").f;Y.exports=function(f){var _=m.Symbol||(m.Symbol=S?{}:D.Symbol||{});f.charAt(0)!="_"&&!(f in _)&&d(_,f,{value:P.f(f)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Y,M){M.f=j("./_wks")},{"./_wks":166}],166:[function(j,Y,M){var D=j("./_shared")("wks"),m=j("./_uid"),S=j("./_global").Symbol,P=typeof S=="function",d=Y.exports=function(f){return D[f]||(D[f]=P&&S[f]||(P?S:m)("Symbol."+f))};d.store=D},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Y,M){var D=j("./_classof"),m=j("./_wks")("iterator"),S=j("./_iterators");Y.exports=j("./_core").getIteratorMethod=function(P){if(P!=null)return P[m]||P["@@iterator"]||S[D(P)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Y,M){"use strict";var D=j("./_ctx"),m=j("./_export"),S=j("./_to-object"),P=j("./_iter-call"),d=j("./_is-array-iter"),f=j("./_to-length"),_=j("./_create-property"),c=j("./core.get-iterator-method");m(m.S+m.F*!j("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(i){var n=S(i),u=typeof this=="function"?this:Array,p=arguments.length,h=p>1?arguments[1]:void 0,v=h!==void 0,g=0,E=c(n),a,l,t,C;if(v&&(h=D(h,p>2?arguments[2]:void 0,2)),E!=null&&!(u==Array&&d(E)))for(C=E.call(n),l=new u;!(t=C.next()).done;g++)_(l,g,v?P(C,h,[t.value,g],!0):t.value);else for(a=f(n.length),l=new u(a);a>g;g++)_(l,g,v?h(n[g],g):n[g]);return l.length=g,l}})},{"./_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,Y,M){"use strict";var D=j("./_add-to-unscopables"),m=j("./_iter-step"),S=j("./_iterators"),P=j("./_to-iobject");Y.exports=j("./_iter-define")(Array,"Array",function(d,f){this._t=P(d),this._i=0,this._k=f},function(){var d=this._t,f=this._k,_=this._i++;return!d||_>=d.length?(this._t=void 0,m(1)):f=="keys"?m(0,_):f=="values"?m(0,d[_]):m(0,[_,d[_]])},"values"),S.Arguments=S.Array,D("keys"),D("values"),D("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Y,M){"use strict";var D=j("./_is-object"),m=j("./_object-gpo"),S=j("./_wks")("hasInstance"),P=Function.prototype;S in P||j("./_object-dp").f(P,S,{value:function(d){if(typeof this!="function"||!D(d))return!1;if(!D(this.prototype))return d instanceof this;for(;d=m(d);)if(this.prototype===d)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Y,M){var D=j("./_export");D(D.S+D.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Y,M){var D=j("./_export");D(D.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Y,M){var D=j("./_export");D(D.S+D.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Y,M){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Y,M){var D=j("./_to-object"),m=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(P){return m(D(P))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Y,M){var D=j("./_to-object"),m=j("./_object-keys");j("./_object-sap")("keys",function(){return function(P){return m(D(P))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Y,M){arguments[4][71][0].apply(M,arguments)},{dup:71}],178:[function(j,Y,M){"use strict";var D=j("./_library"),m=j("./_global"),S=j("./_ctx"),P=j("./_classof"),d=j("./_export"),f=j("./_is-object"),_=j("./_a-function"),c=j("./_an-instance"),o=j("./_for-of"),i=j("./_species-constructor"),n=j("./_task").set,u=j("./_microtask")(),p=j("./_new-promise-capability"),h=j("./_perform"),v=j("./_user-agent"),g=j("./_promise-resolve"),E="Promise",a=m.TypeError,l=m.process,t=l&&l.versions,C=t&&t.v8||"",w=m[E],s=P(l)=="process",L=function(){},O,x,b,y,T=x=p.f,k=!!function(){try{var H=w.resolve(1),G=(H.constructor={})[j("./_wks")("species")]=function(ee){ee(L,L)};return(s||typeof PromiseRejectionEvent=="function")&&H.then(L)instanceof G&&C.indexOf("6.6")!==0&&v.indexOf("Chrome/66")===-1}catch(ee){}}(),N=function(H){var G;return f(H)&&typeof(G=H.then)=="function"?G:!1},I=function(H,G){if(H._n)return;H._n=!0;var ee=H._c;u(function(){for(var ie=H._v,ue=H._s==1,xe=0,Te=function(se){var ve=ue?se.ok:se.fail,de=se.resolve,ne=se.reject,ae=se.domain,Z,le,Q;try{ve?(ue||(H._h==2&&U(H),H._h=1),ve===!0?Z=ie:(ae&&ae.enter(),Z=ve(ie),ae&&(ae.exit(),Q=!0)),Z===se.promise?ne(a("Promise-chain cycle")):(le=N(Z))?le.call(Z,de,ne):de(Z)):ne(ie)}catch(q){ae&&!Q&&ae.exit(),ne(q)}};ee.length>xe;)Te(ee[xe++]);H._c=[],H._n=!1,G&&!H._h&&W(H)})},W=function(H){n.call(m,function(){var G=H._v,ee=K(H),ie,ue,xe;if(ee&&(ie=h(function(){s?l.emit("unhandledRejection",G,H):(ue=m.onunhandledrejection)?ue({promise:H,reason:G}):(xe=m.console)&&xe.error&&xe.error("Unhandled promise rejection",G)}),H._h=s||K(H)?2:1),H._a=void 0,ee&&ie.e)throw ie.v})},K=function(H){return H._h!==1&&(H._a||H._c).length===0},U=function(H){n.call(m,function(){var G;s?l.emit("rejectionHandled",H):(G=m.onrejectionhandled)&&G({promise:H,reason:H._v})})},z=function(H){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=H,G._s=2,G._a||(G._a=G._c.slice()),I(G,!0)},B=function(H){var G=this,ee;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===H)throw a("Promise can't be resolved itself");(ee=N(H))?u(function(){var ie={_w:G,_d:!1};try{ee.call(H,S(B,ie,1),S(z,ie,1))}catch(ue){z.call(ie,ue)}}):(G._v=H,G._s=1,I(G,!1))}catch(ie){z.call({_w:G,_d:!1},ie)}};k||(w=function(G){c(this,w,E,"_h"),_(G),O.call(this);try{G(S(B,this,1),S(z,this,1))}catch(ee){z.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")(w.prototype,{then:function(G,ee){var ie=T(i(this,w));return ie.ok=typeof G=="function"?G:!0,ie.fail=typeof ee=="function"&&ee,ie.domain=s?l.domain:void 0,this._c.push(ie),this._a&&this._a.push(ie),this._s&&I(this,!1),ie.promise},catch:function(H){return this.then(void 0,H)}}),b=function(){var H=new O;this.promise=H,this.resolve=S(B,H,1),this.reject=S(z,H,1)},p.f=T=function(H){return H===w||H===y?new b(H):x(H)}),d(d.G+d.W+d.F*!k,{Promise:w}),j("./_set-to-string-tag")(w,E),j("./_set-species")(E),y=j("./_core")[E],d(d.S+d.F*!k,E,{reject:function(G){var ee=T(this),ie=ee.reject;return ie(G),ee.promise}}),d(d.S+d.F*(D||!k),E,{resolve:function(G){return g(D&&this===y?w:this,G)}}),d(d.S+d.F*!(k&&j("./_iter-detect")(function(H){w.all(H).catch(L)})),E,{all:function(G){var ee=this,ie=T(ee),ue=ie.resolve,xe=ie.reject,Te=h(function(){var se=[],ve=0,de=1;o(G,!1,function(ne){var ae=ve++,Z=!1;se.push(void 0),de++,ee.resolve(ne).then(function(le){if(Z)return;Z=!0,se[ae]=le,--de||ue(se)},xe)}),--de||ue(se)});return Te.e&&xe(Te.v),ie.promise},race:function(G){var ee=this,ie=T(ee),ue=ie.reject,xe=h(function(){o(G,!1,function(Te){ee.resolve(Te).then(ie.resolve,ue)})});return xe.e&&ue(xe.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,Y,M){var D=j("./_export"),m=j("./_to-absolute-index"),S=String.fromCharCode,P=String.fromCodePoint;D(D.S+D.F*(!!P&&P.length!=1),"String",{fromCodePoint:function(f){for(var _=[],c=arguments.length,o=0,i;c>o;){if(i=+arguments[o++],m(i,1114111)!==i)throw RangeError(i+" is not a valid code point");_.push(i<65536?S(i):S(((i-=65536)>>10)+55296,i%1024+56320))}return _.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Y,M){"use strict";var D=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(m){this._t=String(m),this._i=0},function(){var m=this._t,S=this._i,P;return S>=m.length?{value:void 0,done:!0}:(P=D(m,S),this._i+=P.length,{value:P,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Y,M){"use strict";var D=j("./_global"),m=j("./_has"),S=j("./_descriptors"),P=j("./_export"),d=j("./_redefine"),f=j("./_meta").KEY,_=j("./_fails"),c=j("./_shared"),o=j("./_set-to-string-tag"),i=j("./_uid"),n=j("./_wks"),u=j("./_wks-ext"),p=j("./_wks-define"),h=j("./_enum-keys"),v=j("./_is-array"),g=j("./_an-object"),E=j("./_is-object"),a=j("./_to-object"),l=j("./_to-iobject"),t=j("./_to-primitive"),C=j("./_property-desc"),w=j("./_object-create"),s=j("./_object-gopn-ext"),L=j("./_object-gopd"),O=j("./_object-gops"),x=j("./_object-dp"),b=j("./_object-keys"),y=L.f,T=x.f,k=s.f,N=D.Symbol,I=D.JSON,W=I&&I.stringify,K="prototype",U=n("_hidden"),z=n("toPrimitive"),B={}.propertyIsEnumerable,H=c("symbol-registry"),G=c("symbols"),ee=c("op-symbols"),ie=Object[K],ue=typeof N=="function"&&!!O.f,xe=D.QObject,Te=!xe||!xe[K]||!xe[K].findChild,se=S&&_(function(){return w(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(fe,_e,He){var $e=y(ie,_e);$e&&delete ie[_e],T(fe,_e,He),$e&&fe!==ie&&T(ie,_e,$e)}:T,ve=function(fe){var _e=G[fe]=w(N[K]);return _e._k=fe,_e},de=ue&&typeof N.iterator=="symbol"?function(fe){return typeof fe=="symbol"}:function(fe){return fe instanceof N},ne=function(_e,He,$e){return _e===ie&&ne(ee,He,$e),g(_e),He=t(He,!0),g($e),m(G,He)?($e.enumerable?(m(_e,U)&&_e[U][He]&&(_e[U][He]=!1),$e=w($e,{enumerable:C(0,!1)})):(m(_e,U)||T(_e,U,C(1,{})),_e[U][He]=!0),se(_e,He,$e)):T(_e,He,$e)},ae=function(_e,He){g(_e);for(var $e=h(He=l(He)),Ve=0,et=$e.length,at;et>Ve;)ne(_e,at=$e[Ve++],He[at]);return _e},Z=function(_e,He){return He===void 0?w(_e):ae(w(_e),He)},le=function(_e){var He=B.call(this,_e=t(_e,!0));return this===ie&&m(G,_e)&&!m(ee,_e)?!1:He||!m(this,_e)||!m(G,_e)||m(this,U)&&this[U][_e]?He:!0},Q=function(_e,He){if(_e=l(_e),He=t(He,!0),_e===ie&&m(G,He)&&!m(ee,He))return;var $e=y(_e,He);return $e&&m(G,He)&&!(m(_e,U)&&_e[U][He])&&($e.enumerable=!0),$e},q=function(_e){for(var He=k(l(_e)),$e=[],Ve=0,et;He.length>Ve;)!m(G,et=He[Ve++])&&et!=U&&et!=f&&$e.push(et);return $e},be=function(_e){for(var He=_e===ie,$e=k(He?ee:l(_e)),Ve=[],et=0,at;$e.length>et;)m(G,at=$e[et++])&&(He?m(ie,at):!0)&&Ve.push(G[at]);return Ve};ue||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var _e=i(arguments.length>0?arguments[0]:void 0),He=function($e){this===ie&&He.call(ee,$e),m(this,U)&&m(this[U],_e)&&(this[U][_e]=!1),se(this,_e,C(1,$e))};return S&&Te&&se(ie,_e,{configurable:!0,set:He}),ve(_e)},d(N[K],"toString",function(){return this._k}),L.f=Q,x.f=ne,j("./_object-gopn").f=s.f=q,j("./_object-pie").f=le,O.f=be,S&&!j("./_library")&&d(ie,"propertyIsEnumerable",le,!0),u.f=function(fe){return ve(n(fe))}),P(P.G+P.W+P.F*!ue,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;te.length>J;)n(te[J++]);for(var X=b(n.store),$=0;X.length>$;)p(X[$++]);P(P.S+P.F*!ue,"Symbol",{for:function(fe){return m(H,fe+="")?H[fe]:H[fe]=N(fe)},keyFor:function(_e){if(!de(_e))throw TypeError(_e+" is not a symbol!");for(var He in H)if(H[He]===_e)return He},useSetter:function(){Te=!0},useSimple:function(){Te=!1}}),P(P.S+P.F*!ue,"Object",{create:Z,defineProperty:ne,defineProperties:ae,getOwnPropertyDescriptor:Q,getOwnPropertyNames:q,getOwnPropertySymbols:be});var ge=_(function(){O.f(1)});P(P.S+P.F*ge,"Object",{getOwnPropertySymbols:function(_e){return O.f(a(_e))}}),I&&P(P.S+P.F*(!ue||_(function(){var fe=N();return W([fe])!="[null]"||W({a:fe})!="{}"||W(Object(fe))!="{}"})),"JSON",{stringify:function(_e){for(var He=[_e],$e=1,Ve,et;arguments.length>$e;)He.push(arguments[$e++]);return et=Ve=He[1],!E(Ve)&&_e===void 0||de(_e)?void 0:(v(Ve)||(Ve=function(at,st){if(typeof et=="function"&&(st=et.call(this,at,st)),!de(st))return st}),He[1]=Ve,W.apply(I,He))}}),N[K][z]||j("./_hide")(N[K],z,N[K].valueOf),o(N,"Symbol"),o(Math,"Math",!0),o(D.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,Y,M){var D=j("./_export"),m=j("./_object-to-array")(!0);D(D.S,"Object",{entries:function(P){return m(P)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Y,M){"use strict";var D=j("./_export"),m=j("./_core"),S=j("./_global"),P=j("./_species-constructor"),d=j("./_promise-resolve");D(D.P+D.R,"Promise",{finally:function(f){var _=P(this,m.Promise||S.Promise),c=typeof f=="function";return this.then(c?function(o){return d(_,f()).then(function(){return o})}:f,c?function(o){return d(_,f()).then(function(){throw o})}:f)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Y,M){"use strict";var D=j("./_export"),m=j("./_new-promise-capability"),S=j("./_perform");D(D.S,"Promise",{try:function(P){var d=m.f(this),f=S(P);return(f.e?d.reject:d.resolve)(f.v),d.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Y,M){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Y,M){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Y,M){j("./es6.array.iterator");for(var D=j("./_global"),m=j("./_hide"),S=j("./_iterators"),P=j("./_wks")("toStringTag"),d="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),f=0;f<d.length;f++){var _=d[f],c=D[_],o=c&&c.prototype;o&&!o[P]&&m(o,P,_),S[_]=S.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,Y,M){var D=j("./_export"),m=j("./_task");D(D.G+D.B,{setImmediate:m.set,clearImmediate:m.clear})},{"./_export":107,"./_task":155}],189:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/helpers/typeof"),S=P(m);function P(t){return t&&t.__esModule?t:{default:t}}function d(t){return Array.isArray?Array.isArray(t):l(t)==="[object Array]"}M.isArray=d;function f(t){return typeof t=="boolean"}M.isBoolean=f;function _(t){return t===null}M.isNull=_;function c(t){return t==null}M.isNullOrUndefined=c;function o(t){return typeof t=="number"}M.isNumber=o;function i(t){return typeof t=="string"}M.isString=i;function n(t){return(typeof t=="undefined"?"undefined":(0,S.default)(t))==="symbol"}M.isSymbol=n;function u(t){return t===void 0}M.isUndefined=u;function p(t){return l(t)==="[object RegExp]"}M.isRegExp=p;function h(t){return(typeof t=="undefined"?"undefined":(0,S.default)(t))==="object"&&t!==null}M.isObject=h;function v(t){return l(t)==="[object Date]"}M.isDate=v;function g(t){return l(t)==="[object Error]"||t instanceof Error}M.isError=g;function E(t){return typeof t=="function"}M.isFunction=E;function a(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,S.default)(t))==="symbol"||typeof t=="undefined"}M.isPrimitive=a,M.isBuffer=D.isBuffer;function l(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,Y,M){"use strict";var D=j("babel-runtime/helpers/typeof"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(P){"use strict";var d=function(){var i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,n=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,u=/[^-+\dA-Z]/g;return function(p,h,v,g){if(arguments.length===1&&o(p)==="string"&&!/\d/.test(p)&&(h=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");h=String(d.masks[h]||h||d.masks.default);var E=h.slice(0,4);(E==="UTC:"||E==="GMT:")&&(h=h.slice(4),v=!0,E==="GMT:"&&(g=!0));var a=v?"getUTC":"get",l=p[a+"Date"](),t=p[a+"Day"](),C=p[a+"Month"](),w=p[a+"FullYear"](),s=p[a+"Hours"](),L=p[a+"Minutes"](),O=p[a+"Seconds"](),x=p[a+"Milliseconds"](),b=v?0:p.getTimezoneOffset(),y=_(p),T=c(p),k={d:l,dd:f(l),ddd:d.i18n.dayNames[t],dddd:d.i18n.dayNames[t+7],m:C+1,mm:f(C+1),mmm:d.i18n.monthNames[C],mmmm:d.i18n.monthNames[C+12],yy:String(w).slice(2),yyyy:w,h:s%12||12,hh:f(s%12||12),H:s,HH:f(s),M:L,MM:f(L),s:O,ss:f(O),l:f(x,3),L:f(Math.round(x/10)),t:s<12?"a":"p",tt:s<12?"am":"pm",T:s<12?"A":"P",TT:s<12?"AM":"PM",Z:g?"GMT":v?"UTC":(String(p).match(n)||[""]).pop().replace(u,""),o:(b>0?"-":"+")+f(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:y,N:T};return h.replace(i,function(N){return N in k?k[N]:N.slice(1,N.length-1)})}}();d.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"},d.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function f(i,n){for(i=String(i),n=n||2;i.length<n;)i="0"+i;return i}function _(i){var n=new Date(i.getFullYear(),i.getMonth(),i.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var u=new Date(n.getFullYear(),0,4);u.setDate(u.getDate()-(u.getDay()+6)%7+3);var p=n.getTimezoneOffset()-u.getTimezoneOffset();n.setHours(n.getHours()-p);var h=(n-u)/(864e5*7);return 1+Math.floor(h)}function c(i){var n=i.getDay();return n===0&&(n=7),n}function o(i){return i===null?"null":i===void 0?"undefined":(typeof i=="undefined"?"undefined":(0,m.default)(i))!=="object"?typeof i=="undefined"?"undefined":(0,m.default)(i):Array.isArray(i)?"array":{}.toString.call(i).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return d}):(typeof M=="undefined"?"undefined":(0,m.default)(M))==="object"?Y.exports=d:P.dateFormat=d})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,Y,M){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var D=/["'&<>]/;Y.exports=m;function m(S){var P=""+S,d=D.exec(P);if(!d)return P;var f,_="",c=0,o=0;for(c=d.index;c<P.length;c++){switch(P.charCodeAt(c)){case 34:f="&quot;";break;case 38:f="&amp;";break;case 39:f="&#39;";break;case 60:f="&lt;";break;case 62:f="&gt;";break;default:continue}o!==c&&(_+=P.substring(o,c)),o=c+1,_+=f}return o!==c?_+P.substring(o,c):_}},{}],192:[function(j,Y,M){function D(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Y.exports=D,D.EventEmitter=D,D.prototype._events=void 0,D.prototype._maxListeners=void 0,D.defaultMaxListeners=10,D.prototype.setMaxListeners=function(f){if(!S(f)||f<0||isNaN(f))throw TypeError("n must be a positive number");return this._maxListeners=f,this},D.prototype.emit=function(f){var _,c,o,i,n,u;if(this._events||(this._events={}),f==="error"&&(!this._events.error||P(this._events.error)&&!this._events.error.length)){if(_=arguments[1],_ instanceof Error)throw _;var p=new Error('Uncaught, unspecified "error" event. ('+_+")");throw p.context=_,p}if(c=this._events[f],d(c))return!1;if(m(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),c.apply(this,i)}else if(P(c))for(i=Array.prototype.slice.call(arguments,1),u=c.slice(),o=u.length,n=0;n<o;n++)u[n].apply(this,i);return!0},D.prototype.addListener=function(f,_){var c;if(!m(_))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",f,m(_.listener)?_.listener:_),this._events[f]?P(this._events[f])?this._events[f].push(_):this._events[f]=[this._events[f],_]:this._events[f]=_,P(this._events[f])&&!this._events[f].warned&&(d(this._maxListeners)?c=D.defaultMaxListeners:c=this._maxListeners,c&&c>0&&this._events[f].length>c&&(this._events[f].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[f].length),typeof console.trace=="function"&&console.trace())),this},D.prototype.on=D.prototype.addListener,D.prototype.once=function(f,_){if(!m(_))throw TypeError("listener must be a function");var c=!1;function o(){this.removeListener(f,o),c||(c=!0,_.apply(this,arguments))}return o.listener=_,this.on(f,o),this},D.prototype.removeListener=function(f,_){var c,o,i,n;if(!m(_))throw TypeError("listener must be a function");if(!this._events||!this._events[f])return this;if(c=this._events[f],i=c.length,o=-1,c===_||m(c.listener)&&c.listener===_)delete this._events[f],this._events.removeListener&&this.emit("removeListener",f,_);else if(P(c)){for(n=i;n-- >0;)if(c[n]===_||c[n].listener&&c[n].listener===_){o=n;break}if(o<0)return this;c.length===1?(c.length=0,delete this._events[f]):c.splice(o,1),this._events.removeListener&&this.emit("removeListener",f,_)}return this},D.prototype.removeAllListeners=function(f){var _,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[f]&&delete this._events[f],this;if(arguments.length===0){for(_ in this._events){if(_==="removeListener")continue;this.removeAllListeners(_)}return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[f],m(c))this.removeListener(f,c);else if(c)for(;c.length;)this.removeListener(f,c[c.length-1]);return delete this._events[f],this},D.prototype.listeners=function(f){var _;return!this._events||!this._events[f]?_=[]:m(this._events[f])?_=[this._events[f]]:_=this._events[f].slice(),_},D.prototype.listenerCount=function(f){if(this._events){var _=this._events[f];if(m(_))return 1;if(_)return _.length}return 0},D.listenerCount=function(f,_){return f.listenerCount(_)};function m(f){return typeof f=="function"}function S(f){return typeof f=="number"}function P(f){return typeof f=="object"&&f!==null}function d(f){return f===void 0}},{}],193:[function(j,Y,M){var D=j("http"),m=Y.exports;for(var S in D)D.hasOwnProperty(S)&&(m[S]=D[S]);m.request=function(P,d){return P||(P={}),P.scheme="https",P.protocol="https:",D.request.call(this,P,d)}},{http:231}],194:[function(j,Y,M){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var D=j("util"),m=j("ms");Y.exports=function(S){if(typeof S=="number")return S;var P=m(S);if(P===void 0){var d=new Error(D.format("humanize-ms(%j) result undefined",S));console.warn(d.stack)}return P}},{ms:204,util:243}],195:[function(j,Y,M){M.read=function(D,m,S,P,d){var f,_,c=d*8-P-1,o=(1<<c)-1,i=o>>1,n=-7,u=S?d-1:0,p=S?-1:1,h=D[m+u];for(u+=p,f=h&(1<<-n)-1,h>>=-n,n+=c;n>0;f=f*256+D[m+u],u+=p,n-=8);for(_=f&(1<<-n)-1,f>>=-n,n+=P;n>0;_=_*256+D[m+u],u+=p,n-=8);if(f===0)f=1-i;else{if(f===o)return _?NaN:(h?-1:1)*Infinity;_=_+Math.pow(2,P),f=f-i}return(h?-1:1)*_*Math.pow(2,f-P)},M.write=function(D,m,S,P,d,f){var _,c,o,i=f*8-d-1,n=(1<<i)-1,u=n>>1,p=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=P?0:f-1,v=P?1:-1,g=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===Infinity?(c=isNaN(m)?1:0,_=n):(_=Math.floor(Math.log(m)/Math.LN2),m*(o=Math.pow(2,-_))<1&&(_--,o*=2),_+u>=1?m+=p/o:m+=p*Math.pow(2,1-u),m*o>=2&&(_++,o/=2),_+u>=n?(c=0,_=n):_+u>=1?(c=(m*o-1)*Math.pow(2,d),_=_+u):(c=m*Math.pow(2,u-1)*Math.pow(2,d),_=0));d>=8;D[S+h]=c&255,h+=v,c/=256,d-=8);for(_=_<<d|c,i+=d;i>0;D[S+h]=_&255,h+=v,_/=256,i-=8);D[S+h-v]|=g*128}},{}],196:[function(j,Y,M){typeof Object.create=="function"?Y.exports=function(m,S){S&&(m.super_=S,m.prototype=Object.create(S.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(m,S){if(S){m.super_=S;var P=function(){};P.prototype=S.prototype,m.prototype=new P,m.prototype.constructor=m}}},{}],197:[function(j,Y,M){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/Y.exports=function(S){return S!=null&&(D(S)||m(S)||!!S._isBuffer)};function D(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function m(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&D(S.slice(0,0))}},{}],198:[function(j,Y,M){var D={}.toString;Y.exports=Array.isArray||function(m){return D.call(m)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(j):typeof define=="function"&&define.amd?define(Y):Y(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 Y={},M=0,D=j.length;M<D;M++)Y[j.charAt(M)]=M;return Y}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var Y=j.charCodeAt(0);return Y<128?j:Y<2048?fromCharCode(192|Y>>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&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 Y=[0,2,1][j.length%3],M=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),D=[b64chars.charAt(M>>>18),b64chars.charAt(M>>>12&63),Y>=2?"=":b64chars.charAt(M>>>6&63),Y>=1?"=":b64chars.charAt(M&63)];return D.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 Y=Object.prototype.toString.call(j)==="[object Uint8Array]";return Y?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Y){return Y?_encode(String(j)).replace(/[+\/]/g,function(M){return M=="+"?"-":"_"}).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 Y=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),M=Y-65536;return fromCharCode((M>>>10)+55296)+fromCharCode((M&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 Y=j.length,M=Y%4,D=(Y>0?b64tab[j.charAt(0)]<<18:0)|(Y>1?b64tab[j.charAt(1)]<<12:0)|(Y>2?b64tab[j.charAt(2)]<<6:0)|(Y>3?b64tab[j.charAt(3)]:0),m=[fromCharCode(D>>>16),fromCharCode(D>>>8&255),fromCharCode(D&255)];return m.length-=[0,0,2,1][M],m.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(Y){return Y=="-"?"+":"/"}).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,Y,M){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";Y.exports=m;var D=Object.prototype.hasOwnProperty;function m(S,P,d){if(!S)throw new TypeError("argument dest is required");if(!P)throw new TypeError("argument src is required");return d===void 0&&(d=!0),Object.getOwnPropertyNames(P).forEach(function(_){if(!d&&D.call(S,_))return;var c=Object.getOwnPropertyDescriptor(P,_);Object.defineProperty(S,_,c)}),S}},{}],201:[function(j,Y,M){"use strict";function D(){this._types=Object.create(null),this._extensions=Object.create(null);for(var m=0;m<arguments.length;m++)this.define(arguments[m]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}D.prototype.define=function(m,S){for(var P in m){var d=m[P].map(function(c){return c.toLowerCase()});P=P.toLowerCase();for(var f=0;f<d.length;f++){var _=d[f];if(_[0]=="*")continue;if(!S&&_ in this._types)throw new Error('Attempt to change mapping for "'+_+'" extension from "'+this._types[_]+'" to "'+P+'". Pass `force=true` to allow this, otherwise remove "'+_+'" from the list of extensions for "'+P+'".');this._types[_]=P}if(S||!this._extensions[P]){var _=d[0];this._extensions[P]=_[0]!="*"?_:_.substr(1)}}},D.prototype.getType=function(m){m=String(m);var S=m.replace(/^.*[/\\]/,"").toLowerCase(),P=S.replace(/^.*\./,"").toLowerCase(),d=S.length<m.length,f=P.length<S.length-1;return(f||!d)&&this._types[P]||null},D.prototype.getExtension=function(m){return m=/^\s*([^;\s]*)/.test(m)&&RegExp.$1,m&&this._extensions[m.toLowerCase()]||null},Y.exports=D},{}],202:[function(j,Y,M){"use strict";var D=j("./Mime");Y.exports=new D(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,Y,M){Y.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,Y,M){var D=1e3,m=D*60,S=m*60,P=S*24,d=P*7,f=P*365.25;Y.exports=function(n,u){u=u||{};var p=typeof n;if(p==="string"&&n.length>0)return _(n);if(p==="number"&&isFinite(n))return u.long?o(n):c(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function _(n){if(n=String(n),n.length>100)return;var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!u)return;var p=parseFloat(u[1]),h=(u[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return p*f;case"weeks":case"week":case"w":return p*d;case"days":case"day":case"d":return p*P;case"hours":case"hour":case"hrs":case"hr":case"h":return p*S;case"minutes":case"minute":case"mins":case"min":case"m":return p*m;case"seconds":case"second":case"secs":case"sec":case"s":return p*D;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function c(n){var u=Math.abs(n);return u>=P?Math.round(n/P)+"d":u>=S?Math.round(n/S)+"h":u>=m?Math.round(n/m)+"m":u>=D?Math.round(n/D)+"s":n+"ms"}function o(n){var u=Math.abs(n);return u>=P?i(n,u,P,"day"):u>=S?i(n,u,S,"hour"):u>=m?i(n,u,m,"minute"):u>=D?i(n,u,D,"second"):n+" ms"}function i(n,u,p,h){var v=u>=p*1.5;return Math.round(n/p)+" "+h+(v?"s":"")}},{}],205:[function(j,Y,M){(function(D){function m(f,_){for(var c=0,o=f.length-1;o>=0;o--){var i=f[o];i==="."?f.splice(o,1):i===".."?(f.splice(o,1),c++):c&&(f.splice(o,1),c--)}if(_)for(;c--;c)f.unshift("..");return f}M.resolve=function(){for(var f="",_=!1,c=arguments.length-1;c>=-1&&!_;c--){var o=c>=0?arguments[c]:D.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;f=o+"/"+f,_=o.charAt(0)==="/"}return f=m(P(f.split("/"),function(i){return!!i}),!_).join("/"),(_?"/":"")+f||"."},M.normalize=function(f){var _=M.isAbsolute(f),c=d(f,-1)==="/";return f=m(P(f.split("/"),function(o){return!!o}),!_).join("/"),!f&&!_&&(f="."),f&&c&&(f+="/"),(_?"/":"")+f},M.isAbsolute=function(f){return f.charAt(0)==="/"},M.join=function(){var f=Array.prototype.slice.call(arguments,0);return M.normalize(P(f,function(_,c){if(typeof _!="string")throw new TypeError("Arguments to path.join must be strings");return _}).join("/"))},M.relative=function(f,_){f=M.resolve(f).substr(1),_=M.resolve(_).substr(1);function c(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 o=c(f.split("/")),i=c(_.split("/")),n=Math.min(o.length,i.length),u=n,p=0;p<n;p++)if(o[p]!==i[p]){u=p;break}for(var h=[],p=u;p<o.length;p++)h.push("..");return h=h.concat(i.slice(u)),h.join("/")},M.sep="/",M.delimiter=":",M.dirname=function(f){if(typeof f!="string"&&(f=f+""),f.length===0)return".";for(var _=f.charCodeAt(0),c=_===47,o=-1,i=!0,n=f.length-1;n>=1;--n)if(_=f.charCodeAt(n),_===47){if(!i){o=n;break}}else i=!1;return o===-1?c?"/":".":c&&o===1?"/":f.slice(0,o)};function S(f){typeof f!="string"&&(f=f+"");var _=0,c=-1,o=!0,i;for(i=f.length-1;i>=0;--i)if(f.charCodeAt(i)===47){if(!o){_=i+1;break}}else c===-1&&(o=!1,c=i+1);return c===-1?"":f.slice(_,c)}M.basename=function(f,_){var c=S(f);return _&&c.substr(-1*_.length)===_&&(c=c.substr(0,c.length-_.length)),c},M.extname=function(f){typeof f!="string"&&(f=f+"");for(var _=-1,c=0,o=-1,i=!0,n=0,u=f.length-1;u>=0;--u){var p=f.charCodeAt(u);if(p===47){if(!i){c=u+1;break}continue}o===-1&&(i=!1,o=u+1),p===46?_===-1?_=u:n!==1&&(n=1):_!==-1&&(n=-1)}return _===-1||o===-1||n===0||n===1&&_===o-1&&_===c+1?"":f.slice(_,o)};function P(f,_){if(f.filter)return f.filter(_);for(var c=[],o=0;o<f.length;o++)_(f[o],o,f)&&c.push(f[o]);return c}var d="ab".substr(-1)==="b"?function(f,_,c){return f.substr(_,c)}:function(f,_,c){return _<0&&(_=f.length+_),f.substr(_,c)}}).call(this,j("_process"))},{_process:208}],206:[function(j,Y,M){(function(D){/*!
* 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 m={function:!0,object:!0},S=m[typeof window]&&window||this,P=S,d=m[typeof M]&&M,f=m[typeof Y]&&Y&&!Y.nodeType&&Y,_=d&&f&&typeof D=="object"&&D;_&&(_.global===_||_.window===_||_.self===_)&&(S=_);var c=Math.pow(2,53)-1,o=/\bOpera/,i=this,n=Object.prototype,u=n.hasOwnProperty,p=n.toString;function h(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<=c)for(;++y<T;)b(x[y],y,x);else a(x,b)}function E(x){return x=s(x),/^(?:webOS|i(?:OS|P))/.test(x)?x:h(x)}function a(x,b){for(var y in x)u.call(x,y)&&b(x[y],y,x)}function l(x){return x==null?h(x):p.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 C(x){return String(x).replace(/([ -])(?!$)/g,"$1?")}function w(x,b){var y=null;return g(x,function(T,k){y=b(y,T,k,x)}),y}function s(x){return String(x).replace(/^ +| +$/g,"")}function L(x){var b=S,y=x&&typeof x=="object"&&l(x)!="String";y&&(b=x,x=null);var T=b.navigator||{},k=T.userAgent||"";x||(x=k);var N=y||i==P,I=y?!!T.likeChrome:/\bChrome\b/.test(x)&&!/internal|\n/i.test(p.toString()),W="Object",K=y?W:"ScriptBridgingProxyObject",U=y?W:"Environment",z=y&&b.java?"JavaPackage":l(b.java),B=y?W:"RuntimeObject",H=/\bJava/.test(z)&&b.java,G=H&&l(b.environment)==U,ee=H?"a":"\u03B1",ie=H?"b":"\u03B2",ue=b.document||{},xe=b.operamini||b.opera,Te=o.test(Te=y&&xe?xe["[[Class]]"]:l(xe))?Te:xe=null,se,ve=x,de=[],ne=null,ae=x==k,Z=ae&&xe&&typeof xe.version=="function"&&xe.version(),le,Q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),q=ge(["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=_e([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),te=$({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}}),J=fe(["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(et){return w(et,function(at,st){return at||RegExp("\\b"+(st.pattern||C(st))+"\\b","i").exec(x)&&(st.label||st)})}function $(et){return w(et,function(at,st,Me){return at||(st[be]||st[/^[a-z]+(?: +[a-z]+\b)*/i.exec(be)]||RegExp("\\b"+C(Me)+"(?:\\b|\\w*\\d)","i").exec(x))&&Me})}function ge(et){return w(et,function(at,st){return at||RegExp("\\b"+(st.pattern||C(st))+"\\b","i").exec(x)&&(st.label||st)})}function fe(et){return w(et,function(at,st){var Me=st.pattern||C(st);return!at&&(at=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(x))&&(at=v(at,Me,st.label||st)),at})}function _e(et){return w(et,function(at,st){var Me=st.pattern||C(st);return!at&&(at=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))&&((at=String(st.label&&!RegExp(Me,"i").test(st.label)?st.label:at).split("/"))[1]&&!/[\d.]+/.test(at[0])&&(at[0]+=" "+at[1]),st=st.label||st,at=E(at[0].replace(RegExp(Me,"i"),st).replace(RegExp("; *(?:"+st+"[_-])?","i")," ").replace(RegExp("("+st+")[-_.]?(\\w)","i"),"$1 $2"))),at})}function He(et){return w(et,function(at,st){return at||(RegExp(st+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(x)||0)[1]||null})}function $e(){return this.description||""}if(Q&&(Q=[Q]),te&&!be&&(be=_e([te])),(se=/\bGoogle TV\b/.exec(be))&&(be=se[0]),/\bSimulator\b/i.test(x)&&(be=(be?be+" ":"")+"Simulator"),q=="Opera Mini"&&/\bOPiOS\b/.test(x)&&de.push("running in Turbo/Uncompressed mode"),q=="IE"&&/\blike iPhone OS\b/.test(x)?(se=L(x.replace(/like iPhone OS/,"")),te=se.manufacturer,be=se.product):/^iP/.test(be)?(q||(q="Safari"),J="iOS"+((se=/ OS ([\d_]+)/i.exec(x))?" "+se[1].replace(/_/g,"."):"")):q=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":te&&te!="Google"&&(/Chrome/.test(q)&&!/\bMobile Safari\b/i.test(x)||/\bVita\b/.test(be))||/\bAndroid\b/.test(J)&&/^Chrome/.test(q)&&/\bVersion\//i.test(x)?(q="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):q=="Silk"?(/\bMobi/i.test(x)||(J="Android",de.unshift("desktop mode")),/Accelerated *= *true/i.test(x)&&de.unshift("accelerated")):q=="PaleMoon"&&(se=/\bFirefox\/([\d.]+)\b/.exec(x))?de.push("identifying as Firefox "+se[1]):q=="Firefox"&&(se=/\b(Mobile|Tablet|TV)\b/i.exec(x))?(J||(J="Firefox OS"),be||(be=se[1])):!q||(se=!/\bMinefield\b/i.test(x)&&/\b(?:Firefox|Safari)\b/.exec(q))?(q&&!be&&/[\/,]|^[^(]+?\)/.test(x.slice(x.indexOf(se+"/")+8))&&(q=null),(se=be||te||J)&&(be||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(q=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:se)+" Browser")):q=="Electron"&&(se=(/\bChrome\/([\d.]+)\b/.exec(x)||0)[1])&&de.push("Chromium "+se),Z||(Z=He(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",C(q),"(?:Firefox|Minefield|NetFront)"])),(se=Q=="iCab"&&parseFloat(Z)>3&&"WebKit"||/\bOpera\b/.test(q)&&(/\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)&&(J=="Mac OS"?"Tasman":"Trident")||Q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(q)&&"NetFront")&&(Q=[se]),q=="IE"&&(se=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(x)||0)[1])?(q+=" Mobile",J="Windows Phone "+(/\+$/.test(se)?se:se+".x"),de.unshift("desktop mode")):/\bWPDesktop\b/i.test(x)?(q="IE Mobile",J="Windows Phone 8.x",de.unshift("desktop mode"),Z||(Z=(/\brv:([\d.]+)/.exec(x)||0)[1])):q!="IE"&&Q=="Trident"&&(se=/\brv:([\d.]+)/.exec(x))&&(q&&de.push("identifying as "+q+(Z?" "+Z:"")),q="IE",Z=se[1]),ae){if(t(b,"global"))if(H&&(se=H.lang.System,ve=se.getProperty("os.arch"),J=J||se.getProperty("os.name")+" "+se.getProperty("os.version")),G){try{Z=b.require("ringo/engine").version.join("."),q="RingoJS"}catch(et){(se=b.system)&&se.global.system==b.system&&(q="Narwhal",J||(J=se[0].os||null))}q||(q="Rhino")}else typeof b.process=="object"&&!b.process.browser&&(se=b.process)&&(typeof se.versions=="object"&&(typeof se.versions.electron=="string"?(de.push("Node "+se.versions.node),q="Electron",Z=se.versions.electron):typeof se.versions.nw=="string"&&(de.push("Chromium "+Z,"Node "+se.versions.node),q="NW.js",Z=se.versions.nw)),q||(q="Node.js",ve=se.arch,J=se.platform,Z=/[\d.]+/.exec(se.version),Z=Z?Z[0]:null));else l(se=b.runtime)==K?(q="Adobe AIR",J=se.flash.system.Capabilities.os):l(se=b.phantom)==B?(q="PhantomJS",Z=(se=se.version||null)&&se.major+"."+se.minor+"."+se.patch):typeof ue.documentMode=="number"&&(se=/\bTrident\/(\d+)/i.exec(x))?(Z=[Z,ue.documentMode],(se=+se[1]+4)!=Z[1]&&(de.push("IE "+Z[1]+" mode"),Q&&(Q[1]=""),Z[1]=se),Z=q=="IE"?String(Z[1].toFixed(1)):Z[0]):typeof ue.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(q)&&(de.push("masking as "+q+" "+Z),q="IE",Z="11.0",Q=["Trident"],J="Windows");J=J&&E(J)}if(Z&&(se=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Z)||/(?:alpha|beta)(?: ?\d)?/i.exec(x+";"+(ae&&T.appMinorVersion))||/\bMinefield\b/i.test(x)&&"a")&&(ne=/b/i.test(se)?"beta":"alpha",Z=Z.replace(RegExp(se+"\\+?$"),"")+(ne=="beta"?ie:ee)+(/\d+\+?/.exec(se)||"")),q=="Fennec"||q=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))q="Firefox Mobile";else if(q=="Maxthon"&&Z)Z=Z.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(be))be=="Xbox 360"&&(J=null),be=="Xbox 360"&&/\bIEMobile\b/.test(x)&&de.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(q)||q&&!be&&!/Browser|Mobi/.test(q))&&(J=="Windows CE"||/Mobi/i.test(x)))q+=" Mobile";else if(q=="IE"&&ae)try{b.external===null&&de.unshift("platform preview")}catch(et){de.unshift("embedded")}else(/\bBlackBerry\b/.test(be)||/\bBB10\b/.test(x))&&(se=(RegExp(be.replace(/ +/g," *")+"/([.\\d]+)","i").exec(x)||0)[1]||Z)?(se=[se,/BB10/.test(x)],J=(se[1]?(be=null,te="BlackBerry"):"Device Software")+" "+se[0],Z=null):this!=a&&be!="Wii"&&(ae&&xe||/Opera/.test(q)&&/\b(?:MSIE|Firefox)\b/i.test(x)||q=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||q=="IE"&&(J&&!/^Win/.test(J)&&Z>5.5||/\bWindows XP\b/.test(J)&&Z>8||Z==8&&!/\bTrident\b/.test(x)))&&!o.test(se=L.call(a,x.replace(o,"")+";"))&&se.name&&(se="ing as "+se.name+((se=se.version)?" "+se:""),o.test(q)?(/\bIE\b/.test(se)&&J=="Mac OS"&&(J=null),se="identify"+se):(se="mask"+se,Te?q=E(Te.replace(/([a-z])([A-Z])/g,"$1 $2")):q="Opera",/\bIE\b/.test(se)&&(J=null),ae||(Z=null)),Q=["Presto"],de.push(se));(se=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(x)||0)[1])&&(se=[parseFloat(se.replace(/\.(\d)$/,".0$1")),se],q=="Safari"&&se[1].slice(-1)=="+"?(q="WebKit Nightly",ne="alpha",Z=se[1].slice(0,-1)):(Z==se[1]||Z==(se[2]=(/\bSafari\/([\d.]+\+?)/i.exec(x)||0)[1]))&&(Z=null),se[1]=(/\bChrome\/([\d.]+)/i.exec(x)||0)[1],se[0]==537.36&&se[2]==537.36&&parseFloat(se[1])>=28&&Q=="WebKit"&&(Q=["Blink"]),!ae||!I&&!se[1]?(Q&&(Q[1]="like Safari"),se=(se=se[0],se<400?1:se<500?2:se<526?3:se<533?4:se<534?"4+":se<535?5:se<537?6:se<538?7:se<601?8:"8")):(Q&&(Q[1]="like Chrome"),se=se[1]||(se=se[0],se<530?1:se<532?2:se<532.05?3:se<533?4:se<534.03?5:se<534.07?6:se<534.1?7:se<534.13?8:se<534.16?9:se<534.24?10:se<534.3?11:se<535.01?12:se<535.02?"13+":se<535.07?15:se<535.11?16:se<535.19?17:se<536.05?18:se<536.1?19:se<537.01?20:se<537.11?"21+":se<537.13?23:se<537.18?24:se<537.24?25:se<537.36?26:Q!="Blink"?"27":"28")),Q&&(Q[1]+=" "+(se+=typeof se=="number"?".x":/[.+]/.test(se)?"":"+")),q=="Safari"&&(!Z||parseInt(Z)>45)&&(Z=se)),q=="Opera"&&(se=/\bzbov|zvav$/.exec(J))?(q+=" ",de.unshift("desktop mode"),se=="zvav"?(q+="Mini",Z=null):q+="Mobile",J=J.replace(RegExp(" *"+se+"$"),"")):q=="Safari"&&/\bChrome\b/.exec(Q&&Q[1])&&(de.unshift("desktop mode"),q="Chrome Mobile",Z=null,/\bOS X\b/.test(J)?(te="Apple",J="iOS 4.3+"):J=null),Z&&Z.indexOf(se=/[\d.]+$/.exec(J))==0&&x.indexOf("/"+se+"-")>-1&&(J=s(J.replace(se,""))),Q&&!/\b(?:Avant|Nook)\b/.test(q)&&(/Browser|Lunascape|Maxthon/.test(q)||q!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(Q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(q)&&Q[1])&&((se=Q[Q.length-1])&&de.push(se)),de.length&&(de=["("+de.join("; ")+")"]),te&&be&&be.indexOf(te)<0&&de.push("on "+te),be&&de.push((/^on /.test(de[de.length-1])?"":"on ")+be),J&&(se=/ ([\d.+]+)$/.exec(J),le=se&&J.charAt(J.length-se[0].length-1)=="/",J={architecture:32,family:se&&!le?J.replace(se[0],""):J,version:se?se[1]:null,toString:function(){var et=this.version;return this.family+(et&&!le?" "+et:"")+(this.architecture==64?" 64-bit":"")}}),(se=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ve))&&!/\bi686\b/i.test(ve)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+se),"")),q&&(/\bWOW64\b/i.test(x)||ae&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(x))&&de.unshift("32-bit")):J&&/^OS X/.test(J.family)&&q=="Chrome"&&parseFloat(Z)>=39&&(J.architecture=64),x||(x=null);var Ve={};return Ve.description=x,Ve.layout=Q&&Q[0],Ve.manufacturer=te,Ve.name=q,Ve.prerelease=ne,Ve.product=be,Ve.ua=x,Ve.version=q&&Z,Ve.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ve.parse=L,Ve.toString=$e,Ve.version&&de.unshift(Z),Ve.name&&de.unshift(q),J&&q&&!(J==String(J).split(" ")[0]&&(J==q.split(" ")[0]||be))&&de.push(be?"("+J+")":"on "+J),de.length&&(Ve.description=de.join(" ")),Ve}var O=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=O,define(function(){return O})):d&&f?a(O,function(x,b){d[b]=x}):S.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Y,M){(function(D){"use strict";typeof D=="undefined"||!D.version||D.version.indexOf("v0.")===0||D.version.indexOf("v1.")===0&&D.version.indexOf("v1.8.")!==0?Y.exports={nextTick:m}:Y.exports=D;function m(S,P,d,f){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var _=arguments.length,c,o;switch(_){case 0:case 1:return D.nextTick(S);case 2:return D.nextTick(function(){S.call(null,P)});case 3:return D.nextTick(function(){S.call(null,P,d)});case 4:return D.nextTick(function(){S.call(null,P,d,f)});default:for(c=new Array(_-1),o=0;o<c.length;)c[o++]=arguments[o];return D.nextTick(function(){S.apply(null,c)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,Y,M){var D=Y.exports={},m,S;function P(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?m=setTimeout:m=P}catch(g){m=P}try{typeof clearTimeout=="function"?S=clearTimeout:S=d}catch(g){S=d}})();function f(g){if(m===setTimeout)return setTimeout(g,0);if((m===P||!m)&&setTimeout)return m=setTimeout,setTimeout(g,0);try{return m(g,0)}catch(E){try{return m.call(null,g,0)}catch(a){return m.call(this,g,0)}}}function _(g){if(S===clearTimeout)return clearTimeout(g);if((S===d||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(g);try{return S(g)}catch(E){try{return S.call(null,g)}catch(a){return S.call(this,g)}}}var c=[],o=!1,i,n=-1;function u(){if(!o||!i)return;o=!1,i.length?c=i.concat(c):n=-1,c.length&&p()}function p(){if(o)return;var g=f(u);o=!0;for(var E=c.length;E;){for(i=c,c=[];++n<E;)i&&i[n].run();n=-1,E=c.length}i=null,o=!1,_(g)}D.nextTick=function(g){var E=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)E[a-1]=arguments[a];c.push(new h(g,E)),c.length===1&&!o&&f(p)};function h(g,E){this.fun=g,this.array=E}h.prototype.run=function(){this.fun.apply(null,this.array)},D.title="browser",D.browser=!0,D.env={},D.argv=[],D.version="",D.versions={};function v(){}D.on=v,D.addListener=v,D.once=v,D.off=v,D.removeListener=v,D.removeAllListeners=v,D.emit=v,D.prependListener=v,D.prependOnceListener=v,D.listeners=function(g){return[]},D.binding=function(g){throw new Error("process.binding is not supported")},D.cwd=function(){return"/"},D.chdir=function(g){throw new Error("process.chdir is not supported")},D.umask=function(){return 0}},{}],209:[function(j,Y,M){(function(D){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(m){var S=typeof M=="object"&&M&&!M.nodeType&&M,P=typeof Y=="object"&&Y&&!Y.nodeType&&Y,d=typeof D=="object"&&D;(d.global===d||d.window===d||d.self===d)&&(m=d);var f,_=2147483647,c=36,o=1,i=26,n=38,u=700,p=72,h=128,v="-",g=/^xn--/,E=/[^\x20-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=c-o,C=Math.floor,w=String.fromCharCode,s;function L(z){throw new RangeError(l[z])}function O(z,B){for(var H=z.length,G=[];H--;)G[H]=B(z[H]);return G}function x(z,B){var H=z.split("@"),G="";H.length>1&&(G=H[0]+"@",z=H[1]),z=z.replace(a,".");var ee=z.split("."),ie=O(ee,B).join(".");return G+ie}function b(z){for(var B=[],H=0,G=z.length,ee,ie;H<G;)ee=z.charCodeAt(H++),ee>=55296&&ee<=56319&&H<G?(ie=z.charCodeAt(H++),(ie&64512)==56320?B.push(((ee&1023)<<10)+(ie&1023)+65536):(B.push(ee),H--)):B.push(ee);return B}function y(z){return O(z,function(B){var H="";return B>65535&&(B-=65536,H+=w(B>>>10&1023|55296),B=56320|B&1023),H+=w(B),H}).join("")}function T(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:c}function k(z,B){return z+22+75*(z<26)-((B!=0)<<5)}function N(z,B,H){var G=0;for(z=H?C(z/u):z>>1,z+=C(z/B);z>t*i>>1;G+=c)z=C(z/t);return C(G+(t+1)*z/(z+n))}function I(z){var B=[],H=z.length,G,ee=0,ie=h,ue=p,xe,Te,se,ve,de,ne,ae,Z,le;for(xe=z.lastIndexOf(v),xe<0&&(xe=0),Te=0;Te<xe;++Te)z.charCodeAt(Te)>=128&&L("not-basic"),B.push(z.charCodeAt(Te));for(se=xe>0?xe+1:0;se<H;){for(ve=ee,de=1,ne=c;!(se>=H&&L("invalid-input"),ae=T(z.charCodeAt(se++)),(ae>=c||ae>C((_-ee)/de))&&L("overflow"),ee+=ae*de,Z=ne<=ue?o:ne>=ue+i?i:ne-ue,ae<Z);ne+=c)le=c-Z,de>C(_/le)&&L("overflow"),de*=le;G=B.length+1,ue=N(ee-ve,G,ve==0),C(ee/G)>_-ie&&L("overflow"),ie+=C(ee/G),ee%=G,B.splice(ee++,0,ie)}return y(B)}function W(z){var B,H,G,ee,ie,ue,xe,Te,se,ve,de,ne=[],ae,Z,le,Q;for(z=b(z),ae=z.length,B=h,H=0,ie=p,ue=0;ue<ae;++ue)de=z[ue],de<128&&ne.push(w(de));for(G=ee=ne.length,ee&&ne.push(v);G<ae;){for(xe=_,ue=0;ue<ae;++ue)de=z[ue],de>=B&&de<xe&&(xe=de);for(Z=G+1,xe-B>C((_-H)/Z)&&L("overflow"),H+=(xe-B)*Z,B=xe,ue=0;ue<ae;++ue)if(de=z[ue],de<B&&++H>_&&L("overflow"),de==B){for(Te=H,se=c;!(ve=se<=ie?o:se>=ie+i?i:se-ie,Te<ve);se+=c)Q=Te-ve,le=c-ve,ne.push(w(k(ve+Q%le,0))),Te=C(Q/le);ne.push(w(k(Te,0))),ie=N(H,Z,G==ee),H=0,++G}++H,++B}return ne.join("")}function K(z){return x(z,function(B){return g.test(B)?I(B.slice(4).toLowerCase()):B})}function U(z){return x(z,function(B){return E.test(B)?"xn--"+W(B):B})}if(f={version:"1.4.1",ucs2:{decode:b,encode:y},decode:I,encode:W,toASCII:U,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return f});else if(S&&P)if(Y.exports==S)P.exports=f;else for(s in f)f.hasOwnProperty(s)&&(S[s]=f[s]);else m.punycode=f})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,Y,M){"use strict";function D(S,P){return Object.prototype.hasOwnProperty.call(S,P)}Y.exports=function(S,P,d,f){P=P||"&",d=d||"=";var _={};if(typeof S!="string"||S.length===0)return _;var c=/\+/g;S=S.split(P);var o=1e3;f&&typeof f.maxKeys=="number"&&(o=f.maxKeys);var i=S.length;o>0&&i>o&&(i=o);for(var n=0;n<i;++n){var u=S[n].replace(c,"%20"),p=u.indexOf(d),h,v,g,E;p>=0?(h=u.substr(0,p),v=u.substr(p+1)):(h=u,v=""),g=decodeURIComponent(h),E=decodeURIComponent(v),D(_,g)?m(_[g])?_[g].push(E):_[g]=[_[g],E]:_[g]=E}return _};var m=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(j,Y,M){"use strict";var D=function(d){switch(typeof d){case"string":return d;case"boolean":return d?"true":"false";case"number":return isFinite(d)?d:"";default:return""}};Y.exports=function(d,f,_,c){return f=f||"&",_=_||"=",d===null&&(d=void 0),typeof d=="object"?S(P(d),function(o){var i=encodeURIComponent(D(o))+_;return m(d[o])?S(d[o],function(n){return i+encodeURIComponent(D(n))}).join(f):i+encodeURIComponent(D(d[o]))}).join(f):c?encodeURIComponent(D(c))+_+encodeURIComponent(D(d)):""};var m=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"};function S(d,f){if(d.map)return d.map(f);for(var _=[],c=0;c<d.length;c++)_.push(f(d[c],c));return _}var P=Object.keys||function(d){var f=[];for(var _ in d)Object.prototype.hasOwnProperty.call(d,_)&&f.push(_);return f}},{}],212:[function(j,Y,M){"use strict";M.decode=M.parse=j("./decode"),M.encode=M.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,Y,M){Y.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=d(D),S=j("babel-runtime/core-js/object/keys"),P=d(S);function d(E){return E&&E.__esModule?E:{default:E}}var f=j("process-nextick-args"),_=P.default||function(E){var a=[];for(var l in E)a.push(l);return a};Y.exports=h;var c=(0,m.default)(j("core-util-is"));c.inherits=j("inherits");var o=j("./_stream_readable"),i=j("./_stream_writable");c.inherits(h,o);for(var n=_(i.prototype),u=0;u<n.length;u++){var p=n[u];h.prototype[p]||(h.prototype[p]=i.prototype[p])}function h(E){if(!(this instanceof h))return new h(E);o.call(this,E),i.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(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function v(){if(this.allowHalfOpen||this._writableState.ended)return;f.nextTick(g,this)}function g(E){E.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=a,this._writableState.destroyed=a}}),h.prototype._destroy=function(E,a){this.push(null),this.end(),f.nextTick(a,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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(_){return _&&_.__esModule?_:{default:_}}Y.exports=f;var P=j("./_stream_transform"),d=(0,m.default)(j("core-util-is"));d.inherits=j("inherits"),d.inherits(f,P);function f(_){if(!(this instanceof f))return new f(_);P.call(this,_)}f.prototype._transform=function(_,c,o){o(null,_)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,Y,M){(function(D,m){"use strict";var S=j("babel-runtime/core-js/object/get-prototype-of"),P=_(S),d=j("babel-runtime/core-js/object/create"),f=_(d);function _(Q){return Q&&Q.__esModule?Q:{default:Q}}var c=j("process-nextick-args");Y.exports=b;var o=j("isarray"),i;b.ReadableState=x;var n=j("events").EventEmitter,u=function(q,be){return q.listeners(be).length},p=j("./internal/streams/stream"),h=j("safe-buffer").Buffer,v=m.Uint8Array||function(){};function g(Q){return h.from(Q)}function E(Q){return h.isBuffer(Q)||Q instanceof v}var a=(0,f.default)(j("core-util-is"));a.inherits=j("inherits");var l=j("util"),t=void 0;l&&l.debuglog?t=l.debuglog("stream"):t=function(){};var C=j("./internal/streams/BufferList"),w=j("./internal/streams/destroy"),s;a.inherits(b,p);var L=["error","close","destroy","pause","resume"];function O(Q,q,be){if(typeof Q.prependListener=="function")return Q.prependListener(q,be);!Q._events||!Q._events[q]?Q.on(q,be):o(Q._events[q])?Q._events[q].unshift(be):Q._events[q]=[be,Q._events[q]]}function x(Q,q){i=i||j("./_stream_duplex"),Q=Q||{};var be=q instanceof i;this.objectMode=!!Q.objectMode,be&&(this.objectMode=this.objectMode||!!Q.readableObjectMode);var te=Q.highWaterMark,J=Q.readableHighWaterMark,X=this.objectMode?16:16*1024;te||te===0?this.highWaterMark=te:be&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new C,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&&(s||(s=j("string_decoder/").StringDecoder),this.decoder=new s(Q.encoding),this.encoding=Q.encoding)}function b(Q){if(i=i||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)),p.call(this)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){if(!this._readableState)return;this._readableState.destroyed=q}}),b.prototype.destroy=w.destroy,b.prototype._undestroy=w.undestroy,b.prototype._destroy=function(Q,q){this.push(null),q(Q)},b.prototype.push=function(Q,q){var be=this._readableState,te;return be.objectMode?te=!0:typeof Q=="string"&&(q=q||be.defaultEncoding,q!==be.encoding&&(Q=h.from(Q,q),q=""),te=!0),y(this,Q,q,!1,te)},b.prototype.unshift=function(Q){return y(this,Q,null,!0,!1)};function y(Q,q,be,te,J){var X=Q._readableState;if(q===null)X.reading=!1,U(Q,X);else{var $;J||($=k(X,q)),$?Q.emit("error",$):X.objectMode||q&&q.length>0?(typeof q!="string"&&!X.objectMode&&(0,P.default)(q)!==h.prototype&&(q=g(q)),te?X.endEmitted?Q.emit("error",new Error("stream.unshift() after end event")):T(Q,X,q,!0):X.ended?Q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!be?(q=X.decoder.write(q),X.objectMode||q.length!==0?T(Q,X,q,!1):H(Q,X)):T(Q,X,q,!1))):te||(X.reading=!1)}return N(X)}function T(Q,q,be,te){q.flowing&&q.length===0&&!q.sync?(Q.emit("data",be),Q.read(0)):(q.length+=q.objectMode?1:be.length,te?q.buffer.unshift(be):q.buffer.push(be),q.needReadable&&z(Q)),H(Q,q)}function k(Q,q){var be;return!E(q)&&typeof q!="string"&&q!==void 0&&!Q.objectMode&&(be=new TypeError("Invalid non-string/buffer chunk")),be}function N(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 s||(s=j("string_decoder/").StringDecoder),this._readableState.decoder=new s(Q),this._readableState.encoding=Q,this};var I=8388608;function W(Q){return Q>=I?Q=I:(Q--,Q|=Q>>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function K(Q,q){return Q<=0||q.length===0&&q.ended?0:q.objectMode?1:Q!==Q?q.flowing&&q.length?q.buffer.head.data.length:q.length:(Q>q.highWaterMark&&(q.highWaterMark=W(Q)),Q<=q.length?Q:q.ended?q.length:(q.needReadable=!0,0))}b.prototype.read=function(Q){t("read",Q),Q=parseInt(Q,10);var q=this._readableState,be=Q;if(Q!==0&&(q.emittedReadable=!1),Q===0&&q.needReadable&&(q.length>=q.highWaterMark||q.ended))return t("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?ae(this):z(this),null;if(Q=K(Q,q),Q===0&&q.ended)return q.length===0&&ae(this),null;var te=q.needReadable;t("need readable",te),(q.length===0||q.length-Q<q.highWaterMark)&&(te=!0,t("length less than watermark",te)),q.ended||q.reading?(te=!1,t("reading or ended",te)):te&&(t("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(Q=K(be,q)));var J;return Q>0?J=se(Q,q):J=null,J===null?(q.needReadable=!0,Q=0):q.length-=Q,q.length===0&&(q.ended||(q.needReadable=!0),be!==Q&&q.ended&&ae(this)),J!==null&&this.emit("data",J),J};function U(Q,q){if(q.ended)return;if(q.decoder){var be=q.decoder.end();be&&be.length&&(q.buffer.push(be),q.length+=q.objectMode?1:be.length)}q.ended=!0,z(Q)}function z(Q){var q=Q._readableState;q.needReadable=!1,q.emittedReadable||(t("emitReadable",q.flowing),q.emittedReadable=!0,q.sync?c.nextTick(B,Q):B(Q))}function B(Q){t("emit readable"),Q.emit("readable"),Te(Q)}function H(Q,q){q.readingMore||(q.readingMore=!0,c.nextTick(G,Q,q))}function G(Q,q){for(var be=q.length;!q.reading&&!q.flowing&&!q.ended&&q.length<q.highWaterMark&&!(t("maybeReadMore read 0"),Q.read(0),be===q.length);)be=q.length;q.readingMore=!1}b.prototype._read=function(Q){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(Q,q){var be=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=Q;break;case 1:te.pipes=[te.pipes,Q];break;default:te.pipes.push(Q);break}te.pipesCount+=1,t("pipe count=%d opts=%j",te.pipesCount,q);var J=(!q||q.end!==!1)&&Q!==D.stdout&&Q!==D.stderr,X=J?ge:Me;te.endEmitted?c.nextTick(X):be.once("end",X),Q.on("unpipe",$);function $(Se,Ye){t("onunpipe"),Se===be&&(Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,He()))}function ge(){t("onend"),Q.end()}var fe=ee(be);Q.on("drain",fe);var _e=!1;function He(){t("cleanup"),Q.removeListener("close",at),Q.removeListener("finish",st),Q.removeListener("drain",fe),Q.removeListener("error",et),Q.removeListener("unpipe",$),be.removeListener("end",ge),be.removeListener("end",Me),be.removeListener("data",Ve),_e=!0,te.awaitDrain&&(!Q._writableState||Q._writableState.needDrain)&&fe()}var $e=!1;be.on("data",Ve);function Ve(Se){t("ondata"),$e=!1;var Ye=Q.write(Se);Ye===!1&&!$e&&((te.pipesCount===1&&te.pipes===Q||te.pipesCount>1&&le(te.pipes,Q)!==-1)&&!_e&&(t("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,$e=!0),be.pause())}function et(Se){t("onerror",Se),Me(),Q.removeListener("error",et),u(Q,"error")===0&&Q.emit("error",Se)}O(Q,"error",et);function at(){Q.removeListener("finish",st),Me()}Q.once("close",at);function st(){t("onfinish"),Q.removeListener("close",at),Me()}Q.once("finish",st);function Me(){t("unpipe"),be.unpipe(Q)}return Q.emit("pipe",be),te.flowing||(t("pipe resume"),be.resume()),Q};function ee(Q){return function(){var q=Q._readableState;t("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&u(Q,"data")&&(q.flowing=!0,Te(Q))}}b.prototype.unpipe=function(Q){var q=this._readableState,be={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return Q&&Q!==q.pipes?this:(Q||(Q=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,Q&&Q.emit("unpipe",this,be),this);if(!Q){var te=q.pipes,J=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var X=0;X<J;X++)te[X].emit("unpipe",this,be);return this}var $=le(q.pipes,Q);return $===-1?this:(q.pipes.splice($,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),Q.emit("unpipe",this,be),this)},b.prototype.on=function(Q,q){var be=p.prototype.on.call(this,Q,q);if(Q==="data")this._readableState.flowing!==!1&&this.resume();else if(Q==="readable"){var te=this._readableState;!te.endEmitted&&!te.readableListening&&(te.readableListening=te.needReadable=!0,te.emittedReadable=!1,te.reading?te.length&&z(this):c.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,ue(this,Q)),this};function ue(Q,q){q.resumeScheduled||(q.resumeScheduled=!0,c.nextTick(xe,Q,q))}function xe(Q,q){q.reading||(t("resume read 0"),Q.read(0)),q.resumeScheduled=!1,q.awaitDrain=0,Q.emit("resume"),Te(Q),q.flowing&&!q.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 Te(Q){var q=Q._readableState;for(t("flow",q.flowing);q.flowing&&Q.read()!==null;);}b.prototype.wrap=function(Q){var q=this,be=this._readableState,te=!1;Q.on("end",function(){if(t("wrapped end"),be.decoder&&!be.ended){var $=be.decoder.end();$&&$.length&&q.push($)}q.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 ge=q.push($);ge||(te=!0,Q.pause())});for(var J in Q)this[J]===void 0&&typeof Q[J]=="function"&&(this[J]=function($){return function(){return Q[$].apply(Q,arguments)}}(J));for(var X=0;X<L.length;X++)Q.on(L[X],this.emit.bind(this,L[X]));return this._read=function($){t("wrapped _read",$),te&&(te=!1,Q.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=se;function se(Q,q){if(q.length===0)return null;var be;return q.objectMode?be=q.buffer.shift():!Q||Q>=q.length?(q.decoder?be=q.buffer.join(""):q.buffer.length===1?be=q.buffer.head.data:be=q.buffer.concat(q.length),q.buffer.clear()):be=ve(Q,q.buffer,q.decoder),be}function ve(Q,q,be){var te;return Q<q.head.data.length?(te=q.head.data.slice(0,Q),q.head.data=q.head.data.slice(Q)):Q===q.head.data.length?te=q.shift():te=be?de(Q,q):ne(Q,q),te}function de(Q,q){var be=q.head,te=1,J=be.data;for(Q-=J.length;be=be.next;){var X=be.data,$=Q>X.length?X.length:Q;if($===X.length?J+=X:J+=X.slice(0,Q),Q-=$,Q===0){$===X.length?(++te,be.next?q.head=be.next:q.head=q.tail=null):(q.head=be,be.data=X.slice($));break}++te}return q.length-=te,J}function ne(Q,q){var be=h.allocUnsafe(Q),te=q.head,J=1;for(te.data.copy(be),Q-=te.data.length;te=te.next;){var X=te.data,$=Q>X.length?X.length:Q;if(X.copy(be,be.length-Q,0,$),Q-=$,Q===0){$===X.length?(++J,te.next?q.head=te.next:q.head=q.tail=null):(q.head=te,te.data=X.slice($));break}++J}return q.length-=J,be}function ae(Q){var q=Q._readableState;if(q.length>0)throw new Error('"endReadable()" called on non-empty stream');q.endEmitted||(q.ended=!0,c.nextTick(Z,q,Q))}function Z(Q,q){!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,q.readable=!1,q.emit("end"))}function le(Q,q){for(var be=0,te=Q.length;be<te;be++)if(Q[be]===q)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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(i){return i&&i.__esModule?i:{default:i}}Y.exports=_;var P=j("./_stream_duplex"),d=(0,m.default)(j("core-util-is"));d.inherits=j("inherits"),d.inherits(_,P);function f(i,n){var u=this._transformState;u.transforming=!1;var p=u.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));u.writechunk=null,u.writecb=null,n!=null&&this.push(n),p(i);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function _(i){if(!(this instanceof _))return new _(i);P.call(this,i),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",c)}function c(){var i=this;typeof this._flush=="function"?this._flush(function(n,u){o(i,n,u)}):o(this,null,null)}_.prototype.push=function(i,n){return this._transformState.needTransform=!1,P.prototype.push.call(this,i,n)},_.prototype._transform=function(i,n,u){throw new Error("_transform() is not implemented")},_.prototype._write=function(i,n,u){var p=this._transformState;if(p.writecb=u,p.writechunk=i,p.writeencoding=n,!p.transforming){var h=this._readableState;(p.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},_.prototype._read=function(i){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},_.prototype._destroy=function(i,n){var u=this;P.prototype._destroy.call(this,i,function(p){n(p),u.emit("close")})};function o(i,n,u){if(n)return i.emit("error",n);if(u!=null&&i.push(u),i._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(i._transformState.transforming)throw new Error("Calling transform done when still transforming");return i.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(j,Y,M){(function(D,m){"use strict";var S=j("babel-runtime/core-js/object/define-property"),P=p(S),d=j("babel-runtime/core-js/symbol/has-instance"),f=p(d),_=j("babel-runtime/core-js/symbol"),c=p(_),o=j("babel-runtime/core-js/object/create"),i=p(o),n=j("babel-runtime/core-js/set-immediate"),u=p(n);function p(ne){return ne&&ne.__esModule?ne:{default:ne}}var h=j("process-nextick-args");Y.exports=k;function v(ne,ae,Z){this.chunk=ne,this.encoding=ae,this.callback=Z,this.next=null}function g(ne){var ae=this;this.next=null,this.entry=null,this.finish=function(){de(ae,ne)}}var E=!D.browser&&["v0.10","v0.9."].indexOf(D.version.slice(0,5))>-1?u.default:h.nextTick,a;k.WritableState=y;var l=(0,i.default)(j("core-util-is"));l.inherits=j("inherits");var t={deprecate:j("util-deprecate")},C=j("./internal/streams/stream"),w=j("safe-buffer").Buffer,s=m.Uint8Array||function(){};function L(ne){return w.from(ne)}function O(ne){return w.isBuffer(ne)||ne instanceof s}var x=j("./internal/streams/destroy");l.inherits(k,C);function b(){}function y(ne,ae){a=a||j("./_stream_duplex"),ne=ne||{};var Z=ae instanceof a;this.objectMode=!!ne.objectMode,Z&&(this.objectMode=this.objectMode||!!ne.writableObjectMode);var le=ne.highWaterMark,Q=ne.writableHighWaterMark,q=this.objectMode?16:16*1024;le||le===0?this.highWaterMark=le:Z&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=q,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(te){H(ae,te)},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,Z=[];ae;)Z.push(ae),ae=ae.next;return Z},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 c.default=="function"&&f.default&&typeof Function.prototype[f.default]=="function"?(T=Function.prototype[f.default],(0,P.default)(k,f.default,{value:function(ae){return T.call(this,ae)?!0:this!==k?!1:ae&&ae._writableState instanceof y}})):T=function(ae){return ae instanceof this};function k(ne){if(a=a||j("./_stream_duplex"),!T.call(k,this)&&!(this instanceof a))return new k(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)),C.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ne,ae){var Z=new Error("write after end");ne.emit("error",Z),h.nextTick(ae,Z)}function I(ne,ae,Z,le){var Q=!0,q=!1;return Z===null?q=new TypeError("May not write null values to stream"):typeof Z!="string"&&Z!==void 0&&!ae.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q&&(ne.emit("error",q),h.nextTick(le,q),Q=!1),Q}k.prototype.write=function(ne,ae,Z){var le=this._writableState,Q=!1,q=!le.objectMode&&O(ne);return q&&!w.isBuffer(ne)&&(ne=L(ne)),typeof ae=="function"&&(Z=ae,ae=null),q?ae="buffer":ae||(ae=le.defaultEncoding),typeof Z!="function"&&(Z=b),le.ended?N(this,Z):(q||I(this,le,ne,Z))&&(le.pendingcb++,Q=K(this,le,q,ne,ae,Z)),Q},k.prototype.cork=function(){var ne=this._writableState;ne.corked++},k.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.finished&&!ne.bufferProcessing&&ne.bufferedRequest&&ie(this,ne))},k.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 W(ne,ae,Z){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof ae=="string"&&(ae=w.from(ae,Z)),ae}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(ne,ae,Z,le,Q,q){if(!Z){var be=W(ae,le,Q);le!==be&&(Z=!0,Q="buffer",le=be)}var te=ae.objectMode?1:le.length;ae.length+=te;var J=ae.length<ae.highWaterMark;if(J||(ae.needDrain=!0),ae.writing||ae.corked){var X=ae.lastBufferedRequest;ae.lastBufferedRequest={chunk:le,encoding:Q,isBuf:Z,callback:q,next:null},X?X.next=ae.lastBufferedRequest:ae.bufferedRequest=ae.lastBufferedRequest,ae.bufferedRequestCount+=1}else U(ne,ae,!1,te,le,Q,q);return J}function U(ne,ae,Z,le,Q,q,be){ae.writelen=le,ae.writecb=be,ae.writing=!0,ae.sync=!0,Z?ne._writev(Q,ae.onwrite):ne._write(Q,q,ae.onwrite),ae.sync=!1}function z(ne,ae,Z,le,Q){--ae.pendingcb,Z?(h.nextTick(Q,le),h.nextTick(se,ne,ae),ne._writableState.errorEmitted=!0,ne.emit("error",le)):(Q(le),ne._writableState.errorEmitted=!0,ne.emit("error",le),se(ne,ae))}function B(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function H(ne,ae){var Z=ne._writableState,le=Z.sync,Q=Z.writecb;if(B(Z),ae)z(ne,Z,le,ae,Q);else{var q=ue(Z);!q&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&ie(ne,Z),le?E(G,ne,Z,q,Q):G(ne,Z,q,Q)}}function G(ne,ae,Z,le){Z||ee(ne,ae),ae.pendingcb--,le(),se(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 Z=ae.bufferedRequest;if(ne._writev&&Z&&Z.next){var le=ae.bufferedRequestCount,Q=new Array(le),q=ae.corkedRequestsFree;q.entry=Z;for(var be=0,te=!0;Z;)Q[be]=Z,Z.isBuf||(te=!1),Z=Z.next,be+=1;Q.allBuffers=te,U(ne,ae,!0,ae.length,Q,"",q.finish),ae.pendingcb++,ae.lastBufferedRequest=null,q.next?(ae.corkedRequestsFree=q.next,q.next=null):ae.corkedRequestsFree=new g(ae),ae.bufferedRequestCount=0}else{for(;Z;){var J=Z.chunk,X=Z.encoding,$=Z.callback,ge=ae.objectMode?1:J.length;if(U(ne,ae,!1,ge,J,X,$),Z=Z.next,ae.bufferedRequestCount--,ae.writing)break}Z===null&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=Z,ae.bufferProcessing=!1}k.prototype._write=function(ne,ae,Z){Z(new Error("_write() is not implemented"))},k.prototype._writev=null,k.prototype.end=function(ne,ae,Z){var le=this._writableState;typeof ne=="function"?(Z=ne,ne=null,ae=null):typeof ae=="function"&&(Z=ae,ae=null),ne!=null&&this.write(ne,ae),le.corked&&(le.corked=1,this.uncork()),!le.ending&&!le.finished&&ve(this,le,Z)};function ue(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function xe(ne,ae){ne._final(function(Z){ae.pendingcb--,Z&&ne.emit("error",Z),ae.prefinished=!0,ne.emit("prefinish"),se(ne,ae)})}function Te(ne,ae){!ae.prefinished&&!ae.finalCalled&&(typeof ne._final=="function"?(ae.pendingcb++,ae.finalCalled=!0,h.nextTick(xe,ne,ae)):(ae.prefinished=!0,ne.emit("prefinish")))}function se(ne,ae){var Z=ue(ae);return Z&&(Te(ne,ae),ae.pendingcb===0&&(ae.finished=!0,ne.emit("finish"))),Z}function ve(ne,ae,Z){ae.ending=!0,se(ne,ae),Z&&(ae.finished?h.nextTick(Z):ne.once("finish",Z)),ae.ended=!0,ne.writable=!1}function de(ne,ae,Z){var le=ne.entry;for(ne.entry=null;le;){var Q=le.callback;ae.pendingcb--,Q(Z),le=le.next}ae.corkedRequestsFree?ae.corkedRequestsFree.next=ne:ae.corkedRequestsFree=ne}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ae){if(!this._writableState)return;this._writableState.destroyed=ae}}),k.prototype.destroy=x.destroy,k.prototype._undestroy=x.undestroy,k.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,Y,M){"use strict";function D(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}var m=j("safe-buffer").Buffer,S=j("util");function P(d,f,_){d.copy(f,_)}Y.exports=function(){function d(){D(this,d),this.head=null,this.tail=null,this.length=0}return d.prototype.push=function(_){var c={data:_,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length},d.prototype.unshift=function(_){var c={data:_,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length},d.prototype.shift=function(){if(this.length===0)return;var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_},d.prototype.clear=function(){this.head=this.tail=null,this.length=0},d.prototype.join=function(_){if(this.length===0)return"";for(var c=this.head,o=""+c.data;c=c.next;)o+=_+c.data;return o},d.prototype.concat=function(_){if(this.length===0)return m.alloc(0);if(this.length===1)return this.head.data;for(var c=m.allocUnsafe(_>>>0),o=this.head,i=0;o;)P(o.data,c,i),i+=o.data.length,o=o.next;return c},d}(),S&&S.inspect&&S.inspect.custom&&(Y.exports.prototype[S.inspect.custom]=function(){var d=S.inspect({length:this.length});return this.constructor.name+" "+d})},{"safe-buffer":228,util:71}],220:[function(j,Y,M){"use strict";var D=j("process-nextick-args");function m(d,f){var _=this,c=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return c||o?(f?f(d):d&&(!this._writableState||!this._writableState.errorEmitted)&&D.nextTick(P,this,d),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(i){!f&&i?(D.nextTick(P,_,i),_._writableState&&(_._writableState.errorEmitted=!0)):f&&f(i)}),this)}function S(){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 P(d,f){d.emit("error",f)}Y.exports={destroy:m,undestroy:S}},{"process-nextick-args":207}],221:[function(j,Y,M){"use strict";Y.exports=j("events").EventEmitter},{events:192}],222:[function(j,Y,M){Y.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Y,M){M=Y.exports=j("./lib/_stream_readable.js"),M.Stream=M,M.Readable=M,M.Writable=j("./lib/_stream_writable.js"),M.Duplex=j("./lib/_stream_duplex.js"),M.Transform=j("./lib/_stream_transform.js"),M.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,Y,M){Y.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Y,M){Y.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Y,M){var D=function(){return this}()||Function("return this")(),m=D.regeneratorRuntime&&Object.getOwnPropertyNames(D).indexOf("regeneratorRuntime")>=0,S=m&&D.regeneratorRuntime;if(D.regeneratorRuntime=void 0,Y.exports=j("./runtime"),m)D.regeneratorRuntime=S;else try{delete D.regeneratorRuntime}catch(P){D.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Y,M){!function(D){"use strict";var m=Object.prototype,S=m.hasOwnProperty,P,d=typeof Symbol=="function"?Symbol:{},f=d.iterator||"@@iterator",_=d.asyncIterator||"@@asyncIterator",c=d.toStringTag||"@@toStringTag",o=typeof Y=="object",i=D.regeneratorRuntime;if(i){o&&(Y.exports=i);return}i=D.regeneratorRuntime=o?Y.exports:{};function n(K,U,z,B){var H=U&&U.prototype instanceof a?U:a,G=Object.create(H.prototype),ee=new N(B||[]);return G._invoke=b(K,z,ee),G}i.wrap=n;function u(K,U,z){try{return{type:"normal",arg:K.call(U,z)}}catch(B){return{type:"throw",arg:B}}}var p="suspendedStart",h="suspendedYield",v="executing",g="completed",E={};function a(){}function l(){}function t(){}var C={};C[f]=function(){return this};var w=Object.getPrototypeOf,s=w&&w(w(I([])));s&&s!==m&&S.call(s,f)&&(C=s);var L=t.prototype=a.prototype=Object.create(C);l.prototype=L.constructor=t,t.constructor=l,t[c]=l.displayName="GeneratorFunction";function O(K){["next","throw","return"].forEach(function(U){K[U]=function(z){return this._invoke(U,z)}})}i.isGeneratorFunction=function(K){var U=typeof K=="function"&&K.constructor;return U?U===l||(U.displayName||U.name)==="GeneratorFunction":!1},i.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,t):(K.__proto__=t,c in K||(K[c]="GeneratorFunction")),K.prototype=Object.create(L),K},i.awrap=function(K){return{__await:K}};function x(K){function U(H,G,ee,ie){var ue=u(K[H],K,G);if(ue.type==="throw")ie(ue.arg);else{var xe=ue.arg,Te=xe.value;return Te&&typeof Te=="object"&&S.call(Te,"__await")?Promise.resolve(Te.__await).then(function(se){U("next",se,ee,ie)},function(se){U("throw",se,ee,ie)}):Promise.resolve(Te).then(function(se){xe.value=se,ee(xe)},ie)}}var z;function B(H,G){function ee(){return new Promise(function(ie,ue){U(H,G,ie,ue)})}return z=z?z.then(ee,ee):ee()}this._invoke=B}O(x.prototype),x.prototype[_]=function(){return this},i.AsyncIterator=x,i.async=function(K,U,z,B){var H=new x(n(K,U,z,B));return i.isGeneratorFunction(U)?H:H.next().then(function(G){return G.done?G.value:H.next()})};function b(K,U,z){var B=p;return function(G,ee){if(B===v)throw new Error("Generator is already running");if(B===g){if(G==="throw")throw ee;return W()}for(z.method=G,z.arg=ee;;){var ie=z.delegate;if(ie){var ue=y(ie,z);if(ue){if(ue===E)continue;return ue}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(B===p)throw B=g,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);B=v;var xe=u(K,U,z);if(xe.type==="normal"){if(B=z.done?g:h,xe.arg===E)continue;return{value:xe.arg,done:z.done}}else xe.type==="throw"&&(B=g,z.method="throw",z.arg=xe.arg)}}}function y(K,U){var z=K.iterator[U.method];if(z===P){if(U.delegate=null,U.method==="throw"){if(K.iterator.return&&(U.method="return",U.arg=P,y(K,U),U.method==="throw"))return E;U.method="throw",U.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var B=u(z,K.iterator,U.arg);if(B.type==="throw")return U.method="throw",U.arg=B.arg,U.delegate=null,E;var H=B.arg;if(!H)return U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,E;if(H.done)U[K.resultName]=H.value,U.next=K.nextLoc,U.method!=="return"&&(U.method="next",U.arg=P);else return H;return U.delegate=null,E}O(L),L[c]="Generator",L[f]=function(){return this},L.toString=function(){return"[object Generator]"};function T(K){var U={tryLoc:K[0]};1 in K&&(U.catchLoc=K[1]),2 in K&&(U.finallyLoc=K[2],U.afterLoc=K[3]),this.tryEntries.push(U)}function k(K){var U=K.completion||{};U.type="normal",delete U.arg,K.completion=U}function N(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(T,this),this.reset(!0)}i.keys=function(K){var U=[];for(var z in K)U.push(z);return U.reverse(),function B(){for(;U.length;){var H=U.pop();if(H in K)return B.value=H,B.done=!1,B}return B.done=!0,B}};function I(K){if(K){var U=K[f];if(U)return U.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var z=-1,B=function H(){for(;++z<K.length;)if(S.call(K,z))return H.value=K[z],H.done=!1,H;return H.value=P,H.done=!0,H};return B.next=B}}return{next:W}}i.values=I;function W(){return{value:P,done:!0}}N.prototype={constructor:N,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=P,this.done=!1,this.delegate=null,this.method="next",this.arg=P,this.tryEntries.forEach(k),!K)for(var U in this)U.charAt(0)==="t"&&S.call(this,U)&&!isNaN(+U.slice(1))&&(this[U]=P)},stop:function(){this.done=!0;var K=this.tryEntries[0],U=K.completion;if(U.type==="throw")throw U.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var U=this;function z(ue,xe){return G.type="throw",G.arg=K,U.next=ue,xe&&(U.method="next",U.arg=P),!!xe}for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B],G=H.completion;if(H.tryLoc==="root")return z("end");if(H.tryLoc<=this.prev){var ee=S.call(H,"catchLoc"),ie=S.call(H,"finallyLoc");if(ee&&ie){if(this.prev<H.catchLoc)return z(H.catchLoc,!0);if(this.prev<H.finallyLoc)return z(H.finallyLoc)}else if(ee){if(this.prev<H.catchLoc)return z(H.catchLoc,!0)}else if(ie){if(this.prev<H.finallyLoc)return z(H.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,U){for(var z=this.tryEntries.length-1;z>=0;--z){var B=this.tryEntries[z];if(B.tryLoc<=this.prev&&S.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var H=B;break}}H&&(K==="break"||K==="continue")&&H.tryLoc<=U&&U<=H.finallyLoc&&(H=null);var G=H?H.completion:{};return G.type=K,G.arg=U,H?(this.method="next",this.next=H.finallyLoc,E):this.complete(G)},complete:function(K,U){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&U&&(this.next=U),E},finish:function(K){for(var U=this.tryEntries.length-1;U>=0;--U){var z=this.tryEntries[U];if(z.finallyLoc===K)return this.complete(z.completion,z.afterLoc),k(z),E}},catch:function(K){for(var U=this.tryEntries.length-1;U>=0;--U){var z=this.tryEntries[U];if(z.tryLoc===K){var B=z.completion;if(B.type==="throw"){var H=B.arg;k(z)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(K,U,z){return this.delegate={iterator:I(K),resultName:U,nextLoc:z},this.method==="next"&&(this.arg=P),E}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Y,M){var D=j("buffer"),m=D.Buffer;function S(d,f){for(var _ in d)f[_]=d[_]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?Y.exports=D:(S(D,M),M.Buffer=P);function P(d,f,_){return m(d,f,_)}S(m,P),P.from=function(d,f,_){if(typeof d=="number")throw new TypeError("Argument must not be a number");return m(d,f,_)},P.alloc=function(d,f,_){if(typeof d!="number")throw new TypeError("Argument must be a number");var c=m(d);return f!==void 0?typeof _=="string"?c.fill(f,_):c.fill(f):c.fill(0),c},P.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return m(d)},P.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return D.SlowBuffer(d)}},{buffer:73}],229:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/core-js/string/from-code-point"),S=h(m),P=j("babel-runtime/core-js/json/stringify"),d=h(P),f=j("babel-runtime/helpers/typeof"),_=h(f),c=j("babel-runtime/core-js/object/define-property"),o=h(c),i=j("babel-runtime/core-js/object/keys"),n=h(i),u=j("babel-runtime/core-js/object/create"),p=h(u);function h(v){return v&&v.__esModule?v:{default:v}}(function(v){v.parser=function(X,$){return new E(X,$)},v.SAXParser=E,v.SAXStream=L,v.createStream=s,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 ge=this;l(ge),ge.q=ge.c="",ge.bufferCheckPosition=v.MAX_BUFFER_LENGTH,ge.opt=$||{},ge.opt.lowercase=ge.opt.lowercase||ge.opt.lowercasetags,ge.looseCase=ge.opt.lowercase?"toLowerCase":"toUpperCase",ge.tags=[],ge.closed=ge.closedRoot=ge.sawRoot=!1,ge.tag=ge.error=null,ge.strict=!!X,ge.noscript=!!(X||ge.opt.noscript),ge.state=G.BEGIN,ge.strictEntities=ge.opt.strictEntities,ge.ENTITIES=ge.strictEntities?(0,p.default)(v.XML_ENTITIES):(0,p.default)(v.ENTITIES),ge.attribList=[],ge.opt.xmlns&&(ge.ns=(0,p.default)(T)),ge.trackPosition=ge.opt.position!==!1,ge.trackPosition&&(ge.position=ge.line=ge.column=0),ie(ge,"onready")}p.default||(Object.create=function(X){function $(){}$.prototype=X;var ge=new $;return ge}),n.default||(Object.keys=function(X){var $=[];for(var ge in X)X.hasOwnProperty(ge)&&$.push(ge);return $});function a(X){for(var $=Math.max(v.MAX_BUFFER_LENGTH,10),ge=0,fe=0,_e=g.length;fe<_e;fe++){var He=X[g[fe]].length;if(He>$)switch(g[fe]){case"textNode":xe(X);break;case"cdata":ue(X,"oncdata",X.cdata),X.cdata="";break;case"script":ue(X,"onscript",X.script),X.script="";break;default:se(X,"Max buffer length exceeded: "+g[fe])}ge=Math.max(ge,He)}var $e=v.MAX_BUFFER_LENGTH-ge;X.bufferCheckPosition=$e+X.position}function l(X){for(var $=0,ge=g.length;$<ge;$++)X[g[$]]=""}function t(X){xe(X),X.cdata!==""&&(ue(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(ue(X,"onscript",X.script),X.script="")}E.prototype={end:function(){ve(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var C;try{C=j("stream").Stream}catch(X){C=function(){}}var w=v.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function s(X,$){return new L(X,$)}function L(X,$){if(!(this instanceof L))return new L(X,$);C.apply(this),this._parser=new E(X,$),this.writable=!0,this.readable=!0;var ge=this;this._parser.onend=function(){ge.emit("end")},this._parser.onerror=function(fe){ge.emit("error",fe),ge._parser.error=null},this._decoder=null,w.forEach(function(fe){(0,o.default)(ge,"on"+fe,{get:function(){return ge._parser["on"+fe]},set:function(He){if(!He)return ge.removeAllListeners(fe),ge._parser["on"+fe]=He,He;ge.on(fe,He)},enumerable:!0,configurable:!1})})}L.prototype=(0,p.default)(C.prototype,{constructor:{value:L}}),L.prototype.write=function(X){if(typeof D=="function"&&typeof D.isBuffer=="function"&&D.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},L.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},L.prototype.on=function(X,$){var ge=this;return!ge._parser["on"+X]&&w.indexOf(X)!==-1&&(ge._parser["on"+X]=function(){var fe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);fe.splice(0,0,X),ge.emit.apply(ge,fe)}),C.prototype.on.call(ge,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},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]/,N=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,I=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,W=/[#:_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 K(X){return X===" "||X===`
`||X==="\r"||X===" "}function U(X){return X==='"'||X==="'"}function z(X){return X===">"||K(X)}function B(X,$){return X.test($)}function H(X,$){return!B(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,n.default)(v.ENTITIES).forEach(function(X){var $=v.ENTITIES[X],ge=typeof $=="number"?String.fromCharCode($):$;v.ENTITIES[X]=ge});for(var ee in v.STATE)v.STATE[v.STATE[ee]]=ee;G=v.STATE;function ie(X,$,ge){X[$]&&X[$](ge)}function ue(X,$,ge){X.textNode&&xe(X),ie(X,$,ge)}function xe(X){X.textNode=Te(X.opt,X.textNode),X.textNode&&ie(X,"ontext",X.textNode),X.textNode=""}function Te(X,$){return X.trim&&($=$.trim()),X.normalize&&($=$.replace(/\s+/g," ")),$}function se(X,$){return xe(X),X.trackPosition&&($+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),$=new Error($),X.error=$,ie(X,"onerror",$),X}function ve(X){return X.sawRoot&&!X.closedRoot&&de(X,"Unclosed root tag"),X.state!==G.BEGIN&&X.state!==G.BEGIN_WHITESPACE&&X.state!==G.TEXT&&se(X,"Unexpected end"),xe(X),X.c="",X.closed=!0,ie(X,"onend"),E.call(X,X.strict,X.opt),X}function de(X,$){if((typeof X=="undefined"?"undefined":(0,_.default)(X))!=="object"||!(X instanceof E))throw new Error("bad call to strictFail");X.strict&&se(X,$)}function ne(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var $=X.tags[X.tags.length-1]||X,ge=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(ge.ns=$.ns),X.attribList.length=0,ue(X,"onopentagstart",ge)}function ae(X,$){var ge=X.indexOf(":"),fe=ge<0?["",X]:X.split(":"),_e=fe[0],He=fe[1];return $&&X==="xmlns"&&(_e="xmlns",He=""),{prefix:_e,local:He}}function Z(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),ge=$.prefix,fe=$.local;if(ge==="xmlns")if(fe==="xml"&&X.attribValue!==b)de(X,"xml: prefix must be bound to "+b+`
Actual: `+X.attribValue);else if(fe==="xmlns"&&X.attribValue!==y)de(X,"xmlns: prefix must be bound to "+y+`
Actual: `+X.attribValue);else{var _e=X.tag,He=X.tags[X.tags.length-1]||X;_e.ns===He.ns&&(_e.ns=(0,p.default)(He.ns)),_e.ns[fe]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,ue(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function le(X,$){if(X.opt.xmlns){var ge=X.tag,fe=ae(X.tagName);ge.prefix=fe.prefix,ge.local=fe.local,ge.uri=ge.ns[fe.prefix]||"",ge.prefix&&!ge.uri&&(de(X,"Unbound namespace prefix: "+(0,d.default)(X.tagName)),ge.uri=fe.prefix);var _e=X.tags[X.tags.length-1]||X;ge.ns&&_e.ns!==ge.ns&&(0,n.default)(ge.ns).forEach(function(Ke){ue(X,"onopennamespace",{prefix:Ke,uri:ge.ns[Ke]})});for(var He=0,$e=X.attribList.length;He<$e;He++){var Ve=X.attribList[He],et=Ve[0],at=Ve[1],st=ae(et,!0),Me=st.prefix,Se=st.local,Ye=Me===""?"":ge.ns[Me]||"",it={name:et,value:at,prefix:Me,local:Se,uri:Ye};Me&&Me!=="xmlns"&&!Ye&&(de(X,"Unbound namespace prefix: "+(0,d.default)(Me)),it.uri=Me),X.tag.attributes[et]=it,ue(X,"onattribute",it)}X.attribList.length=0}X.tag.isSelfClosing=!!$,X.sawRoot=!0,X.tags.push(X.tag),ue(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){de(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}ue(X,"onscript",X.script),X.script=""}var $=X.tags.length,ge=X.tagName;X.strict||(ge=ge[X.looseCase]());for(var fe=ge;$--;){var _e=X.tags[$];if(_e.name!==fe)de(X,"Unexpected close tag");else break}if($<0){de(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=G.TEXT;return}X.tagName=ge;for(var He=X.tags.length;He-- >$;){var $e=X.tag=X.tags.pop();X.tagName=X.tag.name,ue(X,"onclosetag",X.tagName);var Ve={};for(var et in $e.ns)Ve[et]=$e.ns[et];var at=X.tags[X.tags.length-1]||X;X.opt.xmlns&&$e.ns!==at.ns&&(0,n.default)($e.ns).forEach(function(st){var Me=$e.ns[st];ue(X,"onclosenamespace",{prefix:st,uri:Me})})}$===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=G.TEXT}function q(X){var $=X.entity,ge=$.toLowerCase(),fe,_e="";return X.ENTITIES[$]?X.ENTITIES[$]:X.ENTITIES[ge]?X.ENTITIES[ge]:($=ge,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),fe=parseInt($,16),_e=fe.toString(16)):($=$.slice(1),fe=parseInt($,10),_e=fe.toString(10))),$=$.replace(/^0+/,""),isNaN(fe)||_e.toLowerCase()!==$?(de(X,"Invalid character entity"),"&"+X.entity+";"):(0,S.default)(fe))}function be(X,$){$==="<"?(X.state=G.OPEN_WAKA,X.startTagPosition=X.position):K($)||(de(X,"Non-whitespace before first tag."),X.textNode=$,X.state=G.TEXT)}function te(X,$){var ge="";return $<X.length&&(ge=X.charAt($)),ge}function J(X){var $=this;if(this.error)throw this.error;if($.closed)return se($,"Cannot write after close. Assign an onready handler.");if(X===null)return ve($);(typeof X=="undefined"?"undefined":(0,_.default)(X))==="object"&&(X=X.toString());for(var ge=0,fe="";!(fe=te(X,ge++),$.c=fe,!fe);){$.trackPosition&&($.position++,fe===`
`?($.line++,$.column=0):$.column++);switch($.state){case G.BEGIN:if($.state=G.BEGIN_WHITESPACE,fe==="\uFEFF")continue;be($,fe);continue;case G.BEGIN_WHITESPACE:be($,fe);continue;case G.TEXT:if($.sawRoot&&!$.closedRoot){for(var _e=ge-1;fe&&fe!=="<"&&fe!=="&";)fe=te(X,ge++),fe&&$.trackPosition&&($.position++,fe===`
`?($.line++,$.column=0):$.column++);$.textNode+=X.substring(_e,ge-1)}fe==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=G.OPEN_WAKA,$.startTagPosition=$.position):(!K(fe)&&(!$.sawRoot||$.closedRoot)&&de($,"Text data outside of root node."),fe==="&"?$.state=G.TEXT_ENTITY:$.textNode+=fe);continue;case G.SCRIPT:fe==="<"?$.state=G.SCRIPT_ENDING:$.script+=fe;continue;case G.SCRIPT_ENDING:fe==="/"?$.state=G.CLOSE_TAG:($.script+="<"+fe,$.state=G.SCRIPT);continue;case G.OPEN_WAKA:if(fe==="!")$.state=G.SGML_DECL,$.sgmlDecl="";else if(!K(fe))if(B(k,fe))$.state=G.OPEN_TAG,$.tagName=fe;else if(fe==="/")$.state=G.CLOSE_TAG,$.tagName="";else if(fe==="?")$.state=G.PROC_INST,$.procInstName=$.procInstBody="";else{if(de($,"Unencoded <"),$.startTagPosition+1<$.position){var He=$.position-$.startTagPosition;fe=new Array(He).join(" ")+fe}$.textNode+="<"+fe,$.state=G.TEXT}continue;case G.SGML_DECL:($.sgmlDecl+fe).toUpperCase()===O?(ue($,"onopencdata"),$.state=G.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+fe==="--"?($.state=G.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+fe).toUpperCase()===x?($.state=G.DOCTYPE,($.doctype||$.sawRoot)&&de($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):fe===">"?(ue($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=G.TEXT):(U(fe)&&($.state=G.SGML_DECL_QUOTED),$.sgmlDecl+=fe);continue;case G.SGML_DECL_QUOTED:fe===$.q&&($.state=G.SGML_DECL,$.q=""),$.sgmlDecl+=fe;continue;case G.DOCTYPE:fe===">"?($.state=G.TEXT,ue($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=fe,fe==="["?$.state=G.DOCTYPE_DTD:U(fe)&&($.state=G.DOCTYPE_QUOTED,$.q=fe));continue;case G.DOCTYPE_QUOTED:$.doctype+=fe,fe===$.q&&($.q="",$.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:$.doctype+=fe,fe==="]"?$.state=G.DOCTYPE:U(fe)&&($.state=G.DOCTYPE_DTD_QUOTED,$.q=fe);continue;case G.DOCTYPE_DTD_QUOTED:$.doctype+=fe,fe===$.q&&($.state=G.DOCTYPE_DTD,$.q="");continue;case G.COMMENT:fe==="-"?$.state=G.COMMENT_ENDING:$.comment+=fe;continue;case G.COMMENT_ENDING:fe==="-"?($.state=G.COMMENT_ENDED,$.comment=Te($.opt,$.comment),$.comment&&ue($,"oncomment",$.comment),$.comment=""):($.comment+="-"+fe,$.state=G.COMMENT);continue;case G.COMMENT_ENDED:fe!==">"?(de($,"Malformed comment"),$.comment+="--"+fe,$.state=G.COMMENT):$.state=G.TEXT;continue;case G.CDATA:fe==="]"?$.state=G.CDATA_ENDING:$.cdata+=fe;continue;case G.CDATA_ENDING:fe==="]"?$.state=G.CDATA_ENDING_2:($.cdata+="]"+fe,$.state=G.CDATA);continue;case G.CDATA_ENDING_2:fe===">"?($.cdata&&ue($,"oncdata",$.cdata),ue($,"onclosecdata"),$.cdata="",$.state=G.TEXT):fe==="]"?$.cdata+="]":($.cdata+="]]"+fe,$.state=G.CDATA);continue;case G.PROC_INST:fe==="?"?$.state=G.PROC_INST_ENDING:K(fe)?$.state=G.PROC_INST_BODY:$.procInstName+=fe;continue;case G.PROC_INST_BODY:if(!$.procInstBody&&K(fe))continue;fe==="?"?$.state=G.PROC_INST_ENDING:$.procInstBody+=fe;continue;case G.PROC_INST_ENDING:fe===">"?(ue($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=G.TEXT):($.procInstBody+="?"+fe,$.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:B(N,fe)?$.tagName+=fe:(ne($),fe===">"?le($):fe==="/"?$.state=G.OPEN_TAG_SLASH:(K(fe)||de($,"Invalid character in tag name"),$.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:fe===">"?(le($,!0),Q($)):(de($,"Forward-slash in opening tag not followed by >"),$.state=G.ATTRIB);continue;case G.ATTRIB:if(K(fe))continue;fe===">"?le($):fe==="/"?$.state=G.OPEN_TAG_SLASH:B(k,fe)?($.attribName=fe,$.attribValue="",$.state=G.ATTRIB_NAME):de($,"Invalid attribute name");continue;case G.ATTRIB_NAME:fe==="="?$.state=G.ATTRIB_VALUE:fe===">"?(de($,"Attribute without value"),$.attribValue=$.attribName,Z($),le($)):K(fe)?$.state=G.ATTRIB_NAME_SAW_WHITE:B(N,fe)?$.attribName+=fe:de($,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(fe==="=")$.state=G.ATTRIB_VALUE;else{if(K(fe))continue;de($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ue($,"onattribute",{name:$.attribName,value:""}),$.attribName="",fe===">"?le($):B(k,fe)?($.attribName=fe,$.state=G.ATTRIB_NAME):(de($,"Invalid attribute name"),$.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(K(fe))continue;U(fe)?($.q=fe,$.state=G.ATTRIB_VALUE_QUOTED):(de($,"Unquoted attribute value"),$.state=G.ATTRIB_VALUE_UNQUOTED,$.attribValue=fe);continue;case G.ATTRIB_VALUE_QUOTED:if(fe!==$.q){fe==="&"?$.state=G.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=fe;continue}Z($),$.q="",$.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:K(fe)?$.state=G.ATTRIB:fe===">"?le($):fe==="/"?$.state=G.OPEN_TAG_SLASH:B(k,fe)?(de($,"No whitespace between attributes"),$.attribName=fe,$.attribValue="",$.state=G.ATTRIB_NAME):de($,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!z(fe)){fe==="&"?$.state=G.ATTRIB_VALUE_ENTITY_U:$.attribValue+=fe;continue}Z($),fe===">"?le($):$.state=G.ATTRIB;continue;case G.CLOSE_TAG:if($.tagName)fe===">"?Q($):B(N,fe)?$.tagName+=fe:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=G.SCRIPT):(K(fe)||de($,"Invalid tagname in closing tag"),$.state=G.CLOSE_TAG_SAW_WHITE);else{if(K(fe))continue;H(k,fe)?$.script?($.script+="</"+fe,$.state=G.SCRIPT):de($,"Invalid tagname in closing tag."):$.tagName=fe}continue;case G.CLOSE_TAG_SAW_WHITE:if(K(fe))continue;fe===">"?Q($):de($,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var $e,Ve;switch($.state){case G.TEXT_ENTITY:$e=G.TEXT,Ve="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:$e=G.ATTRIB_VALUE_QUOTED,Ve="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:$e=G.ATTRIB_VALUE_UNQUOTED,Ve="attribValue";break}fe===";"?($[Ve]+=q($),$.entity="",$.state=$e):B($.entity.length?W:I,fe)?$.entity+=fe:(de($,"Invalid character in entity name"),$[Ve]+="&"+$.entity+fe,$.entity="",$.state=$e);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&a($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var X=String.fromCharCode,$=Math.floor,ge=function(){var _e=16384,He=[],$e,Ve,et=-1,at=arguments.length;if(!at)return"";for(var st="";++et<at;){var Me=Number(arguments[et]);if(!isFinite(Me)||Me<0||Me>1114111||$(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?He.push(Me):(Me-=65536,$e=(Me>>10)+55296,Ve=Me%1024+56320,He.push($e,Ve)),(et+1===at||He.length>_e)&&(st+=X.apply(null,He),He.length=0)}return st};o.default?Object.defineProperty(String,"fromCodePoint",{value:ge,configurable:!0,writable:!0}):String.fromCodePoint=ge}()})(typeof M=="undefined"?(void 0).sax={}:M)}).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,Y,M){Y.exports=S;var D=j("events").EventEmitter,m=j("inherits");m(S,D),S.Readable=j("readable-stream/readable.js"),S.Writable=j("readable-stream/writable.js"),S.Duplex=j("readable-stream/duplex.js"),S.Transform=j("readable-stream/transform.js"),S.PassThrough=j("readable-stream/passthrough.js"),S.Stream=S;function S(){D.call(this)}S.prototype.pipe=function(P,d){var f=this;function _(h){P.writable&&(P.write(h)===!1&&f.pause&&f.pause())}f.on("data",_);function c(){f.readable&&f.resume&&f.resume()}P.on("drain",c),!P._isStdio&&(!d||d.end!==!1)&&(f.on("end",i),f.on("close",n));var o=!1;function i(){if(o)return;o=!0,P.end()}function n(){if(o)return;o=!0,typeof P.destroy=="function"&&P.destroy()}function u(h){if(p(),D.listenerCount(this,"error")===0)throw h}f.on("error",u),P.on("error",u);function p(){f.removeListener("data",_),P.removeListener("drain",c),f.removeListener("end",i),f.removeListener("close",n),f.removeListener("error",u),P.removeListener("error",u),f.removeListener("end",p),f.removeListener("close",p),P.removeListener("close",p)}return f.on("end",p),f.on("close",p),P.on("close",p),P.emit("pipe",f),P}},{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,Y,M){(function(D){var m=j("./lib/request"),S=j("./lib/response"),P=j("xtend"),d=j("builtin-status-codes"),f=j("url"),_=M;_.request=function(c,o){typeof c=="string"?c=f.parse(c):c=P(c);var i=D.location.protocol.search(/^https?:$/)===-1?"http:":"",n=c.protocol||i,u=c.hostname||c.host,p=c.port,h=c.path||"/";u&&u.indexOf(":")!==-1&&(u="["+u+"]"),c.url=(u?n+"//"+u:"")+(p?":"+p:"")+h,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var v=new m(c);return o&&v.on("response",o),v},_.get=function(o,i){var n=_.request(o,i);return n.end(),n},_.ClientRequest=m,_.IncomingMessage=S.IncomingMessage,_.Agent=function(){},_.Agent.defaultMaxSockets=4,_.globalAgent=new _.Agent,_.STATUS_CODES=d,_.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,Y,M){(function(D){"use strict";M.fetch=_(D.fetch)&&_(D.ReadableStream),M.writableStream=_(D.WritableStream),M.abortController=_(D.AbortController),M.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),M.blobConstructor=!0}catch(c){}var m;function S(){if(m!==void 0)return m;if(D.XMLHttpRequest){m=new D.XMLHttpRequest;try{m.open("GET",D.XDomainRequest?"/":"https://example.com")}catch(c){m=null}}else m=null;return m}function P(c){var o=S();if(!o)return!1;try{return o.responseType=c,o.responseType===c}catch(i){}return!1}var d=typeof D.ArrayBuffer!="undefined",f=d&&_(D.ArrayBuffer.prototype.slice);M.arraybuffer=M.fetch||d&&P("arraybuffer"),M.msstream=!M.fetch&&f&&P("ms-stream"),M.mozchunkedarraybuffer=!M.fetch&&d&&P("moz-chunked-arraybuffer"),M.overrideMimeType=M.fetch||(S()?_(S().overrideMimeType):!1),M.vbArray=_(D.VBArray);function _(c){return typeof c=="function"}m=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Y,M){(function(D,m,S){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=f(P);function f(a){return a&&a.__esModule?a:{default:a}}var _=j("./capability"),c=j("inherits"),o=j("./response"),i=j("readable-stream"),n=j("to-arraybuffer"),u=o.IncomingMessage,p=o.readyStates;function h(a,l){return _.fetch&&l?"fetch":_.mozchunkedarraybuffer?"moz-chunked-arraybuffer":_.msstream?"ms-stream":_.arraybuffer&&a?"arraybuffer":_.vbArray&&a?"text:vbarray":"text"}var v=Y.exports=function(a){var l=this;i.Writable.call(l),l._opts=a,l._body=[],l._headers={},a.auth&&l.setHeader("Authorization","Basic "+new S(a.auth).toString("base64")),(0,d.default)(a.headers).forEach(function(w){l.setHeader(w,a.headers[w])});var t,C=!0;if(a.mode==="disable-fetch"||"requestTimeout"in a&&!_.abortController)C=!1,t=!0;else if(a.mode==="prefer-streaming")t=!1;else if(a.mode==="allow-wrong-content-type")t=!_.overrideMimeType;else if(!a.mode||a.mode==="default"||a.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");l._mode=h(t,C),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};c(v,i.Writable),v.prototype.setHeader=function(a,l){var t=this,C=a.toLowerCase();if(E.indexOf(C)!==-1)return;t._headers[C]={name:a,value:l}},v.prototype.getHeader=function(a){var l=this._headers[a.toLowerCase()];return l?l.value:null},v.prototype.removeHeader=function(a){var l=this;delete l._headers[a.toLowerCase()]},v.prototype._onFinish=function(){var a=this;if(a._destroyed)return;var l=a._opts,t=a._headers,C=null;l.method!=="GET"&&l.method!=="HEAD"&&(_.arraybuffer?C=n(S.concat(a._body)):_.blobConstructor?C=new m.Blob(a._body.map(function(b){return n(b)}),{type:(t["content-type"]||{}).value||""}):C=S.concat(a._body).toString());var w=[];if((0,d.default)(t).forEach(function(b){var y=t[b].name,T=t[b].value;Array.isArray(T)?T.forEach(function(k){w.push([y,k])}):w.push([y,T])}),a._mode==="fetch"){var s=null,L=null;if(_.abortController){var O=new AbortController;s=O.signal,a._fetchAbortController=O,"requestTimeout"in l&&l.requestTimeout!==0&&(a._fetchTimer=m.setTimeout(function(){a.emit("requestTimeout"),a._fetchAbortController&&a._fetchAbortController.abort()},l.requestTimeout))}m.fetch(a._opts.url,{method:a._opts.method,headers:w,body:C||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:s}).then(function(b){a._fetchResponse=b,a._connect()},function(b){m.clearTimeout(a._fetchTimer),a._destroyed||a.emit("error",b)})}else{var x=a._xhr=new m.XMLHttpRequest;try{x.open(a._opts.method,a._opts.url,!0)}catch(b){D.nextTick(function(){a.emit("error",b)});return}"responseType"in x&&(x.responseType=a._mode.split(":")[0]),"withCredentials"in x&&(x.withCredentials=!!l.withCredentials),a._mode==="text"&&"overrideMimeType"in x&&x.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(x.timeout=l.requestTimeout,x.ontimeout=function(){a.emit("requestTimeout")}),w.forEach(function(b){x.setRequestHeader(b[0],b[1])}),a._response=null,x.onreadystatechange=function(){switch(x.readyState){case p.LOADING:case p.DONE:a._onXHRProgress();break}},a._mode==="moz-chunked-arraybuffer"&&(x.onprogress=function(){a._onXHRProgress()}),x.onerror=function(){if(a._destroyed)return;a.emit("error",new Error("XHR error"))};try{x.send(C)}catch(b){D.nextTick(function(){a.emit("error",b)});return}}};function g(a){try{var l=a.status;return l!==null&&l!==0}catch(t){return!1}}v.prototype._onXHRProgress=function(){var a=this;if(!g(a._xhr)||a._destroyed)return;a._response||a._connect(),a._response._onXHRProgress()},v.prototype._connect=function(){var a=this;if(a._destroyed)return;a._response=new u(a._xhr,a._fetchResponse,a._mode,a._fetchTimer),a._response.on("error",function(l){a.emit("error",l)}),a.emit("response",a._response)},v.prototype._write=function(a,l,t){var C=this;C._body.push(a),t()},v.prototype.abort=v.prototype.destroy=function(){var a=this;a._destroyed=!0,m.clearTimeout(a._fetchTimer),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort()},v.prototype.end=function(a,l,t){var C=this;typeof a=="function"&&(t=a,a=void 0),i.Writable.prototype.end.call(C,a,l,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,Y,M){(function(D,m,S){"use strict";var P=j("babel-runtime/core-js/promise"),d=f(P);function f(u){return u&&u.__esModule?u:{default:u}}var _=j("./capability"),c=j("inherits"),o=j("readable-stream"),i=M.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=M.IncomingMessage=function(u,p,h,v){var g=this;if(o.Readable.call(g),g._mode=h,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",function(){D.nextTick(function(){g.emit("close")})}),h==="fetch"){var E=function s(){l.read().then(function(L){if(g._destroyed)return;if(L.done){m.clearTimeout(v),g.push(null);return}g.push(new S(L.value)),s()}).catch(function(L){m.clearTimeout(v),g._destroyed||g.emit("error",L)})};if(g._fetchResponse=p,g.url=p.url,g.statusCode=p.status,g.statusMessage=p.statusText,p.headers.forEach(function(s,L){g.headers[L.toLowerCase()]=s,g.rawHeaders.push(L,s)}),_.writableStream){var a=new WritableStream({write:function(L){return new d.default(function(O,x){g._destroyed?x():g.push(new S(L))?O():g._resumeFetch=O})},close:function(){m.clearTimeout(v),g._destroyed||g.push(null)},abort:function(L){g._destroyed||g.emit("error",L)}});try{p.body.pipeTo(a).catch(function(s){m.clearTimeout(v),g._destroyed||g.emit("error",s)});return}catch(s){}}var l=p.body.getReader();E()}else{g._xhr=u,g._pos=0,g.url=u.responseURL,g.statusCode=u.status,g.statusMessage=u.statusText;var t=u.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(s){var L=s.match(/^([^:]+):\s*(.*)/);if(L){var O=L[1].toLowerCase();O==="set-cookie"?(g.headers[O]===void 0&&(g.headers[O]=[]),g.headers[O].push(L[2])):g.headers[O]!==void 0?g.headers[O]+=", "+L[2]:g.headers[O]=L[2],g.rawHeaders.push(L[1],L[2])}}),g._charset="x-user-defined",!_.overrideMimeType){var C=g.rawHeaders["mime-type"];if(C){var w=C.match(/;\s*charset=([^;])(;|$)/);w&&(g._charset=w[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};c(n,o.Readable),n.prototype._read=function(){var u=this,p=u._resumeFetch;p&&(u._resumeFetch=null,p())},n.prototype._onXHRProgress=function(){var u=this,p=u._xhr,h=null;switch(u._mode){case"text:vbarray":if(p.readyState!==i.DONE)break;try{h=new m.VBArray(p.responseBody).toArray()}catch(l){}if(h!==null){u.push(new S(h));break}case"text":try{h=p.responseText}catch(l){u._mode="text:vbarray";break}if(h.length>u._pos){var v=h.substr(u._pos);if(u._charset==="x-user-defined"){for(var g=new S(v.length),E=0;E<v.length;E++)g[E]=v.charCodeAt(E)&255;u.push(g)}else u.push(v,u._charset);u._pos=h.length}break;case"arraybuffer":if(p.readyState!==i.DONE||!p.response)break;h=p.response,u.push(new S(new Uint8Array(h)));break;case"moz-chunked-arraybuffer":if(h=p.response,p.readyState!==i.LOADING||!h)break;u.push(new S(new Uint8Array(h)));break;case"ms-stream":if(h=p.response,p.readyState!==i.LOADING)break;var a=new m.MSStreamReader;a.onprogress=function(){a.result.byteLength>u._pos&&(u.push(new S(new Uint8Array(a.result.slice(u._pos)))),u._pos=a.result.byteLength)},a.onload=function(){u.push(null)},a.readAsArrayBuffer(h);break}u._xhr.readyState===i.DONE&&u._mode!=="ms-stream"&&u.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,Y,M){"use strict";var D=j("safe-buffer").Buffer,m=D.isEncoding||function(a){a=""+a;switch(a&&a.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 S(a){if(!a)return"utf8";for(var l;;)switch(a){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 a;default:if(l)return;a=(""+a).toLowerCase(),l=!0}}function P(a){var l=S(a);if(typeof l!="string"&&(D.isEncoding===m||!m(a)))throw new Error("Unknown encoding: "+a);return l||a}M.StringDecoder=d;function d(a){this.encoding=P(a);var l;switch(this.encoding){case"utf16le":this.text=u,this.end=p,l=4;break;case"utf8":this.fillLast=o,l=4;break;case"base64":this.text=h,this.end=v,l=3;break;default:this.write=g,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=D.allocUnsafe(l)}d.prototype.write=function(a){if(a.length===0)return"";var l,t;if(this.lastNeed){if(l=this.fillLast(a),l===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<a.length?l?l+this.text(a,t):this.text(a,t):l||""},d.prototype.end=n,d.prototype.text=i,d.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length};function f(a){return a<=127?0:a>>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function _(a,l,t){var C=l.length-1;if(C<t)return 0;var w=f(l[C]);return w>=0?(w>0&&(a.lastNeed=w-1),w):--C<t||w===-2?0:(w=f(l[C]),w>=0?(w>0&&(a.lastNeed=w-2),w):--C<t||w===-2?0:(w=f(l[C]),w>=0?(w>0&&(w===2?w=0:a.lastNeed=w-3),w):0))}function c(a,l,t){if((l[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function o(a){var l=this.lastTotal-this.lastNeed,t=c(this,a,l);if(t!==void 0)return t;if(this.lastNeed<=a.length)return a.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,l,0,a.length),this.lastNeed-=a.length}function i(a,l){var t=_(this,a,l);if(!this.lastNeed)return a.toString("utf8",l);this.lastTotal=t;var C=a.length-(t-this.lastNeed);return a.copy(this.lastChar,0,C),a.toString("utf8",l,C)}function n(a){var l=a&&a.length?this.write(a):"";return this.lastNeed?l+"\uFFFD":l}function u(a,l){if((a.length-l)%2===0){var t=a.toString("utf16le",l);if(t){var C=t.charCodeAt(t.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",l,a.length-1)}function p(a){var l=a&&a.length?this.write(a):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,t)}return l}function h(a,l){var t=(a.length-l)%3;return t===0?a.toString("base64",l):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",l,a.length-t))}function v(a){var l=a&&a.length?this.write(a):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function g(a){return a.toString(this.encoding)}function E(a){return a&&a.length?this.write(a):""}},{"safe-buffer":228}],236:[function(j,Y,M){(function(D,m){var S=j("process/browser.js").nextTick,P=Function.prototype.apply,d=Array.prototype.slice,f={},_=0;M.setTimeout=function(){return new c(P.call(setTimeout,window,arguments),clearTimeout)},M.setInterval=function(){return new c(P.call(setInterval,window,arguments),clearInterval)},M.clearTimeout=M.clearInterval=function(o){o.close()};function c(o,i){this._id=o,this._clearFn=i}c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},M.enroll=function(o,i){clearTimeout(o._idleTimeoutId),o._idleTimeout=i},M.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},M._unrefActive=M.active=function(o){clearTimeout(o._idleTimeoutId);var i=o._idleTimeout;i>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},i))},M.setImmediate=typeof D=="function"?D:function(o){var i=_++,n=arguments.length<2?!1:d.call(arguments,1);return f[i]=!0,S(function(){f[i]&&(n?o.apply(null,n):o.call(null),M.clearImmediate(i))}),i},M.clearImmediate=typeof m=="function"?m:function(o){delete f[o]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Y,M){var D=j("buffer").Buffer;Y.exports=function(m){if(m instanceof Uint8Array){if(m.byteOffset===0&&m.byteLength===m.buffer.byteLength)return m.buffer;if(typeof m.buffer.slice=="function")return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(D.isBuffer(m)){for(var S=new Uint8Array(m.length),P=m.length,d=0;d<P;d++)S[d]=m[d];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,Y,M){"use strict";var D=j("punycode"),m=j("./util");M.parse=l,M.resolve=C,M.resolveObject=w,M.format=t,M.Url=S;function S(){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 P=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["<",">",'"',"`"," ","\r",`
`," "],c=["{","}","|","\\","^","`"].concat(_),o=["'"].concat(c),i=["%","/","?",";","#"].concat(o),n=["/","?","#"],u=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+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},a=j("querystring");function l(s,L,O){if(s&&m.isObject(s)&&s instanceof S)return s;var x=new S;return x.parse(s,L,O),x}S.prototype.parse=function(s,L,O){if(!m.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var x=s.indexOf("?"),b=x!==-1&&x<s.indexOf("#")?"?":"#",y=s.split(b),T=/\\/g;y[0]=y[0].replace(T,"/"),s=y.join(b);var k=s;if(k=k.trim(),!O&&s.split("#").length===1){var N=f.exec(k);if(N)return this.path=k,this.href=k,this.pathname=N[1],N[2]?(this.search=N[2],L?this.query=a.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var I=P.exec(k);if(I){I=I[0];var W=I.toLowerCase();this.protocol=W,k=k.substr(I.length)}if(O||I||k.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=k.substr(0,2)==="//";K&&!(I&&g[I])&&(k=k.substr(2),this.slashes=!0)}if(!g[I]&&(K||I&&!E[I])){for(var U=-1,z=0;z<n.length;z++){var B=k.indexOf(n[z]);B!==-1&&(U===-1||B<U)&&(U=B)}var H,G;U===-1?G=k.lastIndexOf("@"):G=k.lastIndexOf("@",U),G!==-1&&(H=k.slice(0,G),k=k.slice(G+1),this.auth=decodeURIComponent(H)),U=-1;for(var z=0;z<i.length;z++){var B=k.indexOf(i[z]);B!==-1&&(U===-1||B<U)&&(U=B)}U===-1&&(U=k.length),this.host=k.slice(0,U),k=k.slice(U),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(/\./),z=0,ue=ie.length;z<ue;z++){var xe=ie[z];if(!xe)continue;if(!xe.match(p)){for(var Te="",se=0,ve=xe.length;se<ve;se++)xe.charCodeAt(se)>127?Te+="x":Te+=xe[se];if(!Te.match(p)){var de=ie.slice(0,z),ne=ie.slice(z+1),ae=xe.match(h);ae&&(de.push(ae[1]),ne.unshift(ae[2])),ne.length&&(k="/"+ne.join(".")+k),this.hostname=de.join(".");break}}}this.hostname.length>u?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=D.toASCII(this.hostname));var Z=this.port?":"+this.port:"",le=this.hostname||"";this.host=le+Z,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!v[W])for(var z=0,ue=o.length;z<ue;z++){var Q=o[z];if(k.indexOf(Q)===-1)continue;var q=encodeURIComponent(Q);q===Q&&(q=escape(Q)),k=k.split(Q).join(q)}var be=k.indexOf("#");be!==-1&&(this.hash=k.substr(be),k=k.slice(0,be));var te=k.indexOf("?");if(te!==-1?(this.search=k.substr(te),this.query=k.substr(te+1),L&&(this.query=a.parse(this.query)),k=k.slice(0,te)):L&&(this.search="",this.query={}),k&&(this.pathname=k),E[W]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Z=this.pathname||"",J=this.search||"";this.path=Z+J}return this.href=this.format(),this};function t(s){return m.isString(s)&&(s=l(s)),s instanceof S?s.format():S.prototype.format.call(s)}S.prototype.format=function(){var s=this.auth||"";s&&(s=encodeURIComponent(s),s=s.replace(/%3A/i,":"),s+="@");var L=this.protocol||"",O=this.pathname||"",x=this.hash||"",b=!1,y="";this.host?b=s+this.host:this.hostname&&(b=s+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(b+=":"+this.port)),this.query&&m.isObject(this.query)&&Object.keys(this.query).length&&(y=a.stringify(this.query));var T=this.search||y&&"?"+y||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||E[L])&&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(k){return encodeURIComponent(k)}),T=T.replace("#","%23"),L+b+O+T+x};function C(s,L){return l(s,!1,!0).resolve(L)}S.prototype.resolve=function(s){return this.resolveObject(l(s,!1,!0)).format()};function w(s,L){return s?l(s,!1,!0).resolveObject(L):L}S.prototype.resolveObject=function(s){if(m.isString(s)){var L=new S;L.parse(s,!1,!0),s=L}for(var O=new S,x=Object.keys(this),b=0;b<x.length;b++){var y=x[b];O[y]=this[y]}if(O.hash=s.hash,s.href==="")return O.href=O.format(),O;if(s.slashes&&!s.protocol){for(var T=Object.keys(s),k=0;k<T.length;k++){var N=T[k];N!=="protocol"&&(O[N]=s[N])}return E[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(s.protocol&&s.protocol!==O.protocol){if(!E[s.protocol]){for(var I=Object.keys(s),W=0;W<I.length;W++){var K=I[W];O[K]=s[K]}return O.href=O.format(),O}if(O.protocol=s.protocol,!s.host&&!g[s.protocol]){for(var ue=(s.pathname||"").split("/");ue.length&&!(s.host=ue.shift()););s.host||(s.host=""),s.hostname||(s.hostname=""),ue[0]!==""&&ue.unshift(""),ue.length<2&&ue.unshift(""),O.pathname=ue.join("/")}else O.pathname=s.pathname;if(O.search=s.search,O.query=s.query,O.host=s.host||"",O.auth=s.auth,O.hostname=s.hostname||s.host,O.port=s.port,O.pathname||O.search){var U=O.pathname||"",z=O.search||"";O.path=U+z}return O.slashes=O.slashes||s.slashes,O.href=O.format(),O}var B=O.pathname&&O.pathname.charAt(0)==="/",H=s.host||s.pathname&&s.pathname.charAt(0)==="/",G=H||B||O.host&&s.pathname,ee=G,ie=O.pathname&&O.pathname.split("/")||[],ue=s.pathname&&s.pathname.split("/")||[],xe=O.protocol&&!E[O.protocol];if(xe&&(O.hostname="",O.port=null,O.host&&(ie[0]===""?ie[0]=O.host:ie.unshift(O.host)),O.host="",s.protocol&&(s.hostname=null,s.port=null,s.host&&(ue[0]===""?ue[0]=s.host:ue.unshift(s.host)),s.host=null),G=G&&(ue[0]===""||ie[0]==="")),H)O.host=s.host||s.host===""?s.host:O.host,O.hostname=s.hostname||s.hostname===""?s.hostname:O.hostname,O.search=s.search,O.query=s.query,ie=ue;else if(ue.length)ie||(ie=[]),ie.pop(),ie=ie.concat(ue),O.search=s.search,O.query=s.query;else if(!m.isNullOrUndefined(s.search)){if(xe){O.hostname=O.host=ie.shift();var Te=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Te&&(O.auth=Te.shift(),O.host=O.hostname=Te.shift())}return O.search=s.search,O.query=s.query,(!m.isNull(O.pathname)||!m.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 se=ie.slice(-1)[0],ve=(O.host||s.host||ie.length>1)&&(se==="."||se==="..")||se==="",de=0,ne=ie.length;ne>=0;ne--)se=ie[ne],se==="."?ie.splice(ne,1):se===".."?(ie.splice(ne,1),de++):de&&(ie.splice(ne,1),de--);if(!G&&!ee)for(;de--;de)ie.unshift("..");G&&ie[0]!==""&&(!ie[0]||ie[0].charAt(0)!=="/")&&ie.unshift(""),ve&&ie.join("/").substr(-1)!=="/"&&ie.push("");var ae=ie[0]===""||ie[0]&&ie[0].charAt(0)==="/";if(xe){O.hostname=O.host=ae?"":ie.length?ie.shift():"";var Te=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Te&&(O.auth=Te.shift(),O.host=O.hostname=Te.shift())}return G=G||O.host&&ie.length,G&&!ae&&ie.unshift(""),ie.length?O.pathname=ie.join("/"):(O.pathname=null,O.path=null),(!m.isNull(O.pathname)||!m.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=s.auth||O.auth,O.slashes=O.slashes||s.slashes,O.href=O.format(),O},S.prototype.parseHost=function(){var s=this.host,L=d.exec(s);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),s=s.substr(0,s.length-L.length)),s&&(this.hostname=s)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Y,M){"use strict";Y.exports={isString:function(D){return typeof D=="string"},isObject:function(D){return typeof D=="object"&&D!==null},isNull:function(D){return D===null},isNullOrUndefined:function(D){return D==null}}},{}],240:[function(j,Y,M){(function(D){Y.exports=m;function m(P,d){if(S("noDeprecation"))return P;var f=!1;function _(){if(!f){if(S("throwDeprecation"))throw new Error(d);S("traceDeprecation")?console.trace(d):console.warn(d),f=!0}return P.apply(this,arguments)}return _}function S(P){try{if(!D.localStorage)return!1}catch(f){return!1}var d=D.localStorage[P];return d==null?!1:String(d).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Y,M){typeof Object.create=="function"?Y.exports=function(m,S){m.super_=S,m.prototype=Object.create(S.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(m,S){m.super_=S;var P=function(){};P.prototype=S.prototype,m.prototype=new P,m.prototype.constructor=m}},{}],242:[function(j,Y,M){Y.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],243:[function(j,Y,M){(function(D,m){var S=/%[sdj%]/g;M.format=function(U){if(!C(U)){for(var z=[],B=0;B<arguments.length;B++)z.push(f(arguments[B]));return z.join(" ")}for(var B=1,H=arguments,G=H.length,ee=String(U).replace(S,function(ue){if(ue==="%%")return"%";if(B>=G)return ue;switch(ue){case"%s":return String(H[B++]);case"%d":return Number(H[B++]);case"%j":try{return JSON.stringify(H[B++])}catch(xe){return"[Circular]"}default:return ue}}),ie=H[B];B<G;ie=H[++B])a(ie)||!O(ie)?ee+=" "+ie:ee+=" "+f(ie);return ee},M.deprecate=function(U,z){if(s(m.process))return function(){return M.deprecate(U,z).apply(this,arguments)};if(D.noDeprecation===!0)return U;var B=!1;function H(){if(!B){if(D.throwDeprecation)throw new Error(z);D.traceDeprecation?console.trace(z):console.error(z),B=!0}return U.apply(this,arguments)}return H};var P={},d;M.debuglog=function(U){if(s(d)&&(d=D.env.NODE_DEBUG||""),U=U.toUpperCase(),!P[U])if(new RegExp("\\b"+U+"\\b","i").test(d)){var z=D.pid;P[U]=function(){var B=M.format.apply(M,arguments);console.error("%s %d: %s",U,z,B)}}else P[U]=function(){};return P[U]};function f(U,z){var B={seen:[],stylize:c};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),E(z)?B.showHidden=z:z&&M._extend(B,z),s(B.showHidden)&&(B.showHidden=!1),s(B.depth)&&(B.depth=2),s(B.colors)&&(B.colors=!1),s(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=_),i(B,U,B.depth)}M.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _(U,z){var B=f.styles[z];return B?"["+f.colors[B][0]+"m"+U+"["+f.colors[B][1]+"m":U}function c(U,z){return U}function o(U){var z={};return U.forEach(function(B,H){z[B]=!0}),z}function i(U,z,B){if(U.customInspect&&z&&y(z.inspect)&&z.inspect!==M.inspect&&!(z.constructor&&z.constructor.prototype===z)){var H=z.inspect(B,U);return C(H)||(H=i(U,H,B)),H}var G=n(U,z);if(G)return G;var ee=Object.keys(z),ie=o(ee);if(U.showHidden&&(ee=Object.getOwnPropertyNames(z)),b(z)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return u(z);if(ee.length===0){if(y(z)){var ue=z.name?": "+z.name:"";return U.stylize("[Function"+ue+"]","special")}if(L(z))return U.stylize(RegExp.prototype.toString.call(z),"regexp");if(x(z))return U.stylize(Date.prototype.toString.call(z),"date");if(b(z))return u(z)}var xe="",Te=!1,se=["{","}"];if(g(z)&&(Te=!0,se=["[","]"]),y(z)){var ve=z.name?": "+z.name:"";xe=" [Function"+ve+"]"}if(L(z)&&(xe=" "+RegExp.prototype.toString.call(z)),x(z)&&(xe=" "+Date.prototype.toUTCString.call(z)),b(z)&&(xe=" "+u(z)),ee.length===0&&(!Te||z.length==0))return se[0]+xe+se[1];if(B<0)return L(z)?U.stylize(RegExp.prototype.toString.call(z),"regexp"):U.stylize("[Object]","special");U.seen.push(z);var de;return Te?de=p(U,z,B,ie,ee):de=ee.map(function(ne){return h(U,z,B,ie,ne,Te)}),U.seen.pop(),v(de,xe,se)}function n(U,z){if(s(z))return U.stylize("undefined","undefined");if(C(z)){var B="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(B,"string")}if(t(z))return U.stylize(""+z,"number");if(E(z))return U.stylize(""+z,"boolean");if(a(z))return U.stylize("null","null")}function u(U){return"["+Error.prototype.toString.call(U)+"]"}function p(U,z,B,H,G){for(var ee=[],ie=0,ue=z.length;ie<ue;++ie)K(z,String(ie))?ee.push(h(U,z,B,H,String(ie),!0)):ee.push("");return G.forEach(function(xe){xe.match(/^\d+$/)||ee.push(h(U,z,B,H,xe,!0))}),ee}function h(U,z,B,H,G,ee){var ie,ue,xe;if(xe=Object.getOwnPropertyDescriptor(z,G)||{value:z[G]},xe.get?xe.set?ue=U.stylize("[Getter/Setter]","special"):ue=U.stylize("[Getter]","special"):xe.set&&(ue=U.stylize("[Setter]","special")),K(H,G)||(ie="["+G+"]"),ue||(U.seen.indexOf(xe.value)<0?(a(B)?ue=i(U,xe.value,null):ue=i(U,xe.value,B-1),ue.indexOf(`
`)>-1&&(ee?ue=ue.split(`
`).map(function(Te){return" "+Te}).join(`
`).substr(2):ue=`
`+ue.split(`
`).map(function(Te){return" "+Te}).join(`
`))):ue=U.stylize("[Circular]","special")),s(ie)){if(ee&&G.match(/^\d+$/))return ue;ie=JSON.stringify(""+G),ie.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ie=ie.substr(1,ie.length-2),ie=U.stylize(ie,"name")):(ie=ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ie=U.stylize(ie,"string"))}return ie+": "+ue}function v(U,z,B){var H=0,G=U.reduce(function(ee,ie){return H++,ie.indexOf(`
`)>=0&&H++,ee+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?B[0]+(z===""?"":z+`
`)+" "+U.join(`,
`)+" "+B[1]:B[0]+z+" "+U.join(", ")+" "+B[1]}function g(U){return Array.isArray(U)}M.isArray=g;function E(U){return typeof U=="boolean"}M.isBoolean=E;function a(U){return U===null}M.isNull=a;function l(U){return U==null}M.isNullOrUndefined=l;function t(U){return typeof U=="number"}M.isNumber=t;function C(U){return typeof U=="string"}M.isString=C;function w(U){return typeof U=="symbol"}M.isSymbol=w;function s(U){return U===void 0}M.isUndefined=s;function L(U){return O(U)&&k(U)==="[object RegExp]"}M.isRegExp=L;function O(U){return typeof U=="object"&&U!==null}M.isObject=O;function x(U){return O(U)&&k(U)==="[object Date]"}M.isDate=x;function b(U){return O(U)&&(k(U)==="[object Error]"||U instanceof Error)}M.isError=b;function y(U){return typeof U=="function"}M.isFunction=y;function T(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U=="undefined"}M.isPrimitive=T,M.isBuffer=j("./support/isBuffer");function k(U){return Object.prototype.toString.call(U)}function N(U){return U<10?"0"+U.toString(10):U.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function W(){var U=new Date,z=[N(U.getHours()),N(U.getMinutes()),N(U.getSeconds())].join(":");return[U.getDate(),I[U.getMonth()],z].join(" ")}M.log=function(){console.log("%s - %s",W(),M.format.apply(M,arguments))},M.inherits=j("inherits"),M._extend=function(U,z){if(!z||!O(z))return U;for(var B=Object.keys(z),H=B.length;H--;)U[B[H]]=z[B[H]];return U};function K(U,z){return Object.prototype.hasOwnProperty.call(U,z)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,Y,M){"use strict";(function(){"use strict";M.stripBOM=function(D){return D[0]==="\uFEFF"?D.substring(1):D}}).call(void 0)},{}],245:[function(j,Y,M){"use strict";var D=j("babel-runtime/helpers/typeof"),m=d(D),S=j("babel-runtime/core-js/object/keys"),P=d(S);function d(f){return f&&f.__esModule?f:{default:f}}(function(){"use strict";var f,_,c,o,i,n={}.hasOwnProperty;f=j("xmlbuilder"),_=j("./defaults").defaults,o=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},i=function(p){return"<![CDATA["+c(p)+"]]>"},c=function(p){return p.replace("]]>","]]]]><![CDATA[>")},M.Builder=function(){function u(p){var h,v,g;this.options={},v=_["0.2"];for(h in v){if(!n.call(v,h))continue;g=v[h],this.options[h]=g}for(h in p){if(!n.call(p,h))continue;g=p[h],this.options[h]=g}}return u.prototype.buildObject=function(p){var h,v,g,E,a;return h=this.options.attrkey,v=this.options.charkey,(0,P.default)(p).length===1&&this.options.rootName===_["0.2"].rootName?(a=(0,P.default)(p)[0],p=p[a]):a=this.options.rootName,g=function(l){return function(t,C){var w,s,L,O,x,b;if((typeof C=="undefined"?"undefined":(0,m.default)(C))!=="object")l.options.cdata&&o(C)?t.raw(i(C)):t.txt(C);else if(Array.isArray(C))for(O in C){if(!n.call(C,O))continue;s=C[O];for(x in s)L=s[x],t=g(t.ele(x),L).up()}else for(x in C){if(!n.call(C,x))continue;if(s=C[x],x===h){if((typeof s=="undefined"?"undefined":(0,m.default)(s))==="object")for(w in s)b=s[w],t=t.att(w,b)}else if(x===v)l.options.cdata&&o(s)?t=t.raw(i(s)):t=t.txt(s);else if(Array.isArray(s))for(O in s){if(!n.call(s,O))continue;L=s[O],typeof L=="string"?l.options.cdata&&o(L)?t=t.ele(x).raw(i(L)).up():t=t.ele(x,L).up():t=g(t.ele(x),L).up()}else(typeof s=="undefined"?"undefined":(0,m.default)(s))==="object"?t=g(t.ele(x),s).up():typeof s=="string"&&l.options.cdata&&o(s)?t=t.ele(x).raw(i(s)).up():(s==null&&(s=""),t=t.ele(x,s.toString()).up())}return t}}(this),E=f.create(a,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(E,p).end(this.options.renderOpts)},u}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,Y,M){"use strict";(function(){M.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,Y,M){"use strict";var D=j("babel-runtime/core-js/promise"),m=o(D),S=j("babel-runtime/core-js/object/get-own-property-names"),P=o(S),d=j("babel-runtime/core-js/object/keys"),f=o(d),_=j("babel-runtime/helpers/typeof"),c=o(_);function o(i){return i&&i.__esModule?i:{default:i}}(function(){"use strict";var i,n,u,p,h,v,g,E,a=function(w,s){return function(){return w.apply(s,arguments)}},l=function(w,s){for(var L in s)t.call(s,L)&&(w[L]=s[L]);function O(){this.constructor=w}return O.prototype=s.prototype,w.prototype=new O,w.__super__=s.prototype,w},t={}.hasOwnProperty;g=j("sax"),u=j("events"),i=j("./bom"),v=j("./processors"),E=j("timers").setImmediate,n=j("./defaults").defaults,p=function(w){return(typeof w=="undefined"?"undefined":(0,c.default)(w))==="object"&&w!=null&&(0,f.default)(w).length===0},h=function(w,s,L){var O,x,b;for(O=0,x=w.length;O<x;O++)b=w[O],s=b(s,L);return s},M.Parser=function(C){l(w,C);function w(s){this.parseStringPromise=a(this.parseStringPromise,this),this.parseString=a(this.parseString,this),this.reset=a(this.reset,this),this.assignOrPush=a(this.assignOrPush,this),this.processAsync=a(this.processAsync,this);var L,O,x;if(!(this instanceof M.Parser))return new M.Parser(s);this.options={},O=n["0.2"];for(L in O){if(!t.call(O,L))continue;x=O[L],this.options[L]=x}for(L in s){if(!t.call(s,L))continue;x=s[L],this.options[L]=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 w.prototype.processAsync=function(){var s,L;try{return this.remaining.length<=this.options.chunkSize?(s=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(s),this.saxParser.close()):(s=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(s),E(this.processAsync))}catch(O){if(L=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(L)}},w.prototype.assignOrPush=function(s,L,O){return L in s?(s[L]instanceof Array||(s[L]=[s[L]]),s[L].push(O)):this.options.explicitArray?s[L]=[O]:s[L]=O},w.prototype.reset=function(){var s,L,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=[],s=this.options.attrkey,L=this.options.charkey,this.saxParser.onopentag=function(b){return function(y){var T,k,N,I,W;if(N={},N[L]="",!b.options.ignoreAttrs){W=y.attributes;for(T in W){if(!t.call(W,T))continue;!(s in N)&&!b.options.mergeAttrs&&(N[s]={}),k=b.options.attrValueProcessors?h(b.options.attrValueProcessors,y.attributes[T],T):y.attributes[T],I=b.options.attrNameProcessors?h(b.options.attrNameProcessors,T):T,b.options.mergeAttrs?b.assignOrPush(N,I,k):N[s][I]=k}}return N["#name"]=b.options.tagNameProcessors?h(b.options.tagNameProcessors,y.name):y.name,b.options.xmlns&&(N[b.options.xmlnskey]={uri:y.uri,local:y.local}),x.push(N)}}(this),this.saxParser.onclosetag=function(b){return function(){var y,T,k,N,I,W,K,U,z,B;if(W=x.pop(),I=W["#name"],(!b.options.explicitChildren||!b.options.preserveChildrenOrder)&&delete W["#name"],W.cdata===!0&&(y=W.cdata,delete W.cdata),z=x[x.length-1],W[L].match(/^\s*$/)&&!y?(T=W[L],delete W[L]):(b.options.trim&&(W[L]=W[L].trim()),b.options.normalize&&(W[L]=W[L].replace(/\s{2,}/g," ").trim()),W[L]=b.options.valueProcessors?h(b.options.valueProcessors,W[L],I):W[L],(0,f.default)(W).length===1&&L in W&&!b.EXPLICIT_CHARKEY&&(W=W[L])),p(W)&&(W=b.options.emptyTag!==""?b.options.emptyTag:T),b.options.validator!=null&&(B="/"+function(){var H,G,ee;for(ee=[],H=0,G=x.length;H<G;H++)N=x[H],ee.push(N["#name"]);return ee}().concat(I).join("/"),function(){var H;try{return W=b.options.validator(B,z&&z[I],W)}catch(G){return H=G,b.emit("error",H)}}()),b.options.explicitChildren&&!b.options.mergeAttrs&&(typeof W=="undefined"?"undefined":(0,c.default)(W))==="object"){if(!b.options.preserveChildrenOrder)N={},b.options.attrkey in W&&(N[b.options.attrkey]=W[b.options.attrkey],delete W[b.options.attrkey]),!b.options.charsAsChildren&&b.options.charkey in W&&(N[b.options.charkey]=W[b.options.charkey],delete W[b.options.charkey]),(0,P.default)(W).length>0&&(N[b.options.childkey]=W),W=N;else if(z){z[b.options.childkey]=z[b.options.childkey]||[],K={};for(k in W){if(!t.call(W,k))continue;K[k]=W[k]}z[b.options.childkey].push(K),delete W["#name"],(0,f.default)(W).length===1&&L in W&&!b.EXPLICIT_CHARKEY&&(W=W[L])}}return x.length>0?b.assignOrPush(z,I,W):(b.options.explicitRoot&&(U=W,W={},W[I]=U),b.resultObject=W,b.saxParser.ended=!0,b.emit("end",b.resultObject))}}(this),O=function(b){return function(y){var T,k;if(k=x[x.length-1],k)return k[L]+=y,b.options.explicitChildren&&b.options.preserveChildrenOrder&&b.options.charsAsChildren&&(b.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(k[b.options.childkey]=k[b.options.childkey]||[],T={"#name":"__text__"},T[L]=y,b.options.normalize&&(T[L]=T[L].replace(/\s{2,}/g," ").trim()),k[b.options.childkey].push(T)),k}}(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)},w.prototype.parseString=function(s,L){var O;L!=null&&typeof L=="function"&&(this.on("end",function(x){return this.reset(),L(null,x)}),this.on("error",function(x){return this.reset(),L(x)}));try{return s=s.toString(),s.trim()===""?(this.emit("end",null),!0):(s=i.stripBOM(s),this.options.async?(this.remaining=s,E(this.processAsync),this.saxParser):this.saxParser.write(s).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}},w.prototype.parseStringPromise=function(s){return new m.default(function(L){return function(O,x){return L.parseString(s,function(b,y){return b?x(b):O(y)})}}(this))},w}(u),M.parseString=function(C,w,s){var L,O,x;return s!=null?(typeof s=="function"&&(L=s),(typeof w=="undefined"?"undefined":(0,c.default)(w))==="object"&&(O=w)):(typeof w=="function"&&(L=w),O={}),x=new M.Parser(O),x.parseString(C,L)},M.parseStringPromise=function(C,w){var s,L;return(typeof w=="undefined"?"undefined":(0,c.default)(w))==="object"&&(s=w),L=new M.Parser(s),L.parseStringPromise(C)}}).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,Y,M){"use strict";(function(){"use strict";var D;D=new RegExp(/(?!xmlns)^.*:/),M.normalize=function(m){return m.toLowerCase()},M.firstCharLowerCase=function(m){return m.charAt(0).toLowerCase()+m.slice(1)},M.stripPrefix=function(m){return m.replace(D,"")},M.parseNumbers=function(m){return isNaN(m)||(m=m%1===0?parseInt(m,10):parseFloat(m)),m},M.parseBooleans=function(m){return/^(?:true|false)$/i.test(m)&&(m=m.toLowerCase()==="true"),m}}).call(void 0)},{}],249:[function(j,Y,M){"use strict";(function(){"use strict";var D,m,S,P,d=function(c,o){for(var i in o)f.call(o,i)&&(c[i]=o[i]);function n(){this.constructor=c}return n.prototype=o.prototype,c.prototype=new n,c.__super__=o.prototype,c},f={}.hasOwnProperty;m=j("./defaults"),D=j("./builder"),S=j("./parser"),P=j("./processors"),M.defaults=m.defaults,M.processors=P,M.ValidationError=function(_){d(c,_);function c(o){this.message=o}return c}(Error),M.Builder=D.Builder,M.Parser=S.Parser,M.parseString=S.parseString,M.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Y,M){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Y,M){"use strict";(function(){Y.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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/get-prototype-of"),m=_(D),S=j("babel-runtime/helpers/typeof"),P=_(S),d=j("babel-runtime/core-js/object/assign"),f=_(d);function _(c){return c&&c.__esModule?c:{default:c}}(function(){var c,o,i,n,u,p,h,v=[].slice,g={}.hasOwnProperty;c=function(){var a,l,t,C,w,s;if(s=arguments[0],w=2<=arguments.length?v.call(arguments,1):[],u(f.default))f.default.apply(null,arguments);else for(a=0,t=w.length;a<t;a++)if(C=w[a],C!=null)for(l in C){if(!g.call(C,l))continue;s[l]=C[l]}return s},u=function(a){return!!a&&Object.prototype.toString.call(a)==="[object Function]"},p=function(a){var l;return!!a&&((l=typeof a=="undefined"?"undefined":(0,P.default)(a))==="function"||l==="object")},i=function(a){return u(Array.isArray)?Array.isArray(a):Object.prototype.toString.call(a)==="[object Array]"},n=function(a){var l;if(i(a))return!a.length;for(l in a){if(!g.call(a,l))continue;return!1}return!0},h=function(a){var l,t;return p(a)&&(t=(0,m.default)(a))&&(l=t.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},o=function(a){return u(a.valueOf)?a.valueOf():a},Y.exports.assign=c,Y.exports.isFunction=u,Y.exports.isObject=p,Y.exports.isArray=i,Y.exports.isEmpty=n,Y.exports.isPlainObject=h,Y.exports.getValue=o}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(j,Y,M){"use strict";(function(){Y.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f;P=j("./NodeType"),f=j("./XMLNode"),Y.exports=d=function(){function _(c,o,i){if(this.parent=c,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(i),this.type=P.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(_.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(_.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(_.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(_.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(_.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(_.prototype,"specified",{get:function(){return!0}}),_.prototype.clone=function(){return(0,m.default)(this)},_.prototype.toString=function(c){return this.options.writer.attribute(this,this.options.writer.filterOptions(c))},_.prototype.debugInfo=function(c){return c=c||this.name,c==null?"parent: <"+this.parent.name+">":"attribute: {"+c+"}, parent: <"+this.parent.name+">"},_.prototype.isEqualNode=function(c){return c.namespaceURI!==this.namespaceURI||(c.prefix!==this.prefix||c.localName!==this.localName)?!1:!(c.value!==this.value)},_}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;P=j("./NodeType"),f=j("./XMLCharacterData"),Y.exports=d=function(o){_(i,o);function i(n,u){if(i.__super__.constructor.call(this,n),u==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=P.CData,this.value=this.stringify.cdata(u)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},i}(f)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f=function(o,i){for(var n in i)_.call(i,n)&&(o[n]=i[n]);function u(){this.constructor=o}return u.prototype=i.prototype,o.prototype=new u,o.__super__=i.prototype,o},_={}.hasOwnProperty;d=j("./XMLNode"),Y.exports=P=function(c){f(o,c);function o(i){o.__super__.constructor.call(this,i),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),o.prototype.clone=function(){return(0,m.default)(this)},o.prototype.substringData=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(i,n,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(i){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.data!==this.data):!1},o}(d)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;P=j("./NodeType"),d=j("./XMLCharacterData"),Y.exports=f=function(o){_(i,o);function i(n,u){if(i.__super__.constructor.call(this,n),u==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=P.Comment,this.value=this.stringify.comment(u)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},i}(d)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=d(D),S=j("babel-runtime/core-js/object/create"),P=d(S);function d(f){return f&&f.__esModule?f:{default:f}}(function(){var f,_,c;_=j("./XMLDOMErrorHandler"),c=j("./XMLDOMStringList"),Y.exports=f=function(){function o(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new _,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=i=(0,P.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new c((0,m.default)(this.defaultParams))}}),o.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},o.prototype.canSetParameter=function(i,n){return!0},o.prototype.setParameter=function(i,n){return n!=null?this.params[i]=n:delete this.params[i]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Y,M){"use strict";(function(){var D;Y.exports=D=function(){function m(){}return m.prototype.handleError=function(S){throw new Error(S)},m}()}).call(void 0)},{}],260:[function(j,Y,M){"use strict";(function(){var D;Y.exports=D=function(){function m(){}return m.prototype.hasFeature=function(S,P){return!0},m.prototype.createDocumentType=function(S,P,d){throw new Error("This DOM method is not implemented.")},m.prototype.createDocument=function(S,P,d){throw new Error("This DOM method is not implemented.")},m.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},m.prototype.getFeature=function(S,P){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{}],261:[function(j,Y,M){"use strict";(function(){var D;Y.exports=D=function(){function m(S){this.arr=S||[]}return Object.defineProperty(m.prototype,"length",{get:function(){return this.arr.length}}),m.prototype.item=function(S){return this.arr[S]||null},m.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},m}()}).call(void 0)},{}],262:[function(j,Y,M){"use strict";(function(){var D,m,S,P=function(_,c){for(var o in c)d.call(c,o)&&(_[o]=c[o]);function i(){this.constructor=_}return i.prototype=c.prototype,_.prototype=new i,_.__super__=c.prototype,_},d={}.hasOwnProperty;S=j("./XMLNode"),D=j("./NodeType"),Y.exports=m=function(f){P(_,f);function _(c,o,i,n,u,p){if(_.__super__.constructor.call(this,c),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!u)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(u.indexOf("#")!==0&&(u="#"+u),!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(p&&!u.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=D.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(n),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=u}return _.prototype.toString=function(c){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(c))},_}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Y,M){"use strict";(function(){var D,m,S,P=function(_,c){for(var o in c)d.call(c,o)&&(_[o]=c[o]);function i(){this.constructor=_}return i.prototype=c.prototype,_.prototype=new i,_.__super__=c.prototype,_},d={}.hasOwnProperty;S=j("./XMLNode"),D=j("./NodeType"),Y.exports=m=function(f){P(_,f);function _(c,o,i){if(_.__super__.constructor.call(this,c),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(o),this.type=D.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return _.prototype.toString=function(c){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(c))},_}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d=function(c,o){for(var i in o)f.call(o,i)&&(c[i]=o[i]);function n(){this.constructor=c}return n.prototype=o.prototype,c.prototype=new n,c.__super__=o.prototype,c},f={}.hasOwnProperty;P=j("./Utility").isObject,S=j("./XMLNode"),D=j("./NodeType"),Y.exports=m=function(_){d(c,_);function c(o,i,n,u){if(c.__super__.constructor.call(this,o),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(u==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!i,this.name=this.stringify.name(n),this.type=D.EntityDeclaration,!P(u))this.value=this.stringify.dtdEntityValue(u),this.internal=!0;else{if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(c.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return null}}),c.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},c}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Y,M){"use strict";(function(){var D,m,S,P=function(_,c){for(var o in c)d.call(c,o)&&(_[o]=c[o]);function i(){this.constructor=_}return i.prototype=c.prototype,_.prototype=new i,_.__super__=c.prototype,_},d={}.hasOwnProperty;S=j("./XMLNode"),D=j("./NodeType"),Y.exports=m=function(f){P(_,f);function _(c,o,i){if(_.__super__.constructor.call(this,c),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=D.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),_.prototype.toString=function(c){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(c))},_}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d=function(c,o){for(var i in o)f.call(o,i)&&(c[i]=o[i]);function n(){this.constructor=c}return n.prototype=o.prototype,c.prototype=new n,c.__super__=o.prototype,c},f={}.hasOwnProperty;P=j("./Utility").isObject,S=j("./XMLNode"),D=j("./NodeType"),Y.exports=m=function(_){d(c,_);function c(o,i,n,u){var p;c.__super__.constructor.call(this,o),P(i)&&(p=i,i=p.version,n=p.encoding,u=p.standalone),i||(i="1.0"),this.type=D.Declaration,this.version=this.stringify.xmlVersion(i),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),u!=null&&(this.standalone=this.stringify.xmlStandalone(u))}return c.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},c}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o,i=function(p,h){for(var v in h)n.call(h,v)&&(p[v]=h[v]);function g(){this.constructor=p}return g.prototype=h.prototype,p.prototype=new g,p.__super__=h.prototype,p},n={}.hasOwnProperty;o=j("./Utility").isObject,c=j("./XMLNode"),D=j("./NodeType"),m=j("./XMLDTDAttList"),P=j("./XMLDTDEntity"),S=j("./XMLDTDElement"),d=j("./XMLDTDNotation"),_=j("./XMLNamedNodeMap"),Y.exports=f=function(u){i(p,u);function p(h,v,g){var E,a,l,t,C,w;if(p.__super__.constructor.call(this,h),this.type=D.DocType,h.children){for(t=h.children,a=0,l=t.length;a<l;a++)if(E=t[a],E.type===D.Element){this.name=E.name;break}}this.documentObject=h,o(v)&&(C=v,v=C.pubID,g=C.sysID),g==null&&(w=[v,g],g=w[0],v=w[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(p.prototype,"entities",{get:function(){var v,g,E,a,l;for(a={},l=this.children,g=0,E=l.length;g<E;g++)v=l[g],v.type===D.EntityDeclaration&&!v.pe&&(a[v.name]=v);return new _(a)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var v,g,E,a,l;for(a={},l=this.children,g=0,E=l.length;g<E;g++)v=l[g],v.type===D.NotationDeclaration&&(a[v.name]=v);return new _(a)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(h,v){var g;return g=new S(this,h,v),this.children.push(g),this},p.prototype.attList=function(h,v,g,E,a){var l;return l=new m(this,h,v,g,E,a),this.children.push(l),this},p.prototype.entity=function(h,v){var g;return g=new P(this,!1,h,v),this.children.push(g),this},p.prototype.pEntity=function(h,v){var g;return g=new P(this,!0,h,v),this.children.push(g),this},p.prototype.notation=function(h,v){var g;return g=new d(this,h,v),this.children.push(g),this},p.prototype.toString=function(h){return this.options.writer.docType(this,this.options.writer.filterOptions(h))},p.prototype.ele=function(h,v){return this.element(h,v)},p.prototype.att=function(h,v,g,E,a){return this.attList(h,v,g,E,a)},p.prototype.ent=function(h,v){return this.entity(h,v)},p.prototype.pent=function(h,v){return this.pEntity(h,v)},p.prototype.not=function(h,v){return this.notation(h,v)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(h){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?h.name!==this.name||h.publicId!==this.publicId?!1:!(h.systemId!==this.systemId):!1},p}(c)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o=function(u,p){for(var h in p)i.call(p,h)&&(u[h]=p[h]);function v(){this.constructor=u}return v.prototype=p.prototype,u.prototype=new v,u.__super__=p.prototype,u},i={}.hasOwnProperty;c=j("./Utility").isPlainObject,S=j("./XMLDOMImplementation"),m=j("./XMLDOMConfiguration"),d=j("./XMLNode"),D=j("./NodeType"),_=j("./XMLStringifier"),f=j("./XMLStringWriter"),Y.exports=P=function(n){o(u,n);function u(p){u.__super__.constructor.call(this,null),this.name="#document",this.type=D.Document,this.documentURI=null,this.domConfig=new m,p||(p={}),p.writer||(p.writer=new f),this.options=p,this.stringify=new _(p)}return Object.defineProperty(u.prototype,"implementation",{value:new S}),Object.defineProperty(u.prototype,"doctype",{get:function(){var h,v,g,E;for(E=this.children,v=0,g=E.length;v<g;v++)if(h=E[v],h.type===D.DocType)return h;return null}}),Object.defineProperty(u.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(u.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(u.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(u.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].encoding:null}}),Object.defineProperty(u.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(u.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===D.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(u.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(u.prototype,"origin",{get:function(){return null}}),Object.defineProperty(u.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(u.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(u.prototype,"contentType",{get:function(){return null}}),u.prototype.end=function(p){var h;return h={},p?c(p)&&(h=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(h))},u.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},u.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createProcessingInstruction=function(p,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.importNode=function(p,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createElementNS=function(p,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createAttributeNS=function(p,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByTagNameNS=function(p,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.renameNode=function(p,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createNodeIterator=function(p,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u.prototype.createTreeWalker=function(p,h,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},u}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o,i,n,u,p,h,v,g,E,a,l,t,C,w,s,L,O={}.hasOwnProperty;L=j("./Utility"),w=L.isObject,C=L.isFunction,s=L.isPlainObject,t=L.getValue,D=j("./NodeType"),u=j("./XMLDocument"),h=j("./XMLElement"),P=j("./XMLCData"),d=j("./XMLComment"),g=j("./XMLRaw"),l=j("./XMLText"),v=j("./XMLProcessingInstruction"),i=j("./XMLDeclaration"),n=j("./XMLDocType"),f=j("./XMLDTDAttList"),c=j("./XMLDTDEntity"),_=j("./XMLDTDElement"),o=j("./XMLDTDNotation"),S=j("./XMLAttribute"),a=j("./XMLStringifier"),E=j("./XMLStringWriter"),m=j("./WriterState"),Y.exports=p=function(){function x(b,y,T){var k;this.name="?xml",this.type=D.Document,b||(b={}),k={},b.writer?s(b.writer)&&(k=b.writer,b.writer=new E):b.writer=new E,this.options=b,this.writer=b.writer,this.writerOptions=this.writer.filterOptions(k),this.stringify=new a(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,k,N,I,W,K,U;switch(b.type){case D.CData:this.cdata(b.value);break;case D.Comment:this.comment(b.value);break;case D.Element:k={},K=b.attribs;for(T in K){if(!O.call(K,T))continue;y=K[T],k[T]=y.value}this.node(b.name,k);break;case D.Dummy:this.dummy();break;case D.Raw:this.raw(b.value);break;case D.Text:this.text(b.value);break;case D.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(U=b.children,I=0,W=U.length;I<W;I++)N=U[I],this.createChildNode(N),N.type===D.Element&&this.up();return this},x.prototype.dummy=function(){return this},x.prototype.node=function(b,y,T){var k;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),w(y)||(k=[y,T],T=k[0],y=k[1]),this.currentNode=new h(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 k,N,I,W,K,U;if(this.currentNode&&this.currentNode.type===D.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(b)||w(b)||C(b))for(W=this.options.noValidation,this.options.noValidation=!0,U=new u(this.options).element("TEMP_ROOT"),U.element(b),this.options.noValidation=W,K=U.children,N=0,I=K.length;N<I;N++)k=K[N],this.createChildNode(k),k.type===D.Element&&this.up();else this.node(b,y,T);return this},x.prototype.attribute=function(b,y){var T,k;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)),w(b))for(T in b){if(!O.call(b,T))continue;k=b[T],this.attribute(T,k)}else C(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[b]=new S(this,b,""):y!=null&&(this.currentNode.attribs[b]=new S(this,b,y));return this},x.prototype.text=function(b){var y;return this.openCurrent(),y=new l(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 P(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 d(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,k,N,I,W;if(this.openCurrent(),b!=null&&(b=t(b)),y!=null&&(y=t(y)),Array.isArray(b))for(T=0,I=b.length;T<I;T++)k=b[T],this.instruction(k);else if(w(b))for(k in b){if(!O.call(b,k))continue;N=b[k],this.instruction(k,N)}else C(y)&&(y=y.apply()),W=new v(this,b,y),this.onData(this.writer.processingInstruction(W,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},x.prototype.declaration=function(b,y,T){var k;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return k=new i(this,b,y,T),this.onData(this.writer.declaration(k,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 n(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 _(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,k,N){var I;return this.openCurrent(),I=new f(this,b,y,T,k,N),this.onData(this.writer.dtdAttList(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},x.prototype.entity=function(b,y){var T;return this.openCurrent(),T=new c(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 c(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 o(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,k,N;if(!b.isOpen){if(!this.root&&this.currentLevel===0&&b.type===D.Element&&(this.root=b),T="",b.type===D.Element){this.writerOptions.state=m.OpenTag,T=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<"+b.name,N=b.attribs;for(k in N){if(!O.call(N,k))continue;y=N[k],T+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}T+=(b.children?">":"/>")+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=m.InsideTag}else this.writerOptions.state=m.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=m.InsideTag):(this.writerOptions.state=m.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=m.CloseTag,b.type===D.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=m.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===D.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode.type===D.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,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;f=j("./XMLNode"),P=j("./NodeType"),Y.exports=d=function(o){_(i,o);function i(n){i.__super__.constructor.call(this,n),this.type=P.Dummy}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return""},i}(f)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_,c,o,i,n,u,p=function(g,E){for(var a in E)h.call(E,a)&&(g[a]=E[a]);function l(){this.constructor=g}return l.prototype=E.prototype,g.prototype=new l,g.__super__=E.prototype,g},h={}.hasOwnProperty;u=j("./Utility"),n=u.isObject,i=u.isFunction,o=u.getValue,c=j("./XMLNode"),P=j("./NodeType"),d=j("./XMLAttribute"),_=j("./XMLNamedNodeMap"),Y.exports=f=function(v){p(g,v);function g(E,a,l){var t,C,w,s;if(g.__super__.constructor.call(this,E),a==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(a),this.type=P.Element,this.attribs={},this.schemaTypeInfo=null,l!=null&&this.attribute(l),E.type===P.Document&&(this.isRoot=!0,this.documentObject=E,E.rootObject=this,E.children)){for(s=E.children,C=0,w=s.length;C<w;C++)if(t=s[C],t.type===P.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 _(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var E,a,l,t;l=(0,m.default)(this),l.isRoot&&(l.documentObject=null),l.attribs={},t=this.attribs;for(a in t){if(!h.call(t,a))continue;E=t[a],l.attribs[a]=E.clone()}return l.children=[],this.children.forEach(function(C){var w;return w=C.clone(),w.parent=l,l.children.push(w)}),l},g.prototype.attribute=function(E,a){var l,t;if(E!=null&&(E=o(E)),n(E))for(l in E){if(!h.call(E,l))continue;t=E[l],this.attribute(l,t)}else i(a)&&(a=a.apply()),this.options.keepNullAttributes&&a==null?this.attribs[E]=new d(this,E,""):a!=null&&(this.attribs[E]=new d(this,E,a));return this},g.prototype.removeAttribute=function(E){var a,l,t;if(E==null)throw new Error("Missing attribute name. "+this.debugInfo());if(E=o(E),Array.isArray(E))for(l=0,t=E.length;l<t;l++)a=E[l],delete this.attribs[a];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,a){return this.attribute(E,a)},g.prototype.a=function(E,a){return this.attribute(E,a)},g.prototype.getAttribute=function(E){return this.attribs.hasOwnProperty(E)?this.attribs[E].value:null},g.prototype.setAttribute=function(E,a){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,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(E,a,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(E,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(E,a){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,a){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,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(E,a){return this.attribs.hasOwnProperty(E)?this.attribs[E].isId:a},g.prototype.setIdAttributeNS=function(E,a,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(E,a){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,a){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 a,l,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(a=l=0,t=this.attribs.length-1;0<=t?l<=t:l>=t;a=0<=t?++l:--l)if(!this.attribs[a].isEqualNode(E.attribs[a]))return!1;return!0},g}(c)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/keys"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P;Y.exports=P=function(){function d(f){this.nodes=f}return Object.defineProperty(d.prototype,"length",{get:function(){return(0,m.default)(this.nodes).length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.getNamedItem=function(f){return this.nodes[f]},d.prototype.setNamedItem=function(f){var _;return _=this.nodes[f.nodeName],this.nodes[f.nodeName]=f,_||null},d.prototype.removeNamedItem=function(f){var _;return _=this.nodes[f],delete this.nodes[f],_||null},d.prototype.item=function(f){return this.nodes[(0,m.default)(this.nodes)[f]]||null},d.prototype.getNamedItemNS=function(f,_){throw new Error("This DOM method is not implemented.")},d.prototype.setNamedItemNS=function(f){throw new Error("This DOM method is not implemented.")},d.prototype.removeNamedItemNS=function(f,_){throw new Error("This DOM method is not implemented.")},d}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o,i,n,u,p,h,v,g,E,a,l,t={}.hasOwnProperty;l=j("./Utility"),a=l.isObject,E=l.isFunction,g=l.isEmpty,v=l.getValue,c=null,S=null,P=null,d=null,f=null,p=null,h=null,u=null,_=null,m=null,n=null,o=null,D=null,Y.exports=i=function(){function C(w){this.parent=w,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=j("./XMLElement"),S=j("./XMLCData"),P=j("./XMLComment"),d=j("./XMLDeclaration"),f=j("./XMLDocType"),p=j("./XMLRaw"),h=j("./XMLText"),u=j("./XMLProcessingInstruction"),_=j("./XMLDummy"),m=j("./NodeType"),n=j("./XMLNodeList"),o=j("./XMLNamedNodeMap"),D=j("./DocumentPosition"))}return Object.defineProperty(C.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(C.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(C.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(C.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(C.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(C.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(C.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(C.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(C.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(C.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(C.prototype,"textContent",{get:function(){var s,L,O,x,b;if(this.nodeType===m.Element||this.nodeType===m.DocumentFragment){for(b="",x=this.children,L=0,O=x.length;L<O;L++)s=x[L],s.textContent&&(b+=s.textContent);return b}else return null},set:function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),C.prototype.setParent=function(w){var s,L,O,x,b;for(this.parent=w,w&&(this.options=w.options,this.stringify=w.stringify),x=this.children,b=[],L=0,O=x.length;L<O;L++)s=x[L],b.push(s.setParent(this));return b},C.prototype.element=function(w,s,L){var O,x,b,y,T,k,N,I,W,K,U;if(k=null,s===null&&L==null&&(W=[{},null],s=W[0],L=W[1]),s==null&&(s={}),s=v(s),a(s)||(K=[s,L],L=K[0],s=K[1]),w!=null&&(w=v(w)),Array.isArray(w))for(b=0,N=w.length;b<N;b++)x=w[b],k=this.element(x);else if(E(w))k=this.element(w.apply());else if(a(w))for(T in w){if(!t.call(w,T))continue;if(U=w[T],E(U)&&(U=U.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)k=this.attribute(T.substr(this.stringify.convertAttKey.length),U);else if(!this.options.separateArrayItems&&Array.isArray(U)&&g(U))k=this.dummy();else if(a(U)&&g(U))k=this.element(T);else if(!this.options.keepNullNodes&&U==null)k=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(U))for(y=0,I=U.length;y<I;y++)x=U[y],O={},O[T]=x,k=this.element(O);else a(U)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?k=this.element(U):(k=this.element(T),k.element(U)):k=this.element(T,U)}else!this.options.keepNullNodes&&L===null?k=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&w.indexOf(this.stringify.convertTextKey)===0?k=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&w.indexOf(this.stringify.convertCDataKey)===0?k=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&w.indexOf(this.stringify.convertCommentKey)===0?k=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&w.indexOf(this.stringify.convertRawKey)===0?k=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&w.indexOf(this.stringify.convertPIKey)===0?k=this.instruction(w.substr(this.stringify.convertPIKey.length),L):k=this.node(w,s,L);if(k==null)throw new Error("Could not create any elements with: "+w+". "+this.debugInfo());return k},C.prototype.insertBefore=function(w,s,L){var O,x,b,y,T;if(w!=null?w.type:void 0)return b=w,y=s,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(w));return x=this.parent.children.indexOf(this),T=this.parent.children.splice(x),O=this.parent.element(w,s,L),Array.prototype.push.apply(this.parent.children,T),O},C.prototype.insertAfter=function(w,s,L){var O,x,b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(w));return x=this.parent.children.indexOf(this),b=this.parent.children.splice(x+1),O=this.parent.element(w,s,L),Array.prototype.push.apply(this.parent.children,b),O},C.prototype.remove=function(){var w,s;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return w=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[w,w-w+1].concat(s=[])),this.parent},C.prototype.node=function(w,s,L){var O,x;return w!=null&&(w=v(w)),s||(s={}),s=v(s),a(s)||(x=[s,L],L=x[0],s=x[1]),O=new c(this,w,s),L!=null&&O.text(L),this.children.push(O),O},C.prototype.text=function(w){var s;return a(w)&&this.element(w),s=new h(this,w),this.children.push(s),this},C.prototype.cdata=function(w){var s;return s=new S(this,w),this.children.push(s),this},C.prototype.comment=function(w){var s;return s=new P(this,w),this.children.push(s),this},C.prototype.commentBefore=function(w){var s,L,O;return L=this.parent.children.indexOf(this),O=this.parent.children.splice(L),s=this.parent.comment(w),Array.prototype.push.apply(this.parent.children,O),this},C.prototype.commentAfter=function(w){var s,L,O;return L=this.parent.children.indexOf(this),O=this.parent.children.splice(L+1),s=this.parent.comment(w),Array.prototype.push.apply(this.parent.children,O),this},C.prototype.raw=function(w){var s;return s=new p(this,w),this.children.push(s),this},C.prototype.dummy=function(){var w;return w=new _(this),w},C.prototype.instruction=function(w,s){var L,O,x,b,y;if(w!=null&&(w=v(w)),s!=null&&(s=v(s)),Array.isArray(w))for(b=0,y=w.length;b<y;b++)L=w[b],this.instruction(L);else if(a(w))for(L in w){if(!t.call(w,L))continue;O=w[L],this.instruction(L,O)}else E(s)&&(s=s.apply()),x=new u(this,w,s),this.children.push(x);return this},C.prototype.instructionBefore=function(w,s){var L,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O),L=this.parent.instruction(w,s),Array.prototype.push.apply(this.parent.children,x),this},C.prototype.instructionAfter=function(w,s){var L,O,x;return O=this.parent.children.indexOf(this),x=this.parent.children.splice(O+1),L=this.parent.instruction(w,s),Array.prototype.push.apply(this.parent.children,x),this},C.prototype.declaration=function(w,s,L){var O,x;return O=this.document(),x=new d(O,w,s,L),O.children.length===0?O.children.unshift(x):O.children[0].type===m.Declaration?O.children[0]=x:O.children.unshift(x),O.root()||O},C.prototype.dtd=function(w,s){var L,O,x,b,y,T,k,N,I,W;for(O=this.document(),x=new f(O,w,s),I=O.children,b=y=0,k=I.length;y<k;b=++y)if(L=I[b],L.type===m.DocType)return O.children[b]=x,x;for(W=O.children,b=T=0,N=W.length;T<N;b=++T)if(L=W[b],L.isRoot)return O.children.splice(b,0,x),x;return O.children.push(x),x},C.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},C.prototype.root=function(){var w;for(w=this;w;){if(w.type===m.Document)return w.rootObject;if(w.isRoot)return w;w=w.parent}},C.prototype.document=function(){var w;for(w=this;w;){if(w.type===m.Document)return w;w=w.parent}},C.prototype.end=function(w){return this.document().end(w)},C.prototype.prev=function(){var w;if(w=this.parent.children.indexOf(this),w<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[w-1]},C.prototype.next=function(){var w;if(w=this.parent.children.indexOf(this),w===-1||w===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[w+1]},C.prototype.importDocument=function(w){var s;return s=w.root().clone(),s.parent=this,s.isRoot=!1,this.children.push(s),this},C.prototype.debugInfo=function(w){var s,L;return w=w||this.name,w==null&&!((s=this.parent)!=null?s.name:void 0)?"":w==null?"parent: <"+this.parent.name+">":((L=this.parent)!=null?L.name:void 0)?"node: <"+w+">, parent: <"+this.parent.name+">":"node: <"+w+">"},C.prototype.ele=function(w,s,L){return this.element(w,s,L)},C.prototype.nod=function(w,s,L){return this.node(w,s,L)},C.prototype.txt=function(w){return this.text(w)},C.prototype.dat=function(w){return this.cdata(w)},C.prototype.com=function(w){return this.comment(w)},C.prototype.ins=function(w,s){return this.instruction(w,s)},C.prototype.doc=function(){return this.document()},C.prototype.dec=function(w,s,L){return this.declaration(w,s,L)},C.prototype.e=function(w,s,L){return this.element(w,s,L)},C.prototype.n=function(w,s,L){return this.node(w,s,L)},C.prototype.t=function(w){return this.text(w)},C.prototype.d=function(w){return this.cdata(w)},C.prototype.c=function(w){return this.comment(w)},C.prototype.r=function(w){return this.raw(w)},C.prototype.i=function(w,s){return this.instruction(w,s)},C.prototype.u=function(){return this.up()},C.prototype.importXMLBuilder=function(w){return this.importDocument(w)},C.prototype.replaceChild=function(w,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.removeChild=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.appendChild=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.hasChildNodes=function(){return this.children.length!==0},C.prototype.cloneNode=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isSupported=function(w,s){return!0},C.prototype.hasAttributes=function(){return this.attribs.length!==0},C.prototype.compareDocumentPosition=function(w){var s,L;return s=this,s===w?0:this.document()!==w.document()?(L=D.Disconnected|D.ImplementationSpecific,Math.random()<.5?L|=D.Preceding:L|=D.Following,L):s.isAncestor(w)?D.Contains|D.Preceding:s.isDescendant(w)?D.Contains|D.Following:s.isPreceding(w)?D.Preceding:D.Following},C.prototype.isSameNode=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.lookupPrefix=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isDefaultNamespace=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.lookupNamespaceURI=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.isEqualNode=function(w){var s,L,O;if(w.nodeType!==this.nodeType)return!1;if(w.children.length!==this.children.length)return!1;for(s=L=0,O=this.children.length-1;0<=O?L<=O:L>=O;s=0<=O?++L:--L)if(!this.children[s].isEqualNode(w.children[s]))return!1;return!0},C.prototype.getFeature=function(w,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.setUserData=function(w,s,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.getUserData=function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())},C.prototype.contains=function(w){return w?w===this||this.isDescendant(w):!1},C.prototype.isDescendant=function(w){var s,L,O,x,b;for(b=this.children,O=0,x=b.length;O<x;O++){if(s=b[O],w===s)return!0;if(L=s.isDescendant(w),L)return!0}return!1},C.prototype.isAncestor=function(w){return w.isDescendant(this)},C.prototype.isPreceding=function(w){var s,L;return s=this.treePosition(w),L=this.treePosition(this),s===-1||L===-1?!1:s<L},C.prototype.isFollowing=function(w){var s,L;return s=this.treePosition(w),L=this.treePosition(this),s===-1||L===-1?!1:s>L},C.prototype.treePosition=function(w){var s,L;return L=0,s=!1,this.foreachTreeNode(this.document(),function(O){if(L++,!s&&O===w)return s=!0}),s?L:-1},C.prototype.foreachTreeNode=function(w,s){var L,O,x,b,y;for(w||(w=this.document()),b=w.children,O=0,x=b.length;O<x;O++){if(L=b[O],y=s(L))return y;if(y=this.foreachTreeNode(L,s),y)return y}},C}()}).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,Y,M){"use strict";(function(){var D;Y.exports=D=function(){function m(S){this.nodes=S}return Object.defineProperty(m.prototype,"length",{get:function(){return this.nodes.length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.item=function(S){return this.nodes[S]||null},m}()}).call(void 0)},{}],275:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;P=j("./NodeType"),d=j("./XMLCharacterData"),Y.exports=f=function(o){_(i,o);function i(n,u,p){if(i.__super__.constructor.call(this,n),u==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=P.ProcessingInstruction,this.target=this.stringify.insTarget(u),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},i.prototype.isEqualNode=function(n){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},i}(d)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;P=j("./NodeType"),d=j("./XMLNode"),Y.exports=f=function(o){_(i,o);function i(n,u){if(i.__super__.constructor.call(this,n),u==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=P.Raw,this.value=this.stringify.raw(u)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},i}(d)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d=function(c,o){for(var i in o)f.call(o,i)&&(c[i]=o[i]);function n(){this.constructor=c}return n.prototype=o.prototype,c.prototype=new n,c.__super__=o.prototype,c},f={}.hasOwnProperty;D=j("./NodeType"),P=j("./XMLWriterBase"),m=j("./WriterState"),Y.exports=S=function(_){d(c,_);function c(o,i){this.stream=o,c.__super__.constructor.call(this,i)}return c.prototype.endline=function(o,i,n){return o.isLastRootNode&&i.state===m.CloseTag?"":c.__super__.endline.call(this,o,i,n)},c.prototype.document=function(o,i){var n,u,p,h,v,g,E,a,l;for(E=o.children,u=p=0,v=E.length;p<v;u=++p)n=E[u],n.isLastRootNode=u===o.children.length-1;for(i=this.filterOptions(i),a=o.children,l=[],h=0,g=a.length;h<g;h++)n=a[h],l.push(this.writeChildNode(n,i,0));return l},c.prototype.attribute=function(o,i,n){return this.stream.write(c.__super__.attribute.call(this,o,i,n))},c.prototype.cdata=function(o,i,n){return this.stream.write(c.__super__.cdata.call(this,o,i,n))},c.prototype.comment=function(o,i,n){return this.stream.write(c.__super__.comment.call(this,o,i,n))},c.prototype.declaration=function(o,i,n){return this.stream.write(c.__super__.declaration.call(this,o,i,n))},c.prototype.docType=function(o,i,n){var u,p,h,v;if(n||(n=0),this.openNode(o,i,n),i.state=m.OpenTag,this.stream.write(this.indent(o,i,n)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,i,n)),i.state=m.InsideTag,v=o.children,p=0,h=v.length;p<h;p++)u=v[p],this.writeChildNode(u,i,n+1);i.state=m.CloseTag,this.stream.write("]")}return i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+">"),this.stream.write(this.endline(o,i,n)),i.state=m.None,this.closeNode(o,i,n)},c.prototype.element=function(o,i,n){var u,p,h,v,g,E,a,l,t,C;n||(n=0),this.openNode(o,i,n),i.state=m.OpenTag,this.stream.write(this.indent(o,i,n)+"<"+o.name),t=o.attribs;for(a in t){if(!f.call(t,a))continue;u=t[a],this.attribute(u,i,n)}if(h=o.children.length,v=h===0?null:o.children[0],h===0||o.children.every(function(w){return(w.type===D.Text||w.type===D.Raw)&&w.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=m.CloseTag,this.stream.write("</"+o.name+">")):(i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&h===1&&(v.type===D.Text||v.type===D.Raw)&&v.value!=null)this.stream.write(">"),i.state=m.InsideTag,i.suppressPrettyCount++,l=!0,this.writeChildNode(v,i,n+1),i.suppressPrettyCount--,l=!1,i.state=m.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,i,n)),i.state=m.InsideTag,C=o.children,g=0,E=C.length;g<E;g++)p=C[g],this.writeChildNode(p,i,n+1);i.state=m.CloseTag,this.stream.write(this.indent(o,i,n)+"</"+o.name+">")}return this.stream.write(this.endline(o,i,n)),i.state=m.None,this.closeNode(o,i,n)},c.prototype.processingInstruction=function(o,i,n){return this.stream.write(c.__super__.processingInstruction.call(this,o,i,n))},c.prototype.raw=function(o,i,n){return this.stream.write(c.__super__.raw.call(this,o,i,n))},c.prototype.text=function(o,i,n){return this.stream.write(c.__super__.text.call(this,o,i,n))},c.prototype.dtdAttList=function(o,i,n){return this.stream.write(c.__super__.dtdAttList.call(this,o,i,n))},c.prototype.dtdElement=function(o,i,n){return this.stream.write(c.__super__.dtdElement.call(this,o,i,n))},c.prototype.dtdEntity=function(o,i,n){return this.stream.write(c.__super__.dtdEntity.call(this,o,i,n))},c.prototype.dtdNotation=function(o,i,n){return this.stream.write(c.__super__.dtdNotation.call(this,o,i,n))},c}(P)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Y,M){"use strict";(function(){var D,m,S=function(f,_){for(var c in _)P.call(_,c)&&(f[c]=_[c]);function o(){this.constructor=f}return o.prototype=_.prototype,f.prototype=new o,f.__super__=_.prototype,f},P={}.hasOwnProperty;m=j("./XMLWriterBase"),Y.exports=D=function(d){S(f,d);function f(_){f.__super__.constructor.call(this,_)}return f.prototype.document=function(_,c){var o,i,n,u,p;for(c=this.filterOptions(c),u="",p=_.children,i=0,n=p.length;i<n;i++)o=p[i],u+=this.writeChildNode(o,c,0);return c.pretty&&u.slice(-c.newline.length)===c.newline&&(u=u.slice(0,-c.newline.length)),u},f}(m)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,Y,M){"use strict";(function(){var D,m=function(d,f){return function(){return d.apply(f,arguments)}},S={}.hasOwnProperty;Y.exports=D=function(){function P(d){this.assertLegalName=m(this.assertLegalName,this),this.assertLegalChar=m(this.assertLegalChar,this);var f,_,c;d||(d={}),this.options=d,this.options.version||(this.options.version="1.0"),_=d.stringify||{};for(f in _){if(!S.call(_,f))continue;c=_[f],this[f]=c}}return P.prototype.name=function(d){return this.options.noValidation?d:this.assertLegalName(""+d||"")},P.prototype.text=function(d){return this.options.noValidation?d:this.assertLegalChar(this.textEscape(""+d||""))},P.prototype.cdata=function(d){return this.options.noValidation?d:(d=""+d||"",d=d.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(d))},P.prototype.comment=function(d){if(this.options.noValidation)return d;if(d=""+d||"",d.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+d);return this.assertLegalChar(d)},P.prototype.raw=function(d){return this.options.noValidation?d:""+d||""},P.prototype.attValue=function(d){return this.options.noValidation?d:this.assertLegalChar(this.attEscape(d=""+d||""))},P.prototype.insTarget=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.insValue=function(d){if(this.options.noValidation)return d;if(d=""+d||"",d.match(/\?>/))throw new Error("Invalid processing instruction value: "+d);return this.assertLegalChar(d)},P.prototype.xmlVersion=function(d){if(this.options.noValidation)return d;if(d=""+d||"",!d.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+d);return d},P.prototype.xmlEncoding=function(d){if(this.options.noValidation)return d;if(d=""+d||"",!d.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+d);return this.assertLegalChar(d)},P.prototype.xmlStandalone=function(d){return this.options.noValidation?d:d?"yes":"no"},P.prototype.dtdPubID=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdSysID=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdElementValue=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdAttType=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdAttDefault=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdEntityValue=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.dtdNData=function(d){return this.options.noValidation?d:this.assertLegalChar(""+d||"")},P.prototype.convertAttKey="@",P.prototype.convertPIKey="?",P.prototype.convertTextKey="#text",P.prototype.convertCDataKey="#cdata",P.prototype.convertCommentKey="#comment",P.prototype.convertRawKey="#raw",P.prototype.assertLegalChar=function(d){var f,_;if(this.options.noValidation)return d;if(f="",this.options.version==="1.0"){if(f=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=d.match(f))throw new Error("Invalid character in string: "+d+" at index "+_.index)}else if(this.options.version==="1.1"&&(f=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=d.match(f)))throw new Error("Invalid character in string: "+d+" at index "+_.index);return d},P.prototype.assertLegalName=function(d){var f;if(this.options.noValidation)return d;if(this.assertLegalChar(d),f=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!d.match(f))throw new Error("Invalid character in name");return d},P.prototype.textEscape=function(d){var f;return this.options.noValidation?d:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,d.replace(f,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},P.prototype.attEscape=function(d){var f;return this.options.noValidation?d:(f=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,d.replace(f,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},P}()}).call(void 0)},{}],280:[function(j,Y,M){"use strict";var D=j("babel-runtime/core-js/object/create"),m=S(D);function S(P){return P&&P.__esModule?P:{default:P}}(function(){var P,d,f,_=function(i,n){for(var u in n)c.call(n,u)&&(i[u]=n[u]);function p(){this.constructor=i}return p.prototype=n.prototype,i.prototype=new p,i.__super__=n.prototype,i},c={}.hasOwnProperty;P=j("./NodeType"),d=j("./XMLCharacterData"),Y.exports=f=function(o){_(i,o);function i(n,u){if(i.__super__.constructor.call(this,n),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=P.Text,this.value=this.stringify.text(u)}return Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var u,p,h;for(h="",p=this.previousSibling;p;)h=p.data+h,p=p.previousSibling;for(h+=this.data,u=this.nextSibling;u;)h=h+u.data,u=u.nextSibling;return h}}),i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},i.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(d)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o,i,n,u,p,h,v,g,E,a={}.hasOwnProperty;E=j("./Utility").assign,D=j("./NodeType"),o=j("./XMLDeclaration"),i=j("./XMLDocType"),S=j("./XMLCData"),P=j("./XMLComment"),u=j("./XMLElement"),h=j("./XMLRaw"),v=j("./XMLText"),p=j("./XMLProcessingInstruction"),n=j("./XMLDummy"),d=j("./XMLDTDAttList"),f=j("./XMLDTDElement"),_=j("./XMLDTDEntity"),c=j("./XMLDTDNotation"),m=j("./WriterState"),Y.exports=g=function(){function l(t){var C,w,s;t||(t={}),this.options=t,w=t.writer||{};for(C in w){if(!a.call(w,C))continue;s=w[C],this["_"+C]=this[C],this[C]=s}}return l.prototype.filterOptions=function(t){var C,w,s,L,O,x,b,y;return t||(t={}),t=E({},this.options,t),C={writer:this},C.pretty=t.pretty||!1,C.allowEmpty=t.allowEmpty||!1,C.indent=(w=t.indent)!=null?w:" ",C.newline=(s=t.newline)!=null?s:`
`,C.offset=(L=t.offset)!=null?L:0,C.dontPrettyTextNodes=(O=(x=t.dontPrettyTextNodes)!=null?x:t.dontprettytextnodes)!=null?O:0,C.spaceBeforeSlash=(b=(y=t.spaceBeforeSlash)!=null?y:t.spacebeforeslash)!=null?b:"",C.spaceBeforeSlash===!0&&(C.spaceBeforeSlash=" "),C.suppressPrettyCount=0,C.user={},C.state=m.None,C},l.prototype.indent=function(t,C,w){var s;return!C.pretty||C.suppressPrettyCount?"":C.pretty&&(s=(w||0)+C.offset+1,s>0)?new Array(s).join(C.indent):""},l.prototype.endline=function(t,C,w){return!C.pretty||C.suppressPrettyCount?"":C.newline},l.prototype.attribute=function(t,C,w){var s;return this.openAttribute(t,C,w),s=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,C,w),s},l.prototype.cdata=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<![CDATA[",C.state=m.InsideTag,s+=t.value,C.state=m.CloseTag,s+="]]>"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.comment=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<!-- ",C.state=m.InsideTag,s+=t.value,C.state=m.CloseTag,s+=" -->"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.declaration=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<?xml",C.state=m.InsideTag,s+=' version="'+t.version+'"',t.encoding!=null&&(s+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(s+=' standalone="'+t.standalone+'"'),C.state=m.CloseTag,s+=C.spaceBeforeSlash+"?>",s+=this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.docType=function(t,C,w){var s,L,O,x,b;if(w||(w=0),this.openNode(t,C,w),C.state=m.OpenTag,x=this.indent(t,C,w),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,C,w),C.state=m.InsideTag,b=t.children,L=0,O=b.length;L<O;L++)s=b[L],x+=this.writeChildNode(s,C,w+1);C.state=m.CloseTag,x+="]"}return C.state=m.CloseTag,x+=C.spaceBeforeSlash+">",x+=this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),x},l.prototype.element=function(t,C,w){var s,L,O,x,b,y,T,k,N,I,W,K,U,z;w||(w=0),I=!1,W="",this.openNode(t,C,w),C.state=m.OpenTag,W+=this.indent(t,C,w)+"<"+t.name,K=t.attribs;for(N in K){if(!a.call(K,N))continue;s=K[N],W+=this.attribute(s,C,w)}if(O=t.children.length,x=O===0?null:t.children[0],O===0||t.children.every(function(B){return(B.type===D.Text||B.type===D.Raw)&&B.value===""}))C.allowEmpty?(W+=">",C.state=m.CloseTag,W+="</"+t.name+">"+this.endline(t,C,w)):(C.state=m.CloseTag,W+=C.spaceBeforeSlash+"/>"+this.endline(t,C,w));else if(C.pretty&&O===1&&(x.type===D.Text||x.type===D.Raw)&&x.value!=null)W+=">",C.state=m.InsideTag,C.suppressPrettyCount++,I=!0,W+=this.writeChildNode(x,C,w+1),C.suppressPrettyCount--,I=!1,C.state=m.CloseTag,W+="</"+t.name+">"+this.endline(t,C,w);else{if(C.dontPrettyTextNodes){for(U=t.children,b=0,T=U.length;b<T;b++)if(L=U[b],(L.type===D.Text||L.type===D.Raw)&&L.value!=null){C.suppressPrettyCount++,I=!0;break}}for(W+=">"+this.endline(t,C,w),C.state=m.InsideTag,z=t.children,y=0,k=z.length;y<k;y++)L=z[y],W+=this.writeChildNode(L,C,w+1);C.state=m.CloseTag,W+=this.indent(t,C,w)+"</"+t.name+">",I&&C.suppressPrettyCount--,W+=this.endline(t,C,w),C.state=m.None}return this.closeNode(t,C,w),W},l.prototype.writeChildNode=function(t,C,w){switch(t.type){case D.CData:return this.cdata(t,C,w);case D.Comment:return this.comment(t,C,w);case D.Element:return this.element(t,C,w);case D.Raw:return this.raw(t,C,w);case D.Text:return this.text(t,C,w);case D.ProcessingInstruction:return this.processingInstruction(t,C,w);case D.Dummy:return"";case D.Declaration:return this.declaration(t,C,w);case D.DocType:return this.docType(t,C,w);case D.AttributeDeclaration:return this.dtdAttList(t,C,w);case D.ElementDeclaration:return this.dtdElement(t,C,w);case D.EntityDeclaration:return this.dtdEntity(t,C,w);case D.NotationDeclaration:return this.dtdNotation(t,C,w);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},l.prototype.processingInstruction=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<?",C.state=m.InsideTag,s+=t.target,t.value&&(s+=" "+t.value),C.state=m.CloseTag,s+=C.spaceBeforeSlash+"?>",s+=this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.raw=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w),C.state=m.InsideTag,s+=t.value,C.state=m.CloseTag,s+=this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.text=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w),C.state=m.InsideTag,s+=t.value,C.state=m.CloseTag,s+=this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.dtdAttList=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<!ATTLIST",C.state=m.InsideTag,s+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(s+=" "+t.defaultValueType),t.defaultValue&&(s+=' "'+t.defaultValue+'"'),C.state=m.CloseTag,s+=C.spaceBeforeSlash+">"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.dtdElement=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<!ELEMENT",C.state=m.InsideTag,s+=" "+t.name+" "+t.value,C.state=m.CloseTag,s+=C.spaceBeforeSlash+">"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.dtdEntity=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<!ENTITY",C.state=m.InsideTag,t.pe&&(s+=" %"),s+=" "+t.name,t.value?s+=' "'+t.value+'"':(t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),t.nData&&(s+=" NDATA "+t.nData)),C.state=m.CloseTag,s+=C.spaceBeforeSlash+">"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.dtdNotation=function(t,C,w){var s;return this.openNode(t,C,w),C.state=m.OpenTag,s=this.indent(t,C,w)+"<!NOTATION",C.state=m.InsideTag,s+=" "+t.name,t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?s+=' PUBLIC "'+t.pubID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),C.state=m.CloseTag,s+=C.spaceBeforeSlash+">"+this.endline(t,C,w),C.state=m.None,this.closeNode(t,C,w),s},l.prototype.openNode=function(t,C,w){},l.prototype.closeNode=function(t,C,w){},l.prototype.openAttribute=function(t,C,w){},l.prototype.closeAttribute=function(t,C,w){},l}()}).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,Y,M){"use strict";(function(){var D,m,S,P,d,f,_,c,o,i;i=j("./Utility"),c=i.assign,o=i.isFunction,S=j("./XMLDOMImplementation"),P=j("./XMLDocument"),d=j("./XMLDocumentCB"),_=j("./XMLStringWriter"),f=j("./XMLStreamWriter"),D=j("./NodeType"),m=j("./WriterState"),Y.exports.create=function(n,u,p,h){var v,g;if(n==null)throw new Error("Root element needs a name.");return h=c({},u,p,h),v=new P(h),g=v.element(n),h.headless||(v.declaration(h),(h.pubID!=null||h.sysID!=null)&&v.dtd(h)),g},Y.exports.begin=function(n,u,p){var h;return o(n)&&(h=[n,u],u=h[0],p=h[1],n={}),u?new d(n,u,p):new P(n)},Y.exports.stringWriter=function(n){return new _(n)},Y.exports.streamWriter=function(n,u){return new f(n,u)},Y.exports.implementation=new S,Y.exports.nodeType=D,Y.exports.writerState=m}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Y,M){Y.exports=m;var D=Object.prototype.hasOwnProperty;function m(){for(var S={},P=0;P<arguments.length;P++){var d=arguments[P];for(var f in d)D.call(d,f)&&(S[f]=d[f])}return S}},{}],284:[function(j,Y,M){"use strict";var D=j("buffer").Buffer,m=j("./sha"),S=j("./md5"),P={sha1:m,md5:S},d=64,f=D.alloc(d);f.fill(0);function _(i,n,u){D.isBuffer(n)||(n=D.from(n)),D.isBuffer(u)||(u=D.from(u)),n.length>d?n=i(n):n.length<d&&(n=D.concat([n,f],d));for(var p=D.alloc(d),h=D.alloc(d),v=0;v<d;v++)p[v]=n[v]^54,h[v]=n[v]^92;var g=i(D.concat([p,u]));return i(D.concat([h,g]))}function c(i,n){i=i||"sha1";var u=P[i],p=[],h=0;return u||o("algorithm:",i,"is not yet supported"),{update:function(g){return D.isBuffer(g)||(g=D.from(g)),p.push(g),h+=g.length,this},digest:function(g){var E=D.concat(p),a=n?_(u,n,E):u(E);return p=null,g?a.toString(g):a}}}function o(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}M.createHash=function(i){return c(i)},M.createHmac=function(i,n){return c(i,n)},M.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},M.createCipher=function(){o("sorry,createCipher is not implemented yet")},M.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},M.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},M.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},M.createSign=function(){o("sorry,createSign is not implemented yet")},M.createVerify=function(){o("sorry,createVerify is not implemented yet")},M.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},M.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,Y,M){"use strict";var D=j("buffer").Buffer,m=4,S=D.alloc(m);S.fill(0);var P=8;function d(c,o){if(c.length%m!==0){var i=c.length+(m-c.length%m);c=D.concat([c,S],i)}for(var n=[],u=o?c.readInt32BE:c.readInt32LE,p=0;p<c.length;p+=m)n.push(u.call(c,p));return n}function f(c,o,i){for(var n=D.alloc(o),u=i?n.writeInt32BE:n.writeInt32LE,p=0;p<c.length;p++)u.call(n,c[p],p*4,!0);return n}function _(c,o,i,n){D.isBuffer(c)||(c=D.from(c));var u=o(d(c,n),c.length*P);return f(u,i,n)}Y.exports={hash:_}},{buffer:73}],286:[function(j,Y,M){"use strict";var D=j("./helpers");function m(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(n,u){n[u>>5]|=128<<u%32,n[(u+64>>>9<<4)+14]=u;for(var p=1732584193,h=-271733879,v=-1732584194,g=271733878,E=0;E<n.length;E+=16){var a=p,l=h,t=v,C=g;p=d(p,h,v,g,n[E+0],7,-680876936),g=d(g,p,h,v,n[E+1],12,-389564586),v=d(v,g,p,h,n[E+2],17,606105819),h=d(h,v,g,p,n[E+3],22,-1044525330),p=d(p,h,v,g,n[E+4],7,-176418897),g=d(g,p,h,v,n[E+5],12,1200080426),v=d(v,g,p,h,n[E+6],17,-1473231341),h=d(h,v,g,p,n[E+7],22,-45705983),p=d(p,h,v,g,n[E+8],7,1770035416),g=d(g,p,h,v,n[E+9],12,-1958414417),v=d(v,g,p,h,n[E+10],17,-42063),h=d(h,v,g,p,n[E+11],22,-1990404162),p=d(p,h,v,g,n[E+12],7,1804603682),g=d(g,p,h,v,n[E+13],12,-40341101),v=d(v,g,p,h,n[E+14],17,-1502002290),h=d(h,v,g,p,n[E+15],22,1236535329),p=f(p,h,v,g,n[E+1],5,-165796510),g=f(g,p,h,v,n[E+6],9,-1069501632),v=f(v,g,p,h,n[E+11],14,643717713),h=f(h,v,g,p,n[E+0],20,-373897302),p=f(p,h,v,g,n[E+5],5,-701558691),g=f(g,p,h,v,n[E+10],9,38016083),v=f(v,g,p,h,n[E+15],14,-660478335),h=f(h,v,g,p,n[E+4],20,-405537848),p=f(p,h,v,g,n[E+9],5,568446438),g=f(g,p,h,v,n[E+14],9,-1019803690),v=f(v,g,p,h,n[E+3],14,-187363961),h=f(h,v,g,p,n[E+8],20,1163531501),p=f(p,h,v,g,n[E+13],5,-1444681467),g=f(g,p,h,v,n[E+2],9,-51403784),v=f(v,g,p,h,n[E+7],14,1735328473),h=f(h,v,g,p,n[E+12],20,-1926607734),p=_(p,h,v,g,n[E+5],4,-378558),g=_(g,p,h,v,n[E+8],11,-2022574463),v=_(v,g,p,h,n[E+11],16,1839030562),h=_(h,v,g,p,n[E+14],23,-35309556),p=_(p,h,v,g,n[E+1],4,-1530992060),g=_(g,p,h,v,n[E+4],11,1272893353),v=_(v,g,p,h,n[E+7],16,-155497632),h=_(h,v,g,p,n[E+10],23,-1094730640),p=_(p,h,v,g,n[E+13],4,681279174),g=_(g,p,h,v,n[E+0],11,-358537222),v=_(v,g,p,h,n[E+3],16,-722521979),h=_(h,v,g,p,n[E+6],23,76029189),p=_(p,h,v,g,n[E+9],4,-640364487),g=_(g,p,h,v,n[E+12],11,-421815835),v=_(v,g,p,h,n[E+15],16,530742520),h=_(h,v,g,p,n[E+2],23,-995338651),p=c(p,h,v,g,n[E+0],6,-198630844),g=c(g,p,h,v,n[E+7],10,1126891415),v=c(v,g,p,h,n[E+14],15,-1416354905),h=c(h,v,g,p,n[E+5],21,-57434055),p=c(p,h,v,g,n[E+12],6,1700485571),g=c(g,p,h,v,n[E+3],10,-1894986606),v=c(v,g,p,h,n[E+10],15,-1051523),h=c(h,v,g,p,n[E+1],21,-2054922799),p=c(p,h,v,g,n[E+8],6,1873313359),g=c(g,p,h,v,n[E+15],10,-30611744),v=c(v,g,p,h,n[E+6],15,-1560198380),h=c(h,v,g,p,n[E+13],21,1309151649),p=c(p,h,v,g,n[E+4],6,-145523070),g=c(g,p,h,v,n[E+11],10,-1120210379),v=c(v,g,p,h,n[E+2],15,718787259),h=c(h,v,g,p,n[E+9],21,-343485551),p=o(p,a),h=o(h,l),v=o(v,t),g=o(g,C)}return Array(p,h,v,g)}function P(n,u,p,h,v,g){return o(i(o(o(u,n),o(h,g)),v),p)}function d(n,u,p,h,v,g,E){return P(u&p|~u&h,n,u,v,g,E)}function f(n,u,p,h,v,g,E){return P(u&h|p&~h,n,u,v,g,E)}function _(n,u,p,h,v,g,E){return P(u^p^h,n,u,v,g,E)}function c(n,u,p,h,v,g,E){return P(p^(u|~h),n,u,v,g,E)}function o(n,u){var p=(n&65535)+(u&65535),h=(n>>16)+(u>>16)+(p>>16);return h<<16|p&65535}function i(n,u){return n<<u|n>>>32-u}Y.exports=function(u){return D.hash(u,S,16)}},{"./helpers":285}],287:[function(j,Y,M){"use strict";var D=j("./helpers");function m(_,c){_[c>>5]|=128<<24-c%32,_[(c+64>>9<<4)+15]=c;for(var o=Array(80),i=1732584193,n=-271733879,u=-1732584194,p=271733878,h=-1009589776,v=0;v<_.length;v+=16){for(var g=i,E=n,a=u,l=p,t=h,C=0;C<80;C++){C<16?o[C]=_[v+C]:o[C]=f(o[C-3]^o[C-8]^o[C-14]^o[C-16],1);var w=d(d(f(i,5),S(C,n,u,p)),d(d(h,o[C]),P(C)));h=p,p=u,u=f(n,30),n=i,i=w}i=d(i,g),n=d(n,E),u=d(u,a),p=d(p,l),h=d(h,t)}return Array(i,n,u,p,h)}function S(_,c,o,i){return _<20?c&o|~c&i:_<40?c^o^i:_<60?c&o|c&i|o&i:c^o^i}function P(_){return _<20?1518500249:_<40?1859775393:_<60?-1894007588:-899497514}function d(_,c){var o=(_&65535)+(c&65535),i=(_>>16)+(c>>16)+(o>>16);return i<<16|o&65535}function f(_,c){return _<<c|_>>>32-c}Y.exports=function(c){return D.hash(c,m,20,!0)}},{"./helpers":285}],288:[function(j,Y,M){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(j,Y,M){(function(D){"use strict";var m=j("babel-runtime/helpers/typeof"),S=P(m);function P(i){return i&&i.__esModule?i:{default:i}}var d=j("stream"),f=d.Stream,_=j("../lib/common/utils/isArray"),c=_.isArray;Y.exports.string=function(n){return typeof n=="string"},Y.exports.array=c,Y.exports.buffer=D.isBuffer;function o(i){return i instanceof f}Y.exports.writableStream=function(n){return o(n)&&typeof n._write=="function"&&(0,S.default)(n._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,Y,M){"use strict";M.encodeURIComponent=function(D){try{return encodeURIComponent(D)}catch(m){return D}},M.escape=j("escape-html"),M.timestamp=function(m){if(m){var S=m;return typeof S=="string"&&(S=Number(S)),String(m).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Y,M){(function(D,m){"use strict";var S=j("babel-runtime/core-js/json/stringify"),P=_(S),d=j("babel-runtime/helpers/typeof"),f=_(d);function _(C){return C&&C.__esModule?C:{default:C}}var c=j("util"),o=j("url"),i=j("http"),n=j("https"),u=j("debug")("urllib"),p=j("humanize-ms"),h,v=0,g=Math.pow(2,31)-10,E=/^https?:\/\//i;function a(C,w){return C===void 0?w:C}function l(C,w){return function(s,L,O){if(s)return w(s);C({data:L,status:O.statusCode,headers:O.headers,res:O})}}M.TIMEOUTS=[p("300s"),p("300s")];var t=["json","text"];M.request=function(w,s,L){return arguments.length===2&&typeof s=="function"&&(L=s,s=null),typeof L=="function"?M.requestWithCallback(w,s,L):(h||(h=j("any-promise")),new h(function(O,x){M.requestWithCallback(w,s,l(O,x))}))},M.requestWithCallback=function(w,s,L){if(!w||typeof w!="string"&&(typeof w=="undefined"?"undefined":(0,f.default)(w))!=="object"){var O=c.format("expect request url to be a string or a http request options, but got %j",w);throw new Error(O)}arguments.length===2&&typeof s=="function"&&(L=s,s=null),s=s||{},v>=g&&(v=0);var x=++v;s.requestUrls=s.requestUrls||[];var b={requestId:x,url:w,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",b),s.timeout=s.timeout||M.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var y=Date.now(),T;typeof w=="string"?(E.test(w)||(w="http://"+w),T=o.parse(w)):T=w;var k=(s.type||s.method||T.method||"GET").toUpperCase(),N=T.port||80,I=i,W=a(s.agent,M.agent),K=s.fixJSONCtlChars;T.protocol==="https:"&&(I=n,W=a(s.httpsAgent,M.httpsAgent),T.port||(N=443));var U={host:T.hostname||T.host||"localhost",path:T.path||"/",method:k,port:N,agent:W,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?U.requestTimeout=s.timeout[s.timeout.length-1]:typeof s.timeout!="undefined"&&(U.requestTimeout=s.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<z.length;B++){var H=z[B];s.hasOwnProperty(H)&&(U[H]=s[H])}U.rejectUnauthorized===!1&&!U.hasOwnProperty("secureOptions")&&(U.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var G=s.auth||T.auth;G&&(U.auth=G);var ee=s.content||s.data,ie=k==="GET"||k==="HEAD"||s.dataAsQueryString;if(!s.content&&(ee&&!(typeof ee=="string"||m.isBuffer(ee))))if(ie)ee=s.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee);else{var ue=U.headers["Content-Type"]||U.headers["content-type"];ue||(s.contentType==="json"?ue="application/json":ue="application/x-www-form-urlencoded",U.headers["Content-Type"]=ue),parseContentType(ue).type==="application/json"?ee=(0,P.default)(ee):ee=s.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee)}ie&&ee&&(U.path+=(T.query?"&":"?")+ee,ee=null);var xe=0;if(ee){var Te=ee.length;m.isBuffer(ee)||(Te=m.byteLength(ee)),xe=U.headers["Content-Length"]=Te}s.dataType==="json"&&(U.headers.Accept="application/json"),typeof s.beforeRequest=="function"&&s.beforeRequest(U);var se=null,ve=null,de=null,ne=!1,ae=!1,Z=0,le=-1,Q=!1,q="",be="",te=null;s.timing&&(te={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){se&&(clearTimeout(se),se=null)}function X(){ve&&(clearTimeout(ve),ve=null)}function $(Se,Ye,it){if(X(),!L){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),x,D.pid,U.method,w),Se&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),x,D.pid,Se.name,Se.message,Se.stack);return}var Ke=L;L=null;var qe={};if(it&&(le=it.statusCode,qe=it.headers),le===401&&qe["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var ke=qe["www-authenticate"];if(ke.indexOf("Digest ")>=0)return u("Request#%d %s: got digest auth header WWW-Authenticate: %s",x,w,ke),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(U.method,U.path,ke,s.digestAuth),u("Request#%d %s: auth with digest header: %s",x,w,s.headers.Authorization),it.headers["set-cookie"]&&(s.headers.Cookie=it.headers["set-cookie"].join(";")),M.requestWithCallback(w,s,Ke)}var Oe=Date.now()-y;te&&(te.contentDownload=Oe),u("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Oe,Z,le,U.method,U.host,U.path,ae,te);var Re={status:le,statusCode:le,headers:qe,size:Z,aborted:Q,rt:Oe,keepAliveSocket:ae,data:Ye,requestUrls:s.requestUrls,timing:te,remoteAddress:q,remotePort:be};if(Se){var pe="";W&&typeof W.getCurrentStatus=="function"&&(pe=", agent status: "+(0,P.default)(W.getCurrentStatus())),Se.message+=", "+U.method+" "+w+" "+le+" (connected: "+ne+", keepalive socket: "+ae+pe+`)
headers: `+(0,P.default)(qe),Se.data=Ye,Se.path=U.path,Se.status=le,Se.headers=qe,Se.res=Re}Ke(Se,Ye,s.streaming?it:Re),s.emitter&&(b.url=w,b.socket=st&&st.connection,b.options=U,b.size=xe,s.emitter.emit("response",{requestId:x,error:Se,ctx:s.ctx,req:b,res:Re}))}function ge(Se){var Ye=null;if(s.followRedirect&&statuses.redirect[Se.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var it=Se.headers.location;if(!it)Ye=new Error("Got statusCode "+Se.statusCode+" but cannot resolve next location from headers"),Ye.name="FollowRedirectError";else if(s._followRedirectCount>s.maxRedirects)Ye=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+w),Ye.name="MaxRedirectError";else{var Ke=s.formatRedirectUrl?s.formatRedirectUrl(w,it):o.resolve(w,it);u("Request#%d %s: `redirected` from %s to %s",x,U.path,w,Ke),X(),s.headers&&s.headers.Host&&E.test(it)&&(s.headers.Host=null);var qe=L;return L=null,M.requestWithCallback(Ke,s,qe),{redirect:!0,error:null}}}return{redirect:!1,error:Ye}}!U.headers["User-Agent"]&&!U.headers["user-agent"]&&(U.headers["User-Agent"]=navigator.userAgent),s.gzip&&(!U.headers["Accept-Encoding"]&&!U.headers["accept-encoding"]&&(U.headers["Accept-Encoding"]="gzip"));function fe(Se,Ye,it){var Ke=Se.headers["content-encoding"];return it(null,Ye,Ke)}var _e=s.writeStream;u("Request#%d %s %s with headers %j, options.path: %s",x,k,w,U.headers,U.path),s.requestUrls.push(w);function He(Se){if(te&&(te.waiting=Date.now()-y),u("Request#%d %s `req response` event emit: status %d, headers: %j",x,w,Se.statusCode,Se.headers),s.streaming){var Ye=ge(Se);if(Ye.redirect){Se.resume();return}return Ye.error?(Se.resume(),$(Ye.error,null,Se)):$(null,null,Se)}if(Se.on("close",function(){u("Request#%d %s: `res close` event emit, total size %d",x,w,Z)}),Se.on("error",function(){u("Request#%d %s: `res error` event emit, total size %d",x,w,Z)}),Se.on("aborted",function(){Q=!0,u("Request#%d %s: `res aborted` event emit, total size %d",x,w,Z)}),_e){var Ye=ge(Se);if(Ye.redirect){Se.resume();return}return Ye.error?(Se.resume(),_e.end(),$(Ye.error,null,Se)):(s.consumeWriteStream===!1?Se.on("end",$.bind(null,null,null,Se)):isNode010||isNode012?first([[_e,"close"],[Se,"aborted"]],function(qe,ke,Oe){u("Request#%d %s: writeStream or res %s event emitted",x,w,Oe),$(de||null,null,Se)}):_e.on("close",function(){u("Request#%d %s: writeStream close event emitted",x,w),$(de||null,null,Se)}),Se.pipe(_e))}var it=[];Se.on("data",function(Ke){u("Request#%d %s: `res data` event emit, size %d",x,w,Ke.length),Z+=Ke.length,it.push(Ke)}),Se.on("end",function(){var Ke=m.concat(it,Z);if(u("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",x,w,Z,Se._dumped),de)return $(de,Ke,Se);var qe=ge(Se);if(qe.error)return $(qe.error,Ke,Se);if(qe.redirect)return;fe(Se,Ke,function(ke,Oe,Re){if(ke)return $(ke,Ke,Se);if(!Re&&t.indexOf(s.dataType)>=0){try{Oe=decodeBodyByCharset(Oe,Se)}catch(Ee){return u("decodeBodyByCharset error: %s",Ee),$(null,Oe,Se)}if(s.dataType==="json")if(Z===0)Oe=null;else{var pe=parseJSON(Oe,K);pe.error?ke=pe.error:Oe=pe.data}}Q&&u("Request#%d %s: Remote socket was terminated before `response.end()` was called",x,w),$(ke,Oe,Se)})})}var $e,Ve;Array.isArray(s.timeout)?($e=p(s.timeout[0]),Ve=p(s.timeout[1])):$e=Ve=p(s.timeout),u("ConnectTimeout: %d, ResponseTimeout: %d",$e,Ve);function et(){u("Connect timer ticking, timeout: %d",$e),se=setTimeout(function(){se=null,le===-1&&(le=-2);var Se="Connect timeout for "+$e+"ms",Ye="ConnectionTimeoutError";st.socket||(Ye="SocketAssignTimeoutError",Se+=", working sockets is full"),de=new Error(Se),de.name=Ye,de.requestId=x,u("ConnectTimeout: Request#%d %s %s: %s, connected: %s",x,w,de.name,Se,ne),Me()},$e)}function at(){u("Response timer ticking, timeout: %d",Ve),ve=setTimeout(function(){ve=null;var Se="Response timeout for "+Ve+"ms",Ye="ResponseTimeoutError";de=new Error(Se),de.name=Ye,de.requestId=x,u("ResponseTimeout: Request#%d %s %s: %s, connected: %s",x,w,de.name,Se,ne),Me()},Ve)}var st;U.mode=s.mode?s.mode:"";try{st=I.request(U,He)}catch(Se){return $(Se)}typeof window=="undefined"?et():st.on("requestTimeout",function(){le===-1&&(le=-2);var Se="Connect timeout for "+$e+"ms",Ye="ConnectionTimeoutError";de=new Error(Se),de.name=Ye,de.requestId=x,Me()});function Me(){u("Request#%d %s abort, connected: %s",x,w,ne),st.socket||(de.noSocket=!0,$(de)),st.abort()}return te&&st.on("finish",function(){te.requestSent=Date.now()-y}),st.once("socket",function(Se){te&&(te.queuing=Date.now()-y),isNode010&&Se.socket&&(Se=Se.socket);var Ye=Se.readyState;if(Ye==="opening"){Se.once("lookup",function(it,Ke,qe){u("Request#%d %s lookup: %s, %s, %s",x,w,it,Ke,qe),te&&(te.dnslookup=Date.now()-y),Ke&&(q=Ke)}),Se.once("connect",function(){te&&(te.connected=Date.now()-y),J(),at(),u("Request#%d %s new socket connected",x,w),ne=!0,q||(q=Se.remoteAddress),be=Se.remotePort});return}u("Request#%d %s reuse socket connected, readyState: %s",x,w,Ye),ne=!0,ae=!0,q||(q=Se.remoteAddress),be=Se.remotePort,J(),at()}),st.on("error",function(Se){(Se.name==="Error"||Se.name==="TypeError")&&(Se.name=ne?"ResponseError":"RequestError"),Se.message+=' (req "error")',u("Request#%d %s `req error` event emit, %s: %s",x,w,Se.name,Se.message),$(de||Se)}),_e&&_e.once("error",function(Se){Se.message+=' (writeStream "error")',de=Se,u("Request#%d %s `writeStream error` event emit, %s: %s",x,w,Se.name,Se.message),Me()}),s.stream?(s.stream.pipe(st),s.stream.once("error",function(Se){Se.message+=' (stream "error")',de=Se,u("Request#%d %s `readStream error` event emit, %s: %s",x,w,Se.name,Se.message),Me()})):st.end(ee),st.requestId=x,st}}).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,Y,M){"use strict";M.d(Y,"a",function(){return c});var D=M("cDcd"),m=M("biw7"),S=M("fyJ8");function P(o){var i=o.className,n=o.index,u=o.children,p=o.colSpan,h=o.rowSpan,v=D.useContext(m.a),g=v.prefixCls,E=v.fixedInfoList,a=E[n];return D.createElement(S.a,Object.assign({className:i,index:n,component:"td",prefixCls:g,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:p,rowSpan:h}}}},a))}function d(o){return D.createElement("tr",Object.assign({},o))}function f(o){var i=o.children,n=D.useContext(m.a),u=n.prefixCls;return D.createElement("tfoot",{className:"".concat(u,"-summary")},i)}var _=Y.b=f,c={Cell:P,Row:d}},nVVt:function(j,Y){j.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},oRuE:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.Iso10126={pad:function(m,S){var P=S*4,d=P-m.sigBytes%P;m.concat(D.lib.WordArray.random(d-1)).concat(D.lib.WordArray.create([d<<24],1))},unpad:function(m){var S=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=S}},D.pad.Iso10126})},osHv:function(j,Y,M){(function(D){D(M("VrN/"))})(function(D){"use strict";var m=D.Pos;function S(E,a){return E.line-a.line||E.ch-a.ch}var P="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",d=P+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",f=new RegExp("<(/?)(["+P+"]["+d+"]*)","g");function _(E,a,l,t){this.line=a,this.ch=l,this.cm=E,this.text=E.getLine(a),this.min=t?Math.max(t.from,E.firstLine()):E.firstLine(),this.max=t?Math.min(t.to-1,E.lastLine()):E.lastLine()}function c(E,a){var l=E.cm.getTokenTypeAt(m(E.line,a));return l&&/\btag\b/.test(l)}function o(E){return E.line>=E.max?void 0:(E.ch=0,E.text=E.cm.getLine(++E.line),!0)}function i(E){return E.line<=E.min?void 0:(E.text=E.cm.getLine(--E.line),E.ch=E.text.length,!0)}function n(E){for(;;){var a=E.text.indexOf(">",E.ch);if(a==-1){if(o(E))continue;return}if(!c(E,a+1)){E.ch=a+1;continue}var l=E.text.lastIndexOf("/",a),t=l>-1&&!/\S/.test(E.text.slice(l+1,a));return E.ch=a+1,t?"selfClose":"regular"}}function u(E){for(;;){var a=E.ch?E.text.lastIndexOf("<",E.ch-1):-1;if(a==-1){if(i(E))continue;return}if(!c(E,a+1)){E.ch=a;continue}f.lastIndex=a,E.ch=a;var l=f.exec(E.text);if(l&&l.index==a)return l}}function p(E){for(;;){f.lastIndex=E.ch;var a=f.exec(E.text);if(!a){if(o(E))continue;return}if(!c(E,a.index+1)){E.ch=a.index+1;continue}return E.ch=a.index+a[0].length,a}}function h(E){for(;;){var a=E.ch?E.text.lastIndexOf(">",E.ch-1):-1;if(a==-1){if(i(E))continue;return}if(!c(E,a+1)){E.ch=a;continue}var l=E.text.lastIndexOf("/",a),t=l>-1&&!/\S/.test(E.text.slice(l+1,a));return E.ch=a+1,t?"selfClose":"regular"}}function v(E,a){for(var l=[];;){var t=p(E),C,w=E.line,s=E.ch-(t?t[0].length:0);if(!t||!(C=n(E)))return;if(C=="selfClose")continue;if(t[1]){for(var L=l.length-1;L>=0;--L)if(l[L]==t[2]){l.length=L;break}if(L<0&&(!a||a==t[2]))return{tag:t[2],from:m(w,s),to:m(E.line,E.ch)}}else l.push(t[2])}}function g(E,a){for(var l=[];;){var t=h(E);if(!t)return;if(t=="selfClose"){u(E);continue}var C=E.line,w=E.ch,s=u(E);if(!s)return;if(s[1])l.push(s[2]);else{for(var L=l.length-1;L>=0;--L)if(l[L]==s[2]){l.length=L;break}if(L<0&&(!a||a==s[2]))return{tag:s[2],from:m(E.line,E.ch),to:m(C,w)}}}}D.registerHelper("fold","xml",function(E,a){for(var l=new _(E,a.line,0);;){var t=p(l);if(!t||l.line!=a.line)return;var C=n(l);if(!C)return;if(!t[1]&&C!="selfClose"){var w=m(l.line,l.ch),s=v(l,t[2]);return s&&S(s.from,w)>0?{from:w,to:s.from}:null}}}),D.findMatchingTag=function(E,a,l){var t=new _(E,a.line,a.ch,l);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var C=n(t),w=C&&m(t.line,t.ch),s=C&&u(t);if(!C||!s||S(t,a)>0)return;var L={from:m(t.line,t.ch),to:w,tag:s[2]};return C=="selfClose"?{open:L,close:null,at:"open"}:s[1]?{open:g(t,s[2]),close:L,at:"close"}:(t=new _(E,w.line,w.ch,l),{open:L,close:v(t,s[2]),at:"open"})},D.findEnclosingTag=function(E,a,l,t){for(var C=new _(E,a.line,a.ch,l);;){var w=g(C,t);if(!w)break;var s=new _(E,a.line,a.ch,l),L=v(s,w.tag);if(L)return{open:w,close:L}}},D.scanForClosingTag=function(E,a,l,t){var C=new _(E,a.line,a.ch,t?{from:0,to:t}:null);return v(C,l)}})},p5ED:function(j,Y,M){"use strict";var D=M("+L6B"),m=M("2/Rp"),S=M("5Dmo"),P=M("3S7+"),d=M("k1fw"),f=M("tJVT"),_=M("cDcd"),c=M.n(_),o=M("vHTk"),i=M.n(o),n=M("yEEn"),u=M("ZW9T"),p=M("1vsH");Y.a=function(h){var v=h.name,g=h.data,E=h.theme,a=h.type,l=h.filename,t=h.monacoEditor,C=h.className,w=h.style,s=h.close,L=h.onClose,O=h.hasMask,x=Object(_.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),b=Object(f.a)(x,2),y=b[0],T=b[1],k=Object(_.useState)(""),N=Object(f.a)(k,2),I=N[0],W=N[1],K,U=1024*1024,z=10*U,B=Object(_.useRef)();a==="office"&&(K=Object(p.V)(g).filesize,K>z&&(a="other")),l&&(t.filename=l),Object(_.useEffect)(function(){var ee,ie,ue=(ee=document.cookie)===null||ee===void 0||((ie=ee.replace(/\s/g,""))===null||ie===void 0)?void 0:ie.split(";");ue==null||ue.map(function(xe){var Te=xe.split("=");Te[0]==="_educoder_session"&&W(Te[1])})},[]);var H=function(){if(g.startsWith("http")||g.startsWith("blob:")){G();return}Object(p.z)(l||"educoder",g,l)},G=function(){Object(p.x)(l||"educoder",decodeURIComponent(g))};return console.log("data:",g,"fileanme:",l," name:",v),c.a.createElement("div",{style:Object(d.a)({},w||{}),className:"".concat(O&&i.a.bgBlack," ").concat(a?i.a.wrp:"hide")},s&&c.a.createElement("div",{className:i.a.close,ref:B},c.a.createElement(P.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},c.a.createElement("span",{onClick:G},c.a.createElement("i",{className:"icon-quxiaozhiding"}))),c.a.createElement(P.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},c.a.createElement("span",{className:"",onClick:L},c.a.createElement("i",{className:"icon-guanbi1"})))),c.a.createElement("div",{className:"".concat(i.a[C]," ").concat(C," ").concat(i.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&c.a.createElement(u.b,t)),a==="audio"&&c.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}),a==="video"&&c.a.createElement(c.a.Fragment,null,g!=null&&g.startsWith("/")?c.a.createElement("video",{controls:!0,src:"".concat(g),autoPlay:!0}):c.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})),a==="html"&&c.a.createElement("iframe",{src:g+"&disposition=inline"}),a==="html"&&c.a.createElement("iframe",{src:g+"&disposition=inline"}),a==="pdf"&&c.a.createElement("embed",{className:i.a.embed,src:g}),a==="image"&&c.a.createElement(c.a.Fragment,null,c.a.createElement("img",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(g)})),a==="other"&&c.a.createElement("div",null,c.a.createElement(m.a,{type:"primary",size:"large",onClick:H},c.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&c.a.createElement(m.a,{type:"primary",size:"large",onClick:H},c.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,Y,M){},pA7S:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=S.BlockCipher,f=m.algo,_=[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],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{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}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=f.DES=d.extend({_doReset:function(){for(var g=this._key,E=g.words,a=[],l=0;l<56;l++){var t=_[l]-1;a[l]=E[t>>>5]>>>31-t%32&1}for(var C=this._subKeys=[],w=0;w<16;w++){for(var s=C[w]=[],L=o[w],l=0;l<24;l++)s[l/6|0]|=a[(c[l]-1+L)%28]<<31-l%6,s[4+(l/6|0)]|=a[28+(c[l+24]-1+L)%28]<<31-l%6;s[0]=s[0]<<1|s[0]>>>31;for(var l=1;l<7;l++)s[l]=s[l]>>>(l-1)*4+3;s[7]=s[7]<<5|s[7]>>>27}for(var O=this._invSubKeys=[],l=0;l<16;l++)O[l]=C[15-l]},encryptBlock:function(g,E){this._doCryptBlock(g,E,this._subKeys)},decryptBlock:function(g,E){this._doCryptBlock(g,E,this._invSubKeys)},_doCryptBlock:function(g,E,a){this._lBlock=g[E],this._rBlock=g[E+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var l=0;l<16;l++){for(var t=a[l],C=this._lBlock,w=this._rBlock,s=0,L=0;L<8;L++)s|=i[L][((w^t[L])&n[L])>>>0];this._lBlock=w,this._rBlock=C^s}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),g[E]=this._lBlock,g[E+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(g,E){var a=(this._lBlock>>>g^this._rBlock)&E;this._rBlock^=a,this._lBlock^=a<<g}function h(g,E){var a=(this._rBlock>>>g^this._lBlock)&E;this._lBlock^=a,this._rBlock^=a<<g}m.DES=d._createHelper(u);var v=f.TripleDES=d.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 a=E.slice(0,2),l=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=u.createEncryptor(P.create(a)),this._des2=u.createEncryptor(P.create(l)),this._des3=u.createEncryptor(P.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});m.TripleDES=d._createHelper(v)}(),D.TripleDES})},pIsd:function(j,Y,M){var D=M("BJfS"),m=function(d){var f=/[height|width]$/;return f.test(d)},S=function(d){var f="",_=Object.keys(d);return _.forEach(function(c,o){var i=d[c];c=D(c),m(c)&&typeof i=="number"&&(i=i+"px"),i===!0?f+=c:i===!1?f+="not "+c:f+="("+c+": "+i+")",o<_.length-1&&(f+=" and ")}),f},P=function(d){var f="";return typeof d=="string"?d:d instanceof Array?(d.forEach(function(_,c){f+=S(_),c<d.length-1&&(f+=", ")}),f):S(d)};j.exports=P},qBft:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.AnsiX923={pad:function(m,S){var P=m.sigBytes,d=S*4,f=d-P%d,_=P+f-1;m.clamp(),m.words[_>>>2]|=f<<24-_%4*8,m.sigBytes+=f},unpad:function(m){var S=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=S}},D.pad.Ansix923})},qHvr:function(j,Y,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("5NDa"),P=M("5rEg"),d=M("miYZ"),f=M("tsqr"),_=M("tJVT"),c=M("cDcd"),o=M.n(c),i=M("4i/N");function n(u){var p=u.isAddmodle,h=u.setIsAdd,v=u.createTeam,g=Object(c.useState)(""),E=Object(_.a)(g,2),a=E[0],l=E[1];return o.a.createElement(m.a,{centered:!0,title:o.a.createElement("div",{style:{alignItems:"center",display:"flex"}},o.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),o.a.createElement(i.a,{onClick:function(){return h(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!a){f.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}v(a)},onCancel:function(){return h(!1)}},o.a.createElement("div",null,o.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",o.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},o.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:a,maxLength:60,addonAfter:String(a&&a.length||0)+"/60",onChange:function(C){return l(C.target.value)}}))))}Y.a=n},qM6L:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=m.enc,f=d.Utf16=d.Utf16BE={stringify:function(c){for(var o=c.words,i=c.sigBytes,n=[],u=0;u<i;u+=2){var p=o[u>>>2]>>>16-u%4*8&65535;n.push(String.fromCharCode(p))}return n.join("")},parse:function(c){for(var o=c.length,i=[],n=0;n<o;n++)i[n>>>1]|=c.charCodeAt(n)<<16-n%2*16;return P.create(i,o*2)}};d.Utf16LE={stringify:function(c){for(var o=c.words,i=c.sigBytes,n=[],u=0;u<i;u+=2){var p=_(o[u>>>2]>>>16-u%4*8&65535);n.push(String.fromCharCode(p))}return n.join("")},parse:function(c){for(var o=c.length,i=[],n=0;n<o;n++)i[n>>>1]|=_(c.charCodeAt(n)<<16-n%2*16);return P.create(i,o*2)}};function _(c){return c<<8&4278255360|c>>>8&16711935}}(),D.enc.Utf16})},qu8F:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return D.mode.CTRGladman=function(){var m=D.lib.BlockCipherMode.extend();function S(f){if((f>>24&255)===255){var _=f>>16&255,c=f>>8&255,o=f&255;_===255?(_=0,c===255?(c=0,o===255?o=0:++o):++c):++_,f=0,f+=_<<16,f+=c<<8,f+=o}else f+=1<<24;return f}function P(f){return(f[0]=S(f[0]))===0&&(f[1]=S(f[1])),f}var d=m.Encryptor=m.extend({processBlock:function(f,_){var c=this._cipher,o=c.blockSize,i=this._iv,n=this._counter;i&&(n=this._counter=i.slice(0),this._iv=void 0),P(n);var u=n.slice(0);c.encryptBlock(u,0);for(var p=0;p<o;p++)f[_+p]^=u[p]}});return m.Decryptor=d,m}(),D.mode.CTRGladman})},"rAM+":function(j,Y,M){"use strict";M.d(Y,"a",function(){return m});var D=M("Qw5x");function m(S,P){var d;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(d=Object(D.a)(S))||P&&S&&typeof S.length=="number"){d&&(S=d);var f=0,_=function(){};return{s:_,n:function(){return f>=S.length?{done:!0}:{done:!1,value:S[f++]}},e:function(u){throw u},f:_}}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 c=!0,o=!1,i;return{s:function(){d=S[Symbol.iterator]()},n:function(){var u=d.next();return c=u.done,u},e:function(u){o=!0,i=u},f:function(){try{!c&&d.return!=null&&d.return()}finally{if(o)throw i}}}}},rUJ1:function(j,Y){const M=/[&<>"']/,D=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=O=>P[O];function f(O,x){if(x){if(M.test(O))return O.replace(D,d)}else if(m.test(O))return O.replace(S,d);return O}const _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(O){return O.replace(_,(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 o=/(^|[^\[])\^/g;function i(O,x){O=O.source||O,x=x||"";const b={replace:(y,T)=>(T=T.source||T,T=T.replace(o,"$1"),O=O.replace(y,T),b),getRegex:()=>new RegExp(O,x)};return b}const n=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(O,x,b){if(O){let y;try{y=decodeURIComponent(c(b)).replace(n,"").toLowerCase()}catch(T){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}x&&!u.test(b)&&(b=a(x,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(y){return null}return b}const h={},v=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(O,x){h[" "+O]||(v.test(O)?h[" "+O]=O+"/":h[" "+O]=w(O,"/",!0)),O=h[" "+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 l={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 C(O,x){const b=O.replace(/\|/g,(k,N,I)=>{let W=!1,K=N;for(;--K>=0&&I[K]==="\\";)W=!W;return W?"|":" |"}),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 w(O,x,b){const y=O.length;if(y===0)return"";let T=0;for(;T<y;){const k=O.charAt(y-T-1);if(k===x&&!b)T++;else if(k!==x&&b)T++;else break}return O.substr(0,y-T)}function s(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 L(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}j.exports={escape:f,unescape:c,edit:i,cleanUrl:p,resolveUrl:a,noopTest:l,merge:t,splitCells:C,rtrim:w,findClosingBracket:s,checkSanitizeDeprecation:L}},rcnY:function(j,Y,M){var D=M("aRTE");function m(S,P){this.totalCount=S,this.dataCount=P}m.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],m.getRSBlocks=function(S,P){var d=m.getRsBlockTable(S,P);if(d==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+P);for(var f=d.length/3,_=new Array,c=0;c<f;c++)for(var o=d[c*3+0],i=d[c*3+1],n=d[c*3+2],u=0;u<o;u++)_.push(new m(i,n));return _},m.getRsBlockTable=function(S,P){switch(P){case D.L:return m.RS_BLOCK_TABLE[(S-1)*4+0];case D.M:return m.RS_BLOCK_TABLE[(S-1)*4+1];case D.Q:return m.RS_BLOCK_TABLE[(S-1)*4+2];case D.H:return m.RS_BLOCK_TABLE[(S-1)*4+3];default:return}},j.exports=m},sR1s:function(j,Y,M){"use strict";M.d(Y,"b",function(){return P}),M.d(Y,"a",function(){return d}),M.d(Y,"c",function(){return f}),M.d(Y,"d",function(){return _});var D=M("U8pU"),m="RC_TABLE_KEY";function S(c){return c==null?[]:Array.isArray(c)?c:[c]}function P(c,o){if(!o&&typeof o!="number")return c;for(var i=S(o),n=c,u=0;u<i.length;u+=1){if(!n)return null;var p=i[u];n=n[p]}return n}function d(c){var o=[],i={};return c.forEach(function(n){for(var u=n||{},p=u.key,h=u.dataIndex,v=p||S(h).join("-")||m;i[v];)v="".concat(v,"_next");i[v]=!0,o.push(v)}),o}function f(){var c={};function o(p,h){h&&Object.keys(h).forEach(function(v){var g=h[v];g&&Object(D.a)(g)==="object"?(p[v]=p[v]||{},o(p[v],g)):p[v]=g})}for(var i=arguments.length,n=new Array(i),u=0;u<i;u++)n[u]=arguments[u];return n.forEach(function(p){o(c,p)}),c}function _(c){return c!=null}},sboe:function(j,Y,M){"use strict";M.d(Y,"a",function(){return S});var D=M("cDcd"),m=M.n(D),S=D.createContext(null)},t23M:function(j,Y,M){"use strict";var D=M("VTBJ"),m=M("1OyB"),S=M("vuIU"),P=M("Ji7U"),d=M("LK+K"),f=M("cDcd"),_=M.n(f),c=M("m+aA"),o=M("Zm9Q"),i=M("Kwbf"),n=M("c+Xe"),u=M("bdgK"),p="rc-observer-key",h=function(v){Object(P.a)(E,v);var g=Object(d.a)(E);function E(){var a;return Object(m.a)(this,E),a=g.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(l){var t=a.props.onResize,C=l[0].target,w=C.getBoundingClientRect(),s=w.width,L=w.height,O=C.offsetWidth,x=C.offsetHeight,b=Math.floor(s),y=Math.floor(L);if(a.state.width!==b||a.state.height!==y||a.state.offsetWidth!==O||a.state.offsetHeight!==x){var T={width:b,height:y,offsetWidth:O,offsetHeight:x};a.setState(T),t&&Promise.resolve().then(function(){t(Object(D.a)(Object(D.a)({},T),{},{offsetWidth:O,offsetHeight:x}))})}},a.setChildNode=function(l){a.childNode=l},a}return Object(S.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 l=this.props.disabled;if(l){this.destroyObserver();return}var t=Object(c.a)(this.childNode||this),C=t!==this.currentElement;C&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,t=Object(o.a)(l);if(t.length>1)Object(i.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(i.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var C=t[0];if(f.isValidElement(C)&&Object(n.c)(C)){var w=C.ref;t[0]=f.cloneElement(C,{ref:Object(n.a)(w,this.setChildNode)})}return t.length===1?t[0]:t.map(function(s,L){return!f.isValidElement(s)||"key"in s&&s.key!==null?s:f.cloneElement(s,{key:"".concat(p,"-").concat(L)})})}}]),E}(f.Component);h.displayName="ResizeObserver",Y.a=h},uGsb:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("MlIO"),M("1uat"))})(this,function(D){return function(){var m=D,S=m.x64,P=S.Word,d=S.WordArray,f=m.algo,_=f.SHA512,c=f.SHA384=_.extend({_doReset:function(){this._hash=new d.init([new P.init(3418070365,3238371032),new P.init(1654270250,914150663),new P.init(2438529370,812702999),new P.init(355462360,4144912697),new P.init(1731405415,4290775857),new P.init(2394180231,1750603025),new P.init(3675008525,1694076839),new P.init(1203062813,3204075428)])},_doFinalize:function(){var o=_._doFinalize.call(this);return o.sigBytes-=16,o}});m.SHA384=_._createHelper(c),m.HmacSHA384=_._createHmacHelper(c)}(),D.SHA384})},uGxW:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("OLod"))})(this,function(D){return D.pad.NoPadding={pad:function(){},unpad:function(){}},D.pad.NoPadding})},uK0f:function(j,Y,M){(function(D,m){j.exports=m()})(this,function(){"use strict";function D(m,S,P){P=P||{},P.childrenKeyName=P.childrenKeyName||"children";var d=m||[],f=[],_=0;do{var c=d.filter(function(o){return S(o,_)})[0];if(!c)break;f.push(c),d=c[P.childrenKeyName]||[],_+=1}while(d.length>0);return f}return D})},ulZh:function(j,Y,M){typeof window!="undefined"&&function(m,S){j.exports=S()}(this,function(){return function(D){var m={};function S(P){if(m[P])return m[P].exports;var d=m[P]={i:P,l:!1,exports:{}};return D[P].call(d.exports,d,d.exports,S),d.l=!0,d.exports}return S.m=D,S.c=m,S.d=function(P,d,f){S.o(P,d)||Object.defineProperty(P,d,{enumerable:!0,get:f})},S.r=function(P){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},S.t=function(P,d){if(d&1&&(P=S(P)),d&8)return P;if(d&4&&typeof P=="object"&&P&&P.__esModule)return P;var f=Object.create(null);if(S.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:P}),d&2&&typeof P!="string")for(var _ in P)S.d(f,_,function(c){return P[c]}.bind(null,_));return f},S.n=function(P){var d=P&&P.__esModule?function(){return P.default}:function(){return P};return S.d(d,"a",d),d},S.o=function(P,d){return Object.prototype.hasOwnProperty.call(P,d)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(D,m,S){"use strict";var P=Object.prototype.hasOwnProperty,d="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(d=!1));function _(n,u,p){this.fn=n,this.context=u,this.once=p||!1}function c(n,u,p,h,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new _(p,h||n,v),E=d?d+u:u;return n._events[E]?n._events[E].fn?n._events[E]=[n._events[E],g]:n._events[E].push(g):(n._events[E]=g,n._eventsCount++),n}function o(n,u){--n._eventsCount===0?n._events=new f:delete n._events[u]}function i(){this._events=new f,this._eventsCount=0}i.prototype.eventNames=function(){var u=[],p,h;if(this._eventsCount===0)return u;for(h in p=this._events)P.call(p,h)&&u.push(d?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},i.prototype.listeners=function(u){var p=d?d+u:u,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var v=0,g=h.length,E=new Array(g);v<g;v++)E[v]=h[v].fn;return E},i.prototype.listenerCount=function(u){var p=d?d+u:u,h=this._events[p];return h?h.fn?1:h.length:0},i.prototype.emit=function(u,p,h,v,g,E){var a=d?d+u:u;if(!this._events[a])return!1;var l=this._events[a],t=arguments.length,C,w;if(l.fn){l.once&&this.removeListener(u,l.fn,void 0,!0);switch(t){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,p),!0;case 3:return l.fn.call(l.context,p,h),!0;case 4:return l.fn.call(l.context,p,h,v),!0;case 5:return l.fn.call(l.context,p,h,v,g),!0;case 6:return l.fn.call(l.context,p,h,v,g,E),!0}for(w=1,C=new Array(t-1);w<t;w++)C[w-1]=arguments[w];l.fn.apply(l.context,C)}else{var s=l.length,L;for(w=0;w<s;w++){l[w].once&&this.removeListener(u,l[w].fn,void 0,!0);switch(t){case 1:l[w].fn.call(l[w].context);break;case 2:l[w].fn.call(l[w].context,p);break;case 3:l[w].fn.call(l[w].context,p,h);break;case 4:l[w].fn.call(l[w].context,p,h,v);break;default:if(!C)for(L=1,C=new Array(t-1);L<t;L++)C[L-1]=arguments[L];l[w].fn.apply(l[w].context,C)}}}return!0},i.prototype.on=function(u,p,h){return c(this,u,p,h,!1)},i.prototype.once=function(u,p,h){return c(this,u,p,h,!0)},i.prototype.removeListener=function(u,p,h,v){var g=d?d+u:u;if(!this._events[g])return this;if(!p)return o(this,g),this;var E=this._events[g];if(E.fn)E.fn===p&&(!v||E.once)&&(!h||E.context===h)&&o(this,g);else{for(var a=0,l=[],t=E.length;a<t;a++)(E[a].fn!==p||v&&!E[a].once||h&&E[a].context!==h)&&l.push(E[a]);l.length?this._events[g]=l.length===1?l[0]:l:o(this,g)}return this},i.prototype.removeAllListeners=function(u){var p;return u?(p=d?d+u:u,this._events[p]&&o(this,p)):(this._events=new f,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=d,i.EventEmitter=i,D.exports=i},"./node_modules/url-toolkit/src/url-toolkit.js":function(D,m,S){(function(P){var d=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,f=/^([^\/?#]*)([^]*)$/,_=/(?:\/|^)\.(?=\/)/g,c=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(i,n,u){if(u=u||{},i=i.trim(),n=n.trim(),!n){if(!u.alwaysNormalize)return i;var p=o.parseURL(i);if(!p)throw new Error("Error trying to parse base URL.");return p.path=o.normalizePath(p.path),o.buildURLFromParts(p)}var h=o.parseURL(n);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return u.alwaysNormalize?(h.path=o.normalizePath(h.path),o.buildURLFromParts(h)):n;var v=o.parseURL(i);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var g=f.exec(v.path);v.netLoc=g[1],v.path=g[2]}v.netLoc&&!v.path&&(v.path="/");var E={scheme:v.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(E.netLoc=v.netLoc,h.path[0]!=="/"))if(!h.path)E.path=v.path,h.params||(E.params=v.params,h.query||(E.query=v.query));else{var a=v.path,l=a.substring(0,a.lastIndexOf("/")+1)+h.path;E.path=o.normalizePath(l)}return E.path===null&&(E.path=u.alwaysNormalize?o.normalizePath(h.path):h.path),o.buildURLFromParts(E)},parseURL:function(i){var n=d.exec(i);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(i){for(i=i.split("").reverse().join("").replace(_,"");i.length!==(i=i.replace(c,"")).length;);return i.split("").reverse().join("")},buildURLFromParts:function(i){return i.scheme+i.netLoc+i.path+i.params+i.query+i.fragment}};D.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(D,m,S){function P(u){var p={};function h(g){if(p[g])return p[g].exports;var E=p[g]={i:g,l:!1,exports:{}};return u[g].call(E.exports,E,E.exports,h),E.l=!0,E.exports}h.m=u,h.c=p,h.i=function(g){return g},h.d=function(g,E,a){h.o(g,E)||Object.defineProperty(g,E,{configurable:!1,enumerable:!0,get:a})},h.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},h.n=function(g){var E=g&&g.__esModule?function(){return g.default}:function(){return g};return h.d(E,"a",E),E},h.o=function(g,E){return Object.prototype.hasOwnProperty.call(g,E)},h.p="/",h.oe=function(g){throw console.error(g),g};var v=h(h.s=ENTRY_MODULE);return v.default||v}var d="[\\.|\\-|\\+|\\w|/|@]+",f="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+d+").*?\\)";function _(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(u){return!isNaN(1*u)}function o(u,p,h){var v={};v[h]=[];var g=p.toString(),E=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!E)return v;for(var a=E[1],l=new RegExp("(\\\\n|\\W)"+_(a)+f,"g"),t;t=l.exec(g);){if(t[3]==="dll-reference")continue;v[h].push(t[3])}for(l=new RegExp("\\("+_(a)+'\\("(dll-reference\\s('+d+'))"\\)\\)'+f,"g");t=l.exec(g);)u[t[2]]||(v[h].push(t[1]),u[t[2]]=S(t[1]).m),v[t[2]]=v[t[2]]||[],v[t[2]].push(t[4]);for(var C=Object.keys(v),w=0;w<C.length;w++)for(var s=0;s<v[C[w]].length;s++)c(v[C[w]][s])&&(v[C[w]][s]=1*v[C[w]][s]);return v}function i(u){var p=Object.keys(u);return p.reduce(function(h,v){return h||u[v].length>0},!1)}function n(u,p){for(var h={main:[p]},v={main:[]},g={main:{}};i(h);)for(var E=Object.keys(h),a=0;a<E.length;a++){var l=E[a],t=h[l],C=t.pop();if(g[l]=g[l]||{},g[l][C]||!u[l][C])continue;g[l][C]=!0,v[l]=v[l]||[],v[l].push(C);for(var w=o(u,u[l][C],l),s=Object.keys(w),L=0;L<s.length;L++)h[s[L]]=h[s[L]]||[],h[s[L]]=h[s[L]].concat(w[s[L]])}return v}D.exports=function(u,p){p=p||{};var h={main:S.m},v=p.all?{main:Object.keys(h.main)}:n(h,u),g="";Object.keys(v).filter(function(C){return C!=="main"}).forEach(function(C){for(var w=0;v[C][w];)w++;v[C].push(w),h[C][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+C+" = ("+P.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+v[C].map(function(s){return""+JSON.stringify(s)+": "+h[C][s].toString()}).join(",")+`});
`}),g=g+"new (("+P.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+v.main.map(function(C){return""+JSON.stringify(C)+": "+h.main[C].toString()}).join(",")+"}))(self);";var E=new window.Blob([g],{type:"text/javascript"});if(p.bare)return E;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,l=a.createObjectURL(E),t=new window.Worker(l);return t.objectURL=l,t}},"./src/config.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"hlsDefaultConfig",function(){return L}),S.d(m,"mergeConfig",function(){return x}),S.d(m,"enableStreamingMode",function(){return b});var P=S("./src/controller/abr-controller.ts"),d=S("./src/controller/audio-stream-controller.ts"),f=S("./src/controller/audio-track-controller.ts"),_=S("./src/controller/subtitle-stream-controller.ts"),c=S("./src/controller/subtitle-track-controller.ts"),o=S("./src/controller/buffer-controller.ts"),i=S("./src/controller/timeline-controller.ts"),n=S("./src/controller/cap-level-controller.ts"),u=S("./src/controller/fps-controller.ts"),p=S("./src/controller/eme-controller.ts"),h=S("./src/controller/cmcd-controller.ts"),v=S("./src/utils/xhr-loader.ts"),g=S("./src/utils/fetch-loader.ts"),E=S("./src/utils/cues.ts"),a=S("./src/utils/mediakeys-helper.ts"),l=S("./src/utils/logger.ts");function t(){return t=Object.assign||function(y){for(var T=1;T<arguments.length;T++){var k=arguments[T];for(var N in k)Object.prototype.hasOwnProperty.call(k,N)&&(y[N]=k[N])}return y},t.apply(this,arguments)}function C(y,T){var k=Object.keys(y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(y);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(y,I).enumerable})),k.push.apply(k,N)}return k}function w(y){for(var T=1;T<arguments.length;T++){var k=arguments[T]!=null?arguments[T]:{};T%2?C(Object(k),!0).forEach(function(N){s(y,N,k[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(k)):C(Object(k)).forEach(function(N){Object.defineProperty(y,N,Object.getOwnPropertyDescriptor(k,N))})}return y}function s(y,T,k){return T in y?Object.defineProperty(y,T,{value:k,enumerable:!0,configurable:!0,writable:!0}):y[T]=k,y}var L=w(w({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:P.default,bufferController:o.default,capLevelController:n.default,fpsController:u.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:_.SubtitleStreamController,subtitleTrackController:c.default,timelineController:i.TimelineController,audioStreamController:d.default,audioTrackController:f.default,emeController:p.default,cmcdController:h.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)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var k=Object(g.fetchSupported)();k&&(y.loader=g.default,y.progressive=!0,y.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),d=S("./src/utils/ewma-bandwidth-estimator.ts"),f=S("./src/events.ts"),_=S("./src/utils/buffer-helper.ts"),c=S("./src/errors.ts"),o=S("./src/types/loader.ts"),i=S("./src/utils/logger.ts");function n(h,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(h,E.key,E)}}function u(h,v,g){return v&&n(h.prototype,v),g&&n(h,g),h}var p=function(){function h(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 d.default(E.abrEwmaSlowVoD,E.abrEwmaFastVoD,E.abrEwmaDefaultEstimate),this.registerListeners()}var v=h.prototype;return v.registerListeners=function(){var E=this.hls;E.on(f.Events.FRAG_LOADING,this.onFragLoading,this),E.on(f.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(f.Events.FRAG_BUFFERED,this.onFragBuffered,this),E.on(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(f.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var E=this.hls;E.off(f.Events.FRAG_LOADING,this.onFragLoading,this),E.off(f.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(f.Events.FRAG_BUFFERED,this.onFragBuffered,this),E.off(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(f.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,a){var l=a.frag;if(l.type===o.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=l,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},v.onLevelLoaded=function(E,a){var l=this.hls.config;a.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},v._abandonRulesCheck=function(){var E=this.fragCurrent,a=this.partCurrent,l=this.hls,t=l.autoLevelEnabled,C=l.config,w=l.media;if(!E||!w)return;var s=a?a.stats:E.stats,L=a?a.duration:E.duration;if(s.aborted){i.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||w.paused||!w.playbackRate||!w.readyState)return;var O=performance.now()-s.loading.start,x=Math.abs(w.playbackRate);if(O<=500*L/x)return;var b=l.levels,y=l.minAutoLevel,T=b[E.level],k=s.total||Math.max(s.loaded,Math.round(L*T.maxBitrate/8)),N=Math.max(1,s.bwEstimate?s.bwEstimate/8:s.loaded*1e3/O),I=(k-s.loaded)/N,W=w.currentTime,K=(_.BufferHelper.bufferInfo(w,W,C.maxBufferHole).end-W)/x;if(K>=2*L/x||I<=K)return;var U=Number.POSITIVE_INFINITY,z;for(z=E.level-1;z>y;z--){var B=b[z].maxBitrate;if(U=L*B/(8*.8*N),U<K)break}if(U>=I)return;var H=this.bwEstimator.getEstimate();i.logger.warn("Fragment "+E.sn+(a?" part "+a.index:"")+" of level "+E.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
Current BW estimate: `+(Object(P.isFiniteNumber)(H)?(H/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+I.toFixed(3)+` s
Estimated load time for the next fragment: `+U.toFixed(3)+` s
Time to underbuffer: `+K.toFixed(3)+" s"),l.nextLoadLevel=z,this.bwEstimator.sample(O,s.loaded),this.clearTimer(),E.loader&&(this.fragCurrent=this.partCurrent=null,E.loader.abort()),l.trigger(f.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:E,part:a,stats:s})},v.onFragLoaded=function(E,a){var l=a.frag,t=a.part;if(l.type===o.PlaylistLevelType.MAIN&&Object(P.isFiniteNumber)(l.sn)){var C=t?t.stats:l.stats,w=t?t.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var s=this.hls.levels[l.level],L=(s.loaded?s.loaded.bytes:0)+C.loaded,O=(s.loaded?s.loaded.duration:0)+w;s.loaded={bytes:L,duration:O},s.realBitrate=Math.round(8*L/O)}if(l.bitrateTest){var x={stats:C,frag:l,part:t,id:l.type};this.onFragBuffered(f.Events.FRAG_BUFFERED,x),l.bitrateTest=!1}}},v.onFragBuffered=function(E,a){var l=a.frag,t=a.part,C=t?t.stats:l.stats;if(C.aborted)return;if(l.type!==o.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var w=C.parsing.end-C.loading.start;this.bwEstimator.sample(w,C.loaded),C.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=w/1e3:this.bitrateTestDelay=0},v.onError=function(E,a){switch(a.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.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,a=this.partCurrent,l=this.hls,t=l.maxAutoLevel,C=l.config,w=l.minAutoLevel,s=l.media,L=a?a.duration:E?E.duration:0,O=s?s.currentTime:0,x=s&&s.playbackRate!==0?Math.abs(s.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():C.abrEwmaDefaultEstimate,y=(_.BufferHelper.bufferInfo(s,O,C.maxBufferHole).end-O)/x,T=this.findBestLevel(b,w,t,y,C.abrBandWidthFactor,C.abrBandWidthUpFactor);if(T>=0)return T;i.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=L?Math.min(L,C.maxStarvationDelay):C.maxStarvationDelay,N=C.abrBandWidthFactor,I=C.abrBandWidthUpFactor;if(!y){var W=this.bitrateTestDelay;if(W){var K=L?Math.min(L,C.maxLoadingDelay):C.maxLoadingDelay;k=K-W,i.logger.trace("bitrate test took "+Math.round(1e3*W)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),N=I=1}}return T=this.findBestLevel(b,w,t,y+k,N,I),Math.max(T,0)},v.findBestLevel=function(E,a,l,t,C,w){for(var s,L=this.fragCurrent,O=this.partCurrent,x=this.lastLoadedFragLevel,b=this.hls.levels,y=b[x],T=!!(y!=null&&(s=y.details)!==null&&s!==void 0&&s.live),k=y==null?void 0:y.codecSet,N=O?O.duration:L?L.duration:0,I=l;I>=a;I--){var W=b[I];if(!W||k&&W.codecSet!==k)continue;var K=W.details,U=(O?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||N,z=void 0;I<=x?z=C*E:z=w*E;var B=b[I].maxBitrate,H=B*U/z;if(i.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+I+"/"+Math.round(z)+"/"+B+"/"+U+"/"+t+"/"+H),z>B&&(!H||T&&!this.bitrateTestDelay||H<t))return I}return-1},u(h,[{key:"nextAutoLevel",get:function(){var E=this._nextAutoLevel,a=this.bwEstimator;if(E!==-1&&(!a||!a.canEstimate()))return E;var l=this.getNextABRAutoLevel();return E!==-1&&(l=Math.min(E,l)),l},set:function(E){this._nextAutoLevel=E}}]),h}();m.default=p},"./src/controller/audio-stream-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),d=S("./src/controller/base-stream-controller.ts"),f=S("./src/events.ts"),_=S("./src/utils/buffer-helper.ts"),c=S("./src/controller/fragment-tracker.ts"),o=S("./src/types/level.ts"),i=S("./src/types/loader.ts"),n=S("./src/loader/fragment.ts"),u=S("./src/demux/chunk-cache.ts"),p=S("./src/demux/transmuxer-interface.ts"),h=S("./src/types/transmuxer.ts"),v=S("./src/controller/fragment-finders.ts"),g=S("./src/utils/discontinuities.ts"),E=S("./src/errors.ts"),a=S("./src/utils/logger.ts");function l(){return l=Object.assign||function(L){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var b in x)Object.prototype.hasOwnProperty.call(x,b)&&(L[b]=x[b])}return L},l.apply(this,arguments)}function t(L,O){L.prototype=Object.create(O.prototype),L.prototype.constructor=L,C(L,O)}function C(L,O){return C=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},C(L,O)}var w=100,s=function(L){t(O,L);function O(b,y){var T;return T=L.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(f.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(f.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(f.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(f.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(f.Events.ERROR,this.onError,this),y.on(f.Events.BUFFER_RESET,this.onBufferReset,this),y.on(f.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(f.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(f.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var y=this.hls;y.off(f.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(f.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(f.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(f.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(f.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(f.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(f.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(f.Events.ERROR,this.onError,this),y.off(f.Events.BUFFER_RESET,this.onBufferReset,this),y.off(f.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(f.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(f.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(f.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(y,T){var k=T.frag,N=T.id,I=T.initPTS;if(N==="main"){var W=k.cc;this.initPTS[k.cc]=I,this.log("InitPTS for cc: "+W+" found from main: "+I),this.videoTrackCC=W,this.state===d.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=d.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(w),this.fragLoadError=0,T>0&&y===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=d.State.IDLE):(this.loadedmetadata=!1,this.state=d.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},x.doTick=function(){switch(this.state){case d.State.IDLE:this.doTickIdle();break;case d.State.WAITING_TRACK:{var y,T=this.levels,k=this.trackId,N=T==null||((y=T[k])===null||y===void 0)?void 0:y.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=d.State.WAITING_INIT_PTS}break}case d.State.FRAG_LOADING_WAITING_RETRY:{var I,W=performance.now(),K=this.retryDate;(!K||W>=K||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=d.State.IDLE);break}case d.State.WAITING_INIT_PTS:{var U=this.waitingData;if(U){var z=U.frag,B=U.part,H=U.cache,G=U.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=d.State.FRAG_LOADING;var ee=H.flush(),ie={frag:z,part:B,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(ie),G&&L.prototype._handleFragmentLoadComplete.call(this,ie)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ue=this.getLoadPosition(),xe=_.BufferHelper.bufferInfo(this.mediaBuffer,ue,this.config.maxBufferHole),Te=Object(v.fragmentWithinToleranceTest)(xe.end,this.config.maxFragLookUpTolerance,z);Te<0&&(a.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+xe.end+" is needed"),this.clearWaitingFragment())}}else this.state=d.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=d.State.IDLE)},x.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:y,k=T.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},x.doTickIdle=function(){var y,T,k=this.hls,N=this.levels,I=this.media,W=this.trackId,K=k.config;if(!N||!N[W])return;if(!I&&(this.startFragRequested||!K.startFragPrefetch))return;var U=N[W],z=U.details;if(!z||z.live&&this.levelLastLoaded!==W||this.waitForCdnTuneIn(z)){this.state=d.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,i.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,i.PlaylistLevelType.AUDIO);if(B===null)return;var H=B.len,G=this.getMaxBufferLength(),ee=this.audioSwitch;if(H>=G&&!ee)return;if(!ee&&this._streamEnded(B,z)){k.trigger(f.Events.BUFFER_EOS,{type:"audio"}),this.state=d.State.ENDED;return}var ie=z.fragments,ue=ie[0].start,xe=B.end;if(ee){var Te=this.getLoadPosition();xe=Te,z.PTSKnown&&Te<ue&&((B.end>ue||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),I.currentTime=ue+.05))}var se=this.getNextFragment(xe,z);if(!se){this.bufferFlushed=!0;return}((y=se.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((T=se.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(se,z):this.loadFragment(se,z,xe)},x.getMaxBufferLength=function(){var y=L.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,i.PlaylistLevelType.MAIN);return T===null?y:Math.max(y,T.len)},x.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(y,T){var k=T.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(N){return new o.Level(N)})},x.onAudioTrackSwitching=function(y,T){var k=!!T.url;this.trackId=T.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(w):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=d.State.IDLE):this.state=d.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 k,N=this.levels,I=T.details,W=T.id;if(!N){this.warn("Audio tracks were reset while loading level "+W);return}this.log("Track "+W+" loaded ["+I.startSN+","+I.endSN+"],duration:"+I.totalduration);var K=N[W],U=0;if(I.live||(k=K.details)!==null&&k!==void 0&&k.live){var z=this.mainDetails;if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed||!z)return;!K.details&&I.hasProgramDateTime&&z.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(I,z),U=I.fragments[0].start):U=this.alignPlaylists(I,K.details)}K.details=I,this.levelLastLoaded=W,!this.startFragRequested&&(this.mainDetails||!I.live)&&this.setStartPosition(K.details,U),this.state===d.State.WAITING_TRACK&&!this.waitForCdnTuneIn(I)&&(this.state=d.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(y){var T,k=y.frag,N=y.part,I=y.payload,W=this.config,K=this.trackId,U=this.levels;if(!U){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var z=U[K];console.assert(z,"Audio track is defined on fragment load progress");var B=z.details;console.assert(B,"Audio track details are defined on fragment load progress");var H=W.defaultAudioCodec||z.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new p.default(this.hls,i.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[k.cc],ie=(T=k.initSegment)===null||T===void 0?void 0:T.data;if(ee!==void 0){var ue=!1,xe=N?N.index:-1,Te=xe!==-1,se=new h.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,I.byteLength,xe,Te);G.push(I,ie,H,"",k,N,B.totalduration,ue,se,ee)}else{a.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+K);var ve=this.waitingData=this.waitingData||{frag:k,part:N,cache:new u.default,complete:!1},de=ve.cache;de.push(new Uint8Array(I)),this.waitingVideoCC=this.videoTrackCC,this.state=d.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,y)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(y,T){var k=T.tracks.audio;k&&(this.mediaBuffer=k.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},x.onFragBuffered=function(y,T){var k=T.frag,N=T.part;if(k.type!==i.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(N?" p: "+N.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(f.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,N)},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(i.PlaylistLevelType.AUDIO,T);break;case E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case E.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==d.State.ERROR&&this.state!==d.State.STOPPED&&(this.state=T.fatal?d.State.ERROR:d.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===d.State.PARSING||this.state===d.State.PARSED)){var k=!0,N=this.getFwdBufferInfo(this.mediaBuffer,i.PlaylistLevelType.AUDIO);N&&N.len>.5&&(k=!this.reduceMaxBufferLength(N.len)),k&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},x.onBufferFlushed=function(y,T){var k=T.type;k===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(y){var T,k="audio",N=this.hls,I=y.remuxResult,W=y.chunkMeta,K=this.getCurrentContext(W);if(!K){this.warn("The loading context changed while buffering fragment "+W.sn+" of level "+W.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(W.level);return}var U=K.frag,z=K.part,B=I.audio,H=I.text,G=I.id3,ee=I.initSegment;if(this.fragContextChanged(U))return;if(this.state=d.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,U,W),N.trigger(f.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:k,tracks:ee.tracks})),B){var ie=B.startPTS,ue=B.endPTS,xe=B.startDTS,Te=B.endDTS;z&&(z.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:ue,startDTS:xe,endDTS:Te}),U.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ie,ue,xe,Te),this.bufferFragmentData(B,U,z,W)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var se=l({frag:U,id:k},G);N.trigger(f.Events.FRAG_PARSING_METADATA,se)}if(H){var ve=l({frag:U,id:k},H);N.trigger(f.Events.FRAG_PARSING_USERDATA,ve)}},x._bufferInitSegment=function(y,T,k){if(this.state!==d.State.PARSING)return;y.video&&delete y.video;var N=y.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(f.Events.BUFFER_CODECS,y);var I=N.initSegment;if(I!=null&&I.byteLength){var W={type:"audio",frag:T,part:null,chunkMeta:k,parent:T.type,data:I};this.hls.trigger(f.Events.BUFFER_APPENDING,W)}this.tick()},x.loadFragment=function(y,T,k){var N=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||N===c.FragmentState.NOT_LOADED||N===c.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):T.live&&!Object(P.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=d.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,y,T,k)))},x.completeAudioSwitch=function(){var y=this.hls,T=this.media,k=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,y.trigger(f.Events.AUDIO_TRACK_SWITCHED,{id:k})},O}(d.default);m.default=s},"./src/controller/audio-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),d=S("./src/errors.ts"),f=S("./src/controller/base-playlist-controller.ts"),_=S("./src/types/loader.ts");function c(p,h){for(var v=0;v<h.length;v++){var g=h[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}function o(p,h,v){return h&&c(p.prototype,h),v&&c(p,v),p}function i(p,h){p.prototype=Object.create(h.prototype),p.prototype.constructor=p,n(p,h)}function n(p,h){return n=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},n(p,h)}var u=function(p){i(h,p);function h(g){var E;return E=p.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=h.prototype;return v.registerListeners=function(){var E=this.hls;E.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.on(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(P.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){var E=this.hls;E.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),E.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.off(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(P.Events.ERROR,this.onError,this)},v.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.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,a){this.tracks=a.audioTracks||[]},v.onAudioTrackLoaded=function(E,a){var l=a.id,t=a.details,C=this.tracksInGroup[l];if(!C){this.warn("Invalid audio track id "+l);return}var w=C.details;C.details=a.details,this.log("audioTrack "+l+" loaded ["+t.startSN+"-"+t.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,a,w))},v.onLevelLoading=function(E,a){this.switchLevel(a.level)},v.onLevelSwitching=function(E,a){this.switchLevel(a.level)},v.switchLevel=function(E){var a=this.hls.levels[E];if(!(a!=null&&a.audioGroupIds))return;var l=a.audioGroupIds[a.urlId];if(this.groupId!==l){this.groupId=l;var t=this.tracks.filter(function(w){return!l||w.groupId===l});this.selectDefaultTrack&&!t.some(function(w){return w.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var C={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(P.Events.AUDIO_TRACKS_UPDATED,C),this.selectInitialTrack()}},v.onError=function(E,a){if(p.prototype.onError.call(this,E,a),a.fatal||!a.context)return;a.context.type===_.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},v.setAudioTrack=function(E){var a=this.tracksInGroup;if(E<0||E>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=a[this.trackId];this.log("Now switching to audio-track index "+E);var t=a[E],C=t.id,w=t.groupId,s=w===void 0?"":w,L=t.name,O=t.type,x=t.url;if(this.trackId=E,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(P.Events.AUDIO_TRACK_SWITCHING,{id:C,groupId:s,name:L,type:O,url:x}),t.details&&!t.details.live)return;var b=this.switchParams(t.url,l==null?void 0:l.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 a=this.trackName,l=this.findTrackId(a)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},v.findTrackId=function(E){for(var a=this.tracksInGroup,l=0;l<a.length;l++){var t=a[l];if((!this.selectDefaultTrack||t.default)&&(!E||E===t.name))return t.id}return-1},v.loadPlaylist=function(E){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var l=a.id,t=a.groupId,C=a.url;if(E)try{C=E.addDirectives(C)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(P.Events.AUDIO_TRACK_LOADING,{url:C,id:l,groupId:t,deliveryDirectives:E||null})}},o(h,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(E){this.selectDefaultTrack=!1,this.setAudioTrack(E)}}]),h}(f.default);m.default=u},"./src/controller/base-playlist-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/polyfills/number.ts"),d=S("./src/types/level.ts"),f=S("./src/controller/level-helper.ts"),_=S("./src/utils/logger.ts"),c=S("./src/errors.ts"),o=function(){function i(u,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=_.logger.log.bind(_.logger,p+":"),this.warn=_.logger.warn.bind(_.logger,p+":"),this.hls=u}var n=i.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(p,h){h.fatal&&h.type===c.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(p,h){var v=h==null?void 0:h.renditionReports;if(v)for(var g=0;g<v.length;g++){var E=v[g],a=""+E.URI;if(a===p.substr(-a.length)){var l=parseInt(E["LAST-MSN"]),t=parseInt(E["LAST-PART"]);if(h&&this.hls.config.lowLatencyMode){var C=Math.min(h.age-h.partTarget,h.targetduration);t!==void 0&&C>h.partTarget&&(t+=1)}if(Object(P.isFiniteNumber)(l))return new d.HlsUrlParameters(l,Object(P.isFiniteNumber)(t)?t:void 0,d.HlsSkip.No)}}},n.loadPlaylist=function(p){},n.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},n.playlistLoaded=function(p,h,v){var g=this,E=h.details,a=h.stats,l=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(E.advancedDateTime=Date.now()-l,E.live||v!=null&&v.live){if(E.reloaded(v),v&&this.log("live playlist "+p+" "+(E.advanced?"REFRESHED "+E.lastPartSn+"-"+E.lastPartIndex:"MISSED")),v&&E.fragments.length>0&&Object(f.mergeDetails)(v,E),!this.canLoad||!E.live)return;var t,C=void 0,w=void 0;if(E.canBlockReload&&E.endSN&&E.advanced){var s=this.hls.config.lowLatencyMode,L=E.lastPartSn,O=E.endSN,x=E.lastPartIndex,b=x!==-1,y=L===O,T=s?0:x;b?(C=y?O+1:L,w=y?T:x+1):C=O+1;var k=E.age,N=k+E.ageHeader,I=Math.min(N-E.partTarget,E.targetduration*1.5);if(I>0){if(v&&I>v.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+v.tuneInGoal+" to: "+I+" with playlist age: "+E.age),I=0;else{var W=Math.floor(I/E.targetduration);if(C+=W,w!==void 0){var K=Math.round(I%E.targetduration/E.partTarget);w+=K}this.log("CDN Tune-in age: "+E.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+I+" skip sn "+W+" to part "+w)}E.tuneInGoal=I}if(t=this.getDeliveryDirectives(E,h.deliveryDirectives,C,w),s||!y){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(E,h.deliveryDirectives,C,w);var U=Object(f.computeReloadInterval)(E,a);C!==void 0&&E.canBlockReload&&(U-=E.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(U)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(t)},U)}else this.clearTimer()},n.getDeliveryDirectives=function(p,h,v,g){var E=Object(d.getSkipValue)(p,v);return h!=null&&h.skip&&p.deltaUpdateFailed&&(v=h.msn,g=h.part,E=d.HlsSkip.No),new d.HlsUrlParameters(v,g,E)},n.retryLoadingOrFail=function(p){var h=this,v=this.hls.config,g=this.retryCount<v.levelLoadingMaxRetry;if(g){var E;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(E=p.context)!==null&&E!==void 0&&E.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*v.levelLoadingRetryDelay,v.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return h.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return g},i}()},"./src/controller/base-stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"State",function(){return O}),S.d(m,"default",function(){return x});var P=S("./src/polyfills/number.ts"),d=S("./src/task-loop.ts"),f=S("./src/controller/fragment-tracker.ts"),_=S("./src/utils/buffer-helper.ts"),c=S("./src/utils/logger.ts"),o=S("./src/events.ts"),i=S("./src/errors.ts"),n=S("./src/types/transmuxer.ts"),u=S("./src/utils/mp4-tools.ts"),p=S("./src/utils/discontinuities.ts"),h=S("./src/controller/fragment-finders.ts"),v=S("./src/controller/level-helper.ts"),g=S("./src/loader/fragment-loader.ts"),E=S("./src/crypt/decrypter.ts"),a=S("./src/utils/time-ranges.ts"),l=S("./src/types/loader.ts");function t(b,y){for(var T=0;T<y.length;T++){var k=y[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(b,k.key,k)}}function C(b,y,T){return y&&t(b.prototype,y),T&&t(b,T),b}function w(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function s(b,y){b.prototype=Object.create(y.prototype),b.prototype.constructor=b,L(b,y)}function L(b,y){return L=Object.setPrototypeOf||function(k,N){return k.__proto__=N,k},L(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){s(y,b);function y(k,N,I){var W;return W=b.call(this)||this,W.hls=void 0,W.fragPrevious=null,W.fragCurrent=null,W.fragmentTracker=void 0,W.transmuxer=null,W._state=O.STOPPED,W.media=void 0,W.mediaBuffer=void 0,W.config=void 0,W.bitrateTest=!1,W.lastCurrentTime=0,W.nextLoadPosition=0,W.startPosition=0,W.loadedmetadata=!1,W.fragLoadError=0,W.retryDate=0,W.levels=null,W.fragmentLoader=void 0,W.levelLastLoaded=null,W.startFragRequested=!1,W.decrypter=void 0,W.initPTS=[],W.onvseeking=null,W.onvended=null,W.logPrefix="",W.log=void 0,W.warn=void 0,W.logPrefix=I,W.log=c.logger.log.bind(c.logger,I+":"),W.warn=c.logger.warn.bind(c.logger,I+":"),W.hls=k,W.fragmentLoader=new g.default(k.config),W.fragmentTracker=N,W.config=k.config,W.decrypter=new E.default(k,k.config),k.on(o.Events.KEY_LOADED,W.onKeyLoaded,w(W)),W}var T=y.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(N){},T.stopLoad=function(){this.fragmentLoader.abort();var N=this.fragCurrent;N&&this.fragmentTracker.removeFragment(N),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(N,I){var W=this.fragCurrent,K=this.fragmentTracker;if(!I.live&&W&&W.sn===I.endSN&&!N.nextStart){var U=K.getState(W);return U===f.FragmentState.PARTIAL||U===f.FragmentState.OK}return!1},T.onMediaAttached=function(N,I){var W=this.media=this.mediaBuffer=I.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),W.addEventListener("seeking",this.onvseeking),W.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(K.startPosition)},T.onMediaDetaching=function(){var N=this.media;N!=null&&N.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),N&&(N.removeEventListener("seeking",this.onvseeking),N.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var N=this.config,I=this.fragCurrent,W=this.media,K=this.mediaBuffer,U=this.state,z=W?W.currentTime:0,B=_.BufferHelper.bufferInfo(K||W,z,N.maxBufferHole);if(this.log("media seeking to "+(Object(P.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+U),U===O.ENDED)this.resetLoadingState();else if(I&&!B.len){var H=N.maxFragLookUpTolerance,G=I.start-H,ee=I.start+I.duration+H,ie=z>ee;(z<G||ie)&&(ie&&I.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),I.loader.abort()),this.resetLoadingState())}W&&(this.lastCurrentTime=z),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(N,I){if(this.state!==O.KEY_LOADING||I.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var W=this.levels[I.frag.level].details;W&&this.loadFragment(I.frag,W,I.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(o.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,b.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(N,I){this.log("Loading key for "+N.sn+" of ["+I.startSN+"-"+I.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level),this.state=O.KEY_LOADING,this.fragCurrent=N,this.hls.trigger(o.Events.KEY_LOADING,{frag:N})},T.loadFragment=function(N,I,W){this._loadFragForPlayback(N,I,W)},T._loadFragForPlayback=function(N,I,W){var K=this,U=function(B){if(K.fragContextChanged(N)){K.warn("Fragment "+N.sn+(B.part?" p: "+B.part.index:"")+" of level "+N.level+" was dropped during download."),K.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,K._handleFragmentLoadProgress(B)};this._doFragLoad(N,I,W,U).then(function(z){if(!z)return;K.fragLoadError=0;var B=K.state;if(K.fragContextChanged(N)){(B===O.FRAG_LOADING||B===O.BACKTRACKING||!K.fragCurrent&&B===O.PARSING)&&(K.fragmentTracker.removeFragment(N),K.state=O.IDLE);return}if("payload"in z&&(K.log("Loaded fragment "+N.sn+" of level "+N.level),K.hls.trigger(o.Events.FRAG_LOADED,z),K.state===O.BACKTRACKING)){K.fragmentTracker.backtrack(N,z),K.resetFragmentLoading(N);return}K._handleFragmentLoadComplete(z)}).catch(function(z){K.warn(z),K.resetFragmentLoading(N)})},T.flushMainBuffer=function(N,I,W){if(W===void 0&&(W=null),!(N-I))return;var K={startOffset:N,endOffset:I,type:W};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,K)},T._loadInitSegment=function(N){var I=this;this._doFragLoad(N).then(function(W){if(!W||I.fragContextChanged(N)||!I.levels)throw new Error("init load aborted");return W}).then(function(W){var K=I.hls,U=W.payload,z=N.decryptdata;if(U&&U.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var B=self.performance.now();return I.decrypter.webCryptoDecrypt(new Uint8Array(U),z.key.buffer,z.iv.buffer).then(function(H){var G=self.performance.now();return K.trigger(o.Events.FRAG_DECRYPTED,{frag:N,payload:H,stats:{tstart:B,tdecrypt:G}}),W.payload=H,W})}return W}).then(function(W){var K=I.fragCurrent,U=I.hls,z=I.levels;if(!z)throw new Error("init load aborted, missing levels");var B=z[N.level].details;console.assert(B,"Level details are defined when init segment is loaded");var H=N.stats;I.state=O.IDLE,I.fragLoadError=0,N.data=new Uint8Array(W.payload),H.parsing.start=H.buffering.start=self.performance.now(),H.parsing.end=H.buffering.end=self.performance.now(),W.frag===K&&U.trigger(o.Events.FRAG_BUFFERED,{stats:H,frag:K,part:null,id:N.type}),I.tick()}).catch(function(W){I.warn(W),I.resetFragmentLoading(N)})},T.fragContextChanged=function(N){var I=this.fragCurrent;return!N||!I||N.level!==I.level||N.sn!==I.sn||N.urlId!==I.urlId},T.fragBufferedComplete=function(N,I){var W=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(I?" part: "+I.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+a.default.toString(_.BufferHelper.getBuffered(W))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(N){var I=this.transmuxer;if(!I)return;var W=N.frag,K=N.part,U=N.partsLoaded,z=!U||U.length===0||U.some(function(H){return!H}),B=new n.ChunkMetadata(W.level,W.sn,W.stats.chunkCount+1,0,K?K.index:-1,!z);I.flush(B)},T._handleFragmentLoadProgress=function(N){},T._doFragLoad=function(N,I,W,K){var U=this;if(W===void 0&&(W=null),!this.levels)throw new Error("frag load aborted, missing levels");if(W=Math.max(N.start,W||0),this.config.lowLatencyMode&&I){var z=I.partList;if(z&&K){W>N.end&&I.fragmentHint&&(N=I.fragmentHint);var B=this.getNextPart(z,N,W);if(B>-1){var H=z[B];return this.log("Loading part sn: "+N.sn+" p: "+H.index+" cc: "+N.cc+" of playlist ["+I.startSN+"-"+I.endSN+"] parts [0-"+B+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(W.toFixed(3))),this.nextLoadPosition=H.start+H.duration,this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:N,part:z[B],targetBufferTime:W}),this.doFragPartsLoad(N,z,B,K).catch(function(G){return U.handleFragLoadError(G)})}else if(!N.url||this.loadedEndOfParts(z,W))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(I?"of ["+I.startSN+"-"+I.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(W.toFixed(3))),Object(P.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:N,targetBufferTime:W}),this.fragmentLoader.load(N,K).catch(function(G){return U.handleFragLoadError(G)})},T.doFragPartsLoad=function(N,I,W,K){var U=this;return new Promise(function(z,B){var H=[],G=function ee(ie){var ue=I[ie];U.fragmentLoader.loadPart(N,ue,K).then(function(xe){H[ue.index]=xe;var Te=xe.part;U.hls.trigger(o.Events.FRAG_LOADED,xe);var se=I[ie+1];if(se&&se.fragment===N)ee(ie+1);else return z({frag:N,part:Te,partsLoaded:H})}).catch(B)};G(W)})},T.handleFragLoadError=function(N){var I=N.data;return I&&I.details===i.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(I.frag,I.part):this.hls.trigger(o.Events.ERROR,I),null},T._handleTransmuxerFlush=function(N){var I=this.getCurrentContext(N);if(!I||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var W=I.frag,K=I.part,U=I.level,z=self.performance.now();W.stats.parsing.end=z,K&&(K.stats.parsing.end=z),this.updateLevelTiming(W,K,U,N.partial)},T.getCurrentContext=function(N){var I=this.levels,W=N.level,K=N.sn,U=N.part;if(!I||!I[W])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+W+". The current chunk will not be buffered."),null;var z=I[W],B=U>-1?Object(v.getPartWith)(z,K,U):null,H=B?B.fragment:Object(v.getFragmentWithSN)(z,K,this.fragCurrent);return H?{frag:H,part:B,level:z}:null},T.bufferFragmentData=function(N,I,W,K){if(!N||this.state!==O.PARSING)return;var U=N.data1,z=N.data2,B=U;if(U&&z&&(B=Object(u.appendUint8Array)(U,z)),!B||!B.length)return;var H={type:N.type,frag:I,part:W,chunkMeta:K,parent:I.type,data:B};this.hls.trigger(o.Events.BUFFER_APPENDING,H),N.dropped&&N.independent&&!W&&this.flushBufferGap(I)},T.flushBufferGap=function(N){var I=this.media;if(!I)return;if(!_.BufferHelper.isBuffered(I,I.currentTime)){this.flushMainBuffer(0,N.start);return}var W=I.currentTime,K=_.BufferHelper.bufferInfo(I,W,0),U=N.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,U*.25),B=Math.max(Math.min(N.start-z,K.end-z),W+z);N.start-B>z&&this.flushMainBuffer(B,N.start)},T.getFwdBufferInfo=function(N,I){var W=this.config,K=this.getLoadPosition();if(!Object(P.isFiniteNumber)(K))return null;var U=_.BufferHelper.bufferInfo(N,K,W.maxBufferHole);if(U.len===0&&U.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(K,I);if(z&&U.nextStart<z.end)return _.BufferHelper.bufferInfo(N,K,Math.max(U.nextStart,W.maxBufferHole))}return U},T.getMaxBufferLength=function(N){var I=this.config,W;return N?W=Math.max(8*I.maxBufferSize/N,I.maxBufferLength):W=I.maxBufferLength,Math.min(W,I.maxMaxBufferLength)},T.reduceMaxBufferLength=function(N){var I=this.config,W=N||I.maxBufferLength;return I.maxMaxBufferLength>=W?(I.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+I.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(N,I){var W,K,U=I.fragments,z=U.length;if(!z)return null;var B=this.config,H=U[0].start,G;if(I.live){var ee=B.initialLiveManifestSize;if(z<ee)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+ee+")"),null;!I.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(I,U),this.startPosition=G?this.hls.liveSyncPosition||G.start:N)}else N<=H&&(G=U[0]);if(!G){var ie=B.lowLatencyMode?I.partEnd:I.fragmentEnd;G=this.getFragmentAtPosition(N,ie,I)}return(W=G)!==null&&W!==void 0&&W.initSegment&&!((K=G)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},T.getNextPart=function(N,I,W){for(var K=-1,U=!1,z=!0,B=0,H=N.length;B<H;B++){var G=N[B];if(z=z&&!G.independent,K>-1&&W<G.start)break;var ee=G.loaded;!ee&&(U||G.independent||z)&&G.fragment===I&&(K=B),U=ee}return K},T.loadedEndOfParts=function(N,I){var W=N[N.length-1];return W&&I>W.start&&W.loaded},T.getInitialLiveFragment=function(N,I){var W=this.fragPrevious,K=null;if(W){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+W.programDateTime),K=Object(h.findFragmentByPDT)(I,W.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var U=W.sn+1;if(U>=N.startSN&&U<=N.endSN){var z=I[U-N.startSN];W.cc===z.cc&&(K=z,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(h.findFragWithCC)(I,W.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(K=this.getFragmentAtPosition(B,this.bitrateTest?N.fragmentEnd:N.edge,N))}return K},T.getFragmentAtPosition=function(N,I,W){var K=this.config,U=this.fragPrevious,z=W.fragments,B=W.endSN,H=W.fragmentHint,G=K.maxFragLookUpTolerance,ee=!!(K.lowLatencyMode&&W.partList&&H);ee&&H&&!this.bitrateTest&&(z=z.concat(H),B=H.sn);var ie;if(N<I){var ue=N>I-G?0:G;ie=Object(h.findFragmentByPTS)(U,z,N,ue)}else ie=z[z.length-1];if(ie){var xe=ie.sn-W.startSN,Te=U&&ie.level===U.level,se=z[xe+1],ve=this.fragmentTracker.getState(ie);if(ve===f.FragmentState.BACKTRACKED){ie=null;for(var de=xe;z[de]&&this.fragmentTracker.getState(z[de])===f.FragmentState.BACKTRACKED;)U?ie=z[de--]:ie=z[--de];ie||(ie=se)}else U&&ie.sn===U.sn&&!ee&&(Te&&(ie.sn<B&&this.fragmentTracker.getState(se)!==f.FragmentState.OK?(this.log("SN "+ie.sn+" just loaded, load next one: "+se.sn),ie=se):ie=null))}return ie},T.synchronizeToLiveEdge=function(N){var I=this.config,W=this.media;if(!W)return;var K=this.hls.liveSyncPosition,U=W.currentTime,z=N.fragments[0].start,B=N.edge,H=U>=z-I.maxFragLookUpTolerance&&U<=B;if(K!==null&&W.duration>K&&(U<K||!H)){var G=I.liveMaxLatencyDuration!==void 0?I.liveMaxLatencyDuration:I.liveMaxLatencyDurationCount*N.targetduration;(!H&&W.readyState<4||U<B-G)&&(this.loadedmetadata||(this.nextLoadPosition=K),W.readyState&&(this.warn("Playback: "+U.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+K.toFixed(3)),W.currentTime=K))}},T.alignPlaylists=function(N,I){var W=this.levels,K=this.levelLastLoaded,U=this.fragPrevious,z=K!==null?W[K]:null,B=N.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var H=N.fragments[0].start,G=!I,ee=N.alignedSliding&&Object(P.isFiniteNumber)(H);if(G||!ee&&!H){Object(p.alignStream)(U,z,N);var ie=N.fragments[0].start;return this.log("Live playlist sliding: "+ie.toFixed(2)+" start-sn: "+(I?I.startSN:"na")+"->"+N.startSN+" prev-sn: "+(U?U.sn:"na")+" fragments: "+B),ie}return H},T.waitForCdnTuneIn=function(N){var I=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*I)},T.setStartPosition=function(N,I){var W=this.startPosition;if(W<I&&(W=-1),W===-1||this.lastCurrentTime===-1){var K=N.startTimeOffset;Object(P.isFiniteNumber)(K)?(W=I+K,K<0&&(W+=N.totalduration),W=Math.min(Math.max(I,W),I+N.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+W),this.startPosition=W):N.live?W=this.hls.liveSyncPosition||I:this.startPosition=W=0,this.lastCurrentTime=W}this.nextLoadPosition=W},T.getLoadPosition=function(){var N=this.media,I=0;return this.loadedmetadata&&N?I=N.currentTime:this.nextLoadPosition&&(I=this.nextLoadPosition),I},T.handleFragLoadAborted=function(N,I){this.transmuxer&&N.sn!=="initSegment"&&N.stats.aborted&&(this.warn("Fragment "+N.sn+(I?" part"+I.index:"")+" of level "+N.level+" was aborted"),this.resetFragmentLoading(N))},T.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(N,I){if(I.fatal)return;var W=I.frag;if(!W||W.type!==N)return;var K=this.fragCurrent;console.assert(K&&W.sn===K.sn&&W.level===K.level&&W.urlId===K.urlId,"Frag load error must match current frag to retry");var U=this.config;if(this.fragLoadError+1<=U.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(W.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*U.fragLoadingRetryDelay,U.fragLoadingMaxRetryTimeout);this.warn("Fragment "+W.sn+" of "+N+" "+W.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else I.levelRetry?(N===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(c.logger.error(I.details+" reaches max retry, redispatch as fatal ..."),I.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(N,I,W){if(!N)return;var K=_.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(I,K,W),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(N){if(!this.loadedmetadata){this.startFragRequested=!1;var I=this.levels?this.levels[N].details:null;if(I!=null&&I.live)return this.startPosition=-1,this.setStartPosition(I,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(N,I,W,K){var U=this,z=W.details;console.assert(!!z,"level.details must be defined");var B=Object.keys(N.elementaryStreams).reduce(function(H,G){var ee=N.elementaryStreams[G];if(ee){var ie=ee.endPTS-ee.startPTS;if(ie<=0)return U.warn("Could not parse fragment "+N.sn+" "+G+" duration reliably ("+ie+") resetting transmuxer to fallback to playlist timing"),U.resetTransmuxer(),H||!1;var ue=K?0:Object(v.updateFragPTSDTS)(z,N,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return U.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:z,level:W,drift:ue,type:G,frag:N,start:ee.startPTS,end:ee.endPTS}),!0}return H},!1);B?(this.state=O.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:N,part:I})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},C(y,[{key:"state",get:function(){return this._state},set:function(N){var I=this._state;I!==N&&(this._state=N,this.log(I+"->"+N))}}]),y}(d.default)},"./src/controller/buffer-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return h});var P=S("./src/polyfills/number.ts"),d=S("./src/events.ts"),f=S("./src/utils/logger.ts"),_=S("./src/errors.ts"),c=S("./src/utils/buffer-helper.ts"),o=S("./src/utils/mediasource-helper.ts"),i=S("./src/loader/fragment.ts"),n=S("./src/controller/buffer-operation-queue.ts"),u=Object(o.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function v(E){var a=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 l=a.hls,t=a.media,C=a.mediaSource;f.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),l.trigger(d.Events.MEDIA_ATTACHED,{media:t})),C&&C.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){f.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){f.logger.log("[buffer-controller]: Media source ended")},this.hls=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 a=this.hls;a.on(d.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(d.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(d.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(d.Events.BUFFER_RESET,this.onBufferReset,this),a.on(d.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(d.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(d.Events.BUFFER_EOS,this.onBufferEos,this),a.on(d.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(d.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(d.Events.FRAG_PARSED,this.onFragParsed,this),a.on(d.Events.FRAG_CHANGED,this.onFragChanged,this)},g.unregisterListeners=function(){var a=this.hls;a.off(d.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(d.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(d.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(d.Events.BUFFER_RESET,this.onBufferReset,this),a.off(d.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(d.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(d.Events.BUFFER_EOS,this.onBufferEos,this),a.off(d.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(d.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(d.Events.FRAG_PARSED,this.onFragParsed,this),a.off(d.Events.FRAG_CHANGED,this.onFragChanged,this)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(a,l){var t=2;(l.audio&&!l.video||!l.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,f.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(a,l){var t=this.media=l.media;if(t&&u){var C=this.mediaSource=new u;C.addEventListener("sourceopen",this._onMediaSourceOpen),C.addEventListener("sourceended",this._onMediaSourceEnded),C.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(C),this._objectUrl=t.src}},g.onMediaDetaching=function(){var a=this.media,l=this.mediaSource,t=this._objectUrl;if(l){if(f.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(C){f.logger.warn("[buffer-controller]: onMediaDetaching: "+C.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.load()):f.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(d.Events.MEDIA_DETACHED,void 0)},g.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(l){var t=a.sourceBuffer[l];try{t&&(a.removeBufferListeners(l),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[l]=void 0)}catch(C){f.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",C)}}),this._initSourceBuffer()},g.onBufferCodecs=function(a,l){var t=this,C=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(w){if(C){var s=t.tracks[w];if(s&&typeof s.buffer.changeType=="function"){var L=l[w],O=L.codec,x=L.levelCodec,b=L.container,y=(s.levelCodec||s.codec).replace(p,"$1"),T=(x||O).replace(p,"$1");if(y!==T){var k=b+";codecs="+(x||O);t.appendChangeType(w,k)}}}else t.pendingTracks[w]=l[w]}),C)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(a,l){var t=this,C=this.operationQueue,w={execute:function(){var L=t.sourceBuffer[a];L&&(f.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+l),L.changeType(l)),C.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(L){f.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",L)}};C.append(w,a)},g.onBufferAppending=function(a,l){var t=this,C=this.hls,w=this.operationQueue,s=this.tracks,L=l.data,O=l.type,x=l.frag,b=l.part,y=l.chunkMeta,T=y.buffering[O],k=self.performance.now();T.start=k;var N=x.stats.buffering,I=b?b.stats.buffering:null;N.start===0&&(N.start=k),I&&I.start===0&&(I.start=k);var W=s.audio,K=O==="audio"&&y.id===1&&(W==null?void 0:W.container)==="audio/mpeg",U={execute:function(){if(T.executeStart=self.performance.now(),K){var B=t.sourceBuffer[O];if(B){var H=x.start-B.timestampOffset;Math.abs(H)>=.1&&(f.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+x.start+" (delta: "+H+") sn: "+x.sn+")"),B.timestampOffset=x.start)}}t.appendExecutor(L,O)},onStart:function(){},onComplete:function(){var B=self.performance.now();T.executeEnd=T.end=B,N.first===0&&(N.first=B),I&&I.first===0&&(I.first=B);var H=t.sourceBuffer,G={};for(var ee in H)G[ee]=c.BufferHelper.getBuffered(H[ee]);t.appendError=0,t.hls.trigger(d.Events.BUFFER_APPENDED,{type:O,frag:x,part:b,chunkMeta:y,parent:x.type,timeRanges:G})},onError:function(B){f.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",B);var H={type:_.ErrorTypes.MEDIA_ERROR,parent:x.type,details:_.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?H.details=_.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,H.details=_.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>C.config.appendErrorMaxRetry&&(f.logger.error("[buffer-controller]: Failed "+C.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),H.fatal=!0)),C.trigger(d.Events.ERROR,H)}};w.append(U,O)},g.onBufferFlushing=function(a,l){var t=this,C=this.operationQueue,w=function(L){return{execute:t.removeExecutor.bind(t,L,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(d.Events.BUFFER_FLUSHED,{type:L})},onError:function(x){f.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",x)}}};l.type?C.append(w(l.type),l.type):this.getSourceBufferTypes().forEach(function(s){C.append(w(s),s)})},g.onFragParsed=function(a,l){var t=this,C=l.frag,w=l.part,s=[],L=w?w.elementaryStreams:C.elementaryStreams;L[i.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(L[i.ElementaryStreamTypes.AUDIO]&&s.push("audio"),L[i.ElementaryStreamTypes.VIDEO]&&s.push("video"));var O=function(){var b=self.performance.now();C.stats.buffering.end=b,w&&(w.stats.buffering.end=b);var y=w?w.stats:C.stats;t.hls.trigger(d.Events.FRAG_BUFFERED,{frag:C,part:w,stats:y,id:C.type})};s.length===0&&f.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+C.type+" level: "+C.level+" sn: "+C.sn),this.blockBuffers(O,s)},g.onFragChanged=function(a,l){this.flushBackBuffer()},g.onBufferEos=function(a,l){var t=this,C=this.getSourceBufferTypes().reduce(function(w,s){var L=t.sourceBuffer[s];return(!l.type||l.type===s)&&(L&&!L.ended&&(L.ended=!0,f.logger.log("[buffer-controller]: "+s+" sourceBuffer now EOS"))),w&&!!(!L||L.ended)},!0);C&&this.blockBuffers(function(){var w=t.mediaSource;if(!w||w.readyState!=="open")return;w.endOfStream()})},g.onLevelUpdated=function(a,l){var t=l.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var a=this.hls,l=this.details,t=this.media,C=this.sourceBuffer;if(!t||l===null)return;var w=this.getSourceBufferTypes();if(!w.length)return;var s=l.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(P.isFiniteNumber)(s)||s<0)return;var L=t.currentTime,O=l.levelTargetDuration,x=Math.max(s,O),b=Math.floor(L/O)*O-x;w.forEach(function(y){var T=C[y];if(T){var k=c.BufferHelper.getBuffered(T);k.length>0&&b>k.start(0)&&(a.trigger(d.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),l.live&&a.trigger(d.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),a.trigger(d.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 a=this.details,l=this.hls,t=this.media,C=this.mediaSource,w=a.fragments[0].start+a.totalduration,s=t.duration,L=Object(P.isFiniteNumber)(C.duration)?C.duration:0;a.live&&l.config.liveDurationInfinity?(f.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),C.duration=Infinity,this.updateSeekableRange(a)):(w>L&&w>s||!Object(P.isFiniteNumber)(s))&&(f.logger.log("[buffer-controller]: Updating Media Source duration to "+w.toFixed(3)),C.duration=w)},g.updateSeekableRange=function(a){var l=this.mediaSource,t=a.fragments,C=t.length;if(C&&a.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var w=Math.max(0,t[0].start),s=Math.max(w,w+a.totalduration);l.setLiveSeekableRange(w,s)}},g.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,l=this.operationQueue,t=this.pendingTracks,C=Object.keys(t).length;if(C&&!a||C===2){this.createSourceBuffers(t),this.pendingTracks={};var w=this.getSourceBufferTypes();if(w.length===0){this.hls.trigger(d.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}w.forEach(function(s){l.executeNext(s)})}},g.createSourceBuffers=function(a){var l=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var C=0;for(var w in a)if(!l[w]){var s=a[w];if(!s)throw Error("source buffer exists for track "+w+", however track does not");var L=s.levelCodec||s.codec,O=s.container+";codecs="+L;f.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var x=l[w]=t.addSourceBuffer(O),b=w;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[w]={buffer:x,codec:L,container:s.container,levelCodec:s.levelCodec,id:s.id},C++}catch(y){f.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(d.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:O})}}C&&this.hls.trigger(d.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(a){var l=this.operationQueue,t=l.current(a);t.onStart()},g._onSBUpdateEnd=function(a){var l=this.operationQueue,t=l.current(a);t.onComplete(),l.shiftAndExecuteNext(a)},g._onSBUpdateError=function(a,l){f.logger.error("[buffer-controller]: "+a+" SourceBuffer error",l),this.hls.trigger(d.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(l)},g.removeExecutor=function(a,l,t){var C=this.media,w=this.mediaSource,s=this.operationQueue,L=this.sourceBuffer,O=L[a];if(!C||!w||!O){f.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(a);return}var x=Object(P.isFiniteNumber)(C.duration)?C.duration:Infinity,b=Object(P.isFiniteNumber)(w.duration)?w.duration:Infinity,y=Math.max(0,l),T=Math.min(t,x,b);T>y?(f.logger.log("[buffer-controller]: Removing ["+y+","+T+"] from the "+a+" SourceBuffer"),console.assert(!O.updating,a+" sourceBuffer must not be updating"),O.remove(y,T)):s.shiftAndExecuteNext(a)},g.appendExecutor=function(a,l){var t=this.operationQueue,C=this.sourceBuffer,w=C[l];if(!w){f.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(l);return}w.ended=!1,console.assert(!w.updating,l+" sourceBuffer must not be updating"),w.appendBuffer(a)},g.blockBuffers=function(a,l){var t=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){f.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var C=this.operationQueue,w=l.map(function(s){return C.appendBlocker(s)});Promise.all(w).then(function(){a(),l.forEach(function(s){var L=t.sourceBuffer[s];(!L||!L.updating)&&C.shiftAndExecuteNext(s)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(a,l,t){var C=this.sourceBuffer[a];if(!C)return;var w=t.bind(this,a);this.listeners[a].push({event:l,listener:w}),C.addEventListener(l,w)},g.removeBufferListeners=function(a){var l=this.sourceBuffer[a];if(!l)return;this.listeners[a].forEach(function(t){l.removeEventListener(t.event,t.listener)})},v}()},"./src/controller/buffer-operation-queue.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return d});var P=S("./src/utils/logger.ts"),d=function(){function f(c){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=c}var _=f.prototype;return _.append=function(o,i){var n=this.queues[i];n.push(o),n.length===1&&this.buffers[i]&&this.executeNext(i)},_.insertAbort=function(o,i){var n=this.queues[i];n.unshift(o),this.executeNext(i)},_.appendBlocker=function(o){var i,n=new Promise(function(p){i=p}),u={execute:i,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,o),n},_.executeNext=function(o){var i=this.buffers,n=this.queues,u=i[o],p=n[o];if(p.length){var h=p[0];try{h.execute()}catch(v){P.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),h.onError(v),(!u||!u.updating)&&(p.shift(),this.executeNext(o))}}},_.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},_.current=function(o){return this.queues[o][0]},f}()},"./src/controller/cap-level-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts");function d(c,o){for(var i=0;i<o.length;i++){var n=o[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(c,n.key,n)}}function f(c,o,i){return o&&d(c.prototype,o),i&&d(c,i),c}var _=function(){function c(i){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=i,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=c.prototype;return o.setStreamController=function(n){this.streamController=n},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var n=this.hls;n.on(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var n=this.hls;n.off(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(n,u){c.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},o.onMediaAttaching=function(n,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},o.onManifestParsed=function(n,u){var p=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},o.onBufferCodecs=function(n,u){var p=this.hls;p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(n.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},o.getMaxLevel=function(n){var u=this,p=this.hls.levels;if(!p.length)return-1;var h=p.filter(function(v,g){return c.isLevelAllowed(g,u.restrictedLevels)&&g<=n});return this.clientRect=null,c.getMaxLevelByMediaSize(h,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,u={width:0,height:0};if(n){var p=n.getBoundingClientRect();u.width=p.width,u.height=p.height,!u.width&&!u.height&&(u.width=p.right-p.left||n.width||0,u.height=p.bottom-p.top||n.height||0)}return this.clientRect=u,u},c.isLevelAllowed=function(n,u){return u===void 0&&(u=[]),u.indexOf(n)===-1},c.getMaxLevelByMediaSize=function(n,u,p){if(!n||!n.length)return-1;for(var h=function(l,t){return t?l.width!==t.width||l.height!==t.height:!0},v=n.length-1,g=0;g<n.length;g+=1){var E=n[g];if((E.width>=u||E.height>=p)&&h(E,n[g+1])){v=g;break}}return v},f(c,[{key:"mediaWidth",get:function(){return this.getDimensions().width*c.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*c.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(u){}return n}}]),c}();m.default=_},"./src/controller/cmcd-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return h});var P=S("./src/events.ts"),d=S("./src/types/cmcd.ts"),f=S("./src/utils/buffer-helper.ts"),_=S("./src/utils/logger.ts");function c(v,g){for(var E=0;E<g.length;E++){var a=g[E];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(v,a.key,a)}}function o(v,g,E){return g&&c(v.prototype,g),E&&c(v,E),v}function i(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=n(v))||g&&v&&typeof v.length=="number"){E&&(v=E);var a=0;return function(){return a>=v.length?{done:!0}:{done:!1,value:v[a++]}}}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 n(v,g){if(!v)return;if(typeof v=="string")return u(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 u(v,g)}function u(v,g){(g==null||g>v.length)&&(g=v.length);for(var E=0,a=new Array(g);E<g;E++)a[E]=v[E];return a}function p(){return p=Object.assign||function(v){for(var g=1;g<arguments.length;g++){var E=arguments[g];for(var a in E)Object.prototype.hasOwnProperty.call(E,a)&&(v[a]=E[a])}return v},p.apply(this,arguments)}var h=function(){function v(E){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(C){try{a.apply(C,{ot:d.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(w){_.logger.warn("Could not generate manifest CMCD data.",w)}},this.applyFragmentData=function(C){try{var w=C.frag,s=a.hls.levels[w.level],L=a.getObjectType(w),O={d:w.duration*1e3,ot:L};(L===d.CMCDObjectType.VIDEO||L===d.CMCDObjectType.AUDIO||L==d.CMCDObjectType.MUXED)&&(O.br=s.bitrate/1e3,O.tb=a.getTopBandwidth(L),O.bl=a.getBufferLength(L)),a.apply(C,O)}catch(x){_.logger.warn("Could not generate segment CMCD data.",x)}},this.hls=E;var l=this.config=E.config,t=l.cmcd;t!=null&&(l.pLoader=this.createPlaylistLoader(),l.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 a=this.hls;a.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(P.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var a=this.hls;a.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(P.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(a,l){this.media=l.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(a,l){var t,C;this.audioBuffer=(t=l.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(C=l.tracks.video)===null||C===void 0?void 0:C.buffer},g.createData=function(){var a;return{v:d.CMCDVersion,sf:d.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},g.apply=function(a,l){l===void 0&&(l={}),p(l,this.createData());var t=l.ot===d.CMCDObjectType.INIT||l.ot===d.CMCDObjectType.VIDEO||l.ot===d.CMCDObjectType.MUXED;if(this.starved&&t&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var C=v.toHeaders(l);if(!Object.keys(C).length)return;a.headers||(a.headers={}),p(a.headers,C)}else{var w=v.toQuery(l);if(!w)return;a.url=v.appendQueryToUri(a.url,w)}},g.getObjectType=function(a){var l=a.type;return l==="subtitle"?d.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?d.CMCDObjectType.INIT:l==="audio"?d.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?d.CMCDObjectType.VIDEO:d.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(a){for(var l=0,t=a===d.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,C=i(t),w;!(w=C()).done;){var s=w.value;s.bitrate>l&&(l=s.bitrate)}return l>0?l:NaN},g.getBufferLength=function(a){var l=this.hls.media,t=a===d.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!l)return NaN;var C=f.BufferHelper.bufferInfo(t,l.currentTime,this.config.maxBufferHole);return C.len*1e3},g.createPlaylistLoader=function(){var a=this.config.pLoader,l=this.applyPlaylistData,t=a||this.config.loader;return function(){function C(s){this.loader=void 0,this.loader=new t(s)}var w=C.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,O,x){l(L),this.loader.load(L,O,x)},o(C,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),C}()},g.createFragmentLoader=function(){var a=this.config.fLoader,l=this.applyFragmentData,t=a||this.config.loader;return function(){function C(s){this.loader=void 0,this.loader=new t(s)}var w=C.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,O,x){l(L),this.loader.load(L,O,x)},o(C,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),C}()},v.uuid=function(){var a=URL.createObjectURL(new Blob),l=a.toString();return URL.revokeObjectURL(a),l.substr(l.lastIndexOf("/")+1)},v.serialize=function(a){for(var l=[],t=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},C=function(K){return Math.round(K)},w=function(K){return C(K/100)*100},s=function(K){return encodeURIComponent(K)},L={br:C,d:C,bl:w,dl:w,mtp:w,nor:s,rtp:w,tb:C},O=Object.keys(a||{}).sort(),x=i(O),b;!(b=x()).done;){var y=b.value,T=a[y];if(!t(T))continue;if(y==="v"&&T===1)continue;if(y=="pr"&&T===1)continue;var k=L[y];k&&(T=k(T));var N=typeof T,I=void 0;y==="ot"||y==="sf"||y==="st"?I=y+"="+T:N==="boolean"?I=y:N==="number"?I=y+"="+T:I=y+"="+JSON.stringify(T),l.push(I)}return l.join(",")},v.toHeaders=function(a){for(var l=Object.keys(a),t={},C=["Object","Request","Session","Status"],w=[{},{},{},{}],s={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},L=0,O=l;L<O.length;L++){var x=O[L],b=s[x]!=null?s[x]:1;w[b][x]=a[x]}for(var y=0;y<w.length;y++){var T=v.serialize(w[y]);T&&(t["CMCD-"+C[y]]=T)}return t},v.toQuery=function(a){return"CMCD="+encodeURIComponent(v.serialize(a))},v.appendQueryToUri=function(a,l){if(!l)return a;var t=a.includes("?")?"&":"?";return""+a+t+l},v}()},"./src/controller/eme-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),d=S("./src/errors.ts"),f=S("./src/utils/logger.ts"),_=S("./src/utils/mediakeys-helper.ts");function c(h,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(h,E.key,E)}}function o(h,v,g){return v&&c(h.prototype,v),g&&c(h,g),h}var i=3,n=function(v,g,E){var a={audioCapabilities:[],videoCapabilities:[]};return v.forEach(function(l){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:E.audioRobustness||""})}),g.forEach(function(l){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:E.videoRobustness||""})}),[a]},u=function(v,g,E,a){switch(v){case _.KeySystems.WIDEVINE:return n(g,E,a);default:throw new Error("Unknown key-system: "+v)}},p=function(){function h(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=h.prototype;return v.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},v._registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},v._unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},v.getLicenseServerUrl=function(E){switch(E){case _.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,a,l){var t=this,C=u(E,a,l,this._drmSystemOptions);f.logger.log("Requesting encrypted media key-system access");var w=this.requestMediaKeySystemAccess(E,C);this.mediaKeysPromise=w.then(function(s){return t._onMediaKeySystemAccessObtained(E,s)}),w.catch(function(s){f.logger.error('Failed to obtain key-system "'+E+'" access:',s)})},v._onMediaKeySystemAccessObtained=function(E,a){var l=this;f.logger.log('Access for key-system "'+E+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:E};this._mediaKeysList.push(t);var C=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(w){return t.mediaKeys=w,f.logger.log('Media-keys created for key-system "'+E+'"'),l._onMediaKeysCreated(),w});return C.catch(function(w){f.logger.error("Failed to create media-keys:",w)}),C},v._onMediaKeysCreated=function(){var E=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),E._onNewMediaKeySession(a.mediaKeysSession))})},v._onNewMediaKeySession=function(E){var a=this;f.logger.log("New key-system session "+E.sessionId),E.addEventListener("message",function(l){a._onKeySessionMessage(E,l.message)},!1)},v._onKeySessionMessage=function(E,a){f.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(l){f.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),E.update(l)})},v.onMediaEncrypted=function(E){var a=this;if(f.logger.log('Media is encrypted using "'+E.initDataType+'" init data type'),!this.mediaKeysPromise){f.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(C){if(!a._media)return;a._attemptSetMediaKeys(C),a._generateRequestWithPreferredKeySession(E.initDataType,E.initData)};this.mediaKeysPromise.then(l).catch(l)},v._attemptSetMediaKeys=function(E){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){f.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}f.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},v._generateRequestWithPreferredKeySession=function(E,a){var l=this,t=this._mediaKeysList[0];if(!t){f.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){f.logger.warn("Key-Session already initialized but requested again");return}var C=t.mediaKeysSession;if(!C){f.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){f.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}f.logger.log('Generating key-session request for "'+E+'" init data type'),t.mediaKeysSessionInitialized=!0,C.generateRequest(E,a).then(function(){f.logger.debug("Key-session generation succeeded")}).catch(function(w){f.logger.error("Error generating key-session request:",w),l.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},v._createLicenseXhr=function(E,a,l){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,E,a,l);var C=this._licenseXhrSetup;if(C)try{C.call(this.hls,t,E),C=void 0}catch(w){f.logger.error(w)}try{t.readyState||t.open("POST",E,!0),C&&C.call(this.hls,t,E)}catch(w){throw new Error("issue setting up KeySystem license XHR "+w)}return t},v._onLicenseRequestReadyStageChange=function(E,a,l,t){switch(E.readyState){case 4:if(E.status===200){this._requestLicenseFailureCount=0,f.logger.log("License request succeeded");var C=E.response,w=this._licenseResponseCallback;if(w)try{C=w.call(this.hls,E,a)}catch(L){f.logger.error(L)}t(C)}else{if(f.logger.error("License Request XHR failed ("+a+"). Status: "+E.status+" ("+E.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>i){this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var s=i-this._requestLicenseFailureCount+1;f.logger.warn("Retrying license request, "+s+" attempts left"),this._requestLicense(l,t)}break}},v._generateLicenseRequestChallenge=function(E,a){switch(E.mediaKeySystemDomain){case _.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+E.mediaKeySystemDomain)},v._requestLicense=function(E,a){f.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){f.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(l.mediaKeySystemDomain),C=this._createLicenseXhr(t,E,a);f.logger.log("Sending license request to URL: "+t);var w=this._generateLicenseRequestChallenge(l,E);C.send(w)}catch(s){f.logger.error("Failure requesting DRM license: "+s),this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.KEY_SYSTEM_ERROR,details:d.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},v.onMediaAttached=function(E,a){if(!this._emeEnabled)return;var l=a.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},v.onMediaDetached=function(){var E=this._media,a=this._mediaKeysList;if(!E)return;E.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return E.setMediaKeys(null)}).catch(function(){})},v.onManifestParsed=function(E,a){if(!this._emeEnabled)return;var l=a.levels.map(function(C){return C.audioCodec}).filter(function(C){return!!C}),t=a.levels.map(function(C){return C.videoCodec}).filter(function(C){return!!C});this._attemptKeySystemAccess(_.KeySystems.WIDEVINE,l,t)},o(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}();m.default=p},"./src/controller/fps-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),d=S("./src/utils/logger.ts"),f=function(){function _(o){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=o,this.registerListeners()}var c=_.prototype;return c.setStreamController=function(i){this.streamController=i},c.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(i,n){var u=this.hls.config;if(u.capLevelOnFPSDrop){var p=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),u.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(i,n,u){var p=performance.now();if(n){if(this.lastTime){var h=p-this.lastTime,v=u-this.lastDroppedFrames,g=n-this.lastDecodedFrames,E=1e3*v/h,a=this.hls;if(a.trigger(P.Events.FPS_DROP,{currentDropped:v,currentDecoded:g,totalDroppedFrames:u}),E>0&&v>a.config.fpsDroppedMonitoringThreshold*g){var l=a.currentLevel;d.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=l)&&(l=l-1,a.trigger(P.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:a.currentLevel}),a.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=u,this.lastDecodedFrames=n}},c.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var n=i.getVideoPlaybackQuality();this.checkFPS(i,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},_}();m.default=f},"./src/controller/fragment-finders.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"findFragmentByPDT",function(){return f}),S.d(m,"findFragmentByPTS",function(){return _}),S.d(m,"fragmentWithinToleranceTest",function(){return c}),S.d(m,"pdtWithinToleranceTest",function(){return o}),S.d(m,"findFragWithCC",function(){return i});var P=S("./src/polyfills/number.ts"),d=S("./src/utils/binary-search.ts");function f(n,u,p){if(u===null||!Array.isArray(n)||!n.length||!Object(P.isFiniteNumber)(u))return null;var h=n[0].programDateTime;if(u<(h||0))return null;var v=n[n.length-1].endProgramDateTime;if(u>=(v||0))return null;p=p||0;for(var g=0;g<n.length;++g){var E=n[g];if(o(u,p,E))return E}return null}function _(n,u,p,h){p===void 0&&(p=0),h===void 0&&(h=0);var v=null;if(n?v=u[n.sn-u[0].sn+1]||null:p===0&&u[0].start===0&&(v=u[0]),v&&c(p,h,v)===0)return v;var g=d.default.search(u,c.bind(null,p,h));return g||v}function c(n,u,p){n===void 0&&(n=0),u===void 0&&(u=0);var h=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-h<=n?1:p.start-h>n&&p.start?-1:0}function o(n,u,p){var h=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,v=p.endProgramDateTime||0;return v-h>n}function i(n,u){return d.default.search(n,function(p){return p.cc<u?1:p.cc>u?-1:0})}},"./src/controller/fragment-tracker.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"FragmentState",function(){return f}),S.d(m,"FragmentTracker",function(){return _});var P=S("./src/events.ts"),d=S("./src/types/loader.ts"),f;(function(i){i.NOT_LOADED="NOT_LOADED",i.BACKTRACKED="BACKTRACKED",i.APPENDING="APPENDING",i.PARTIAL="PARTIAL",i.OK="OK"})(f||(f={}));var _=function(){function i(u){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=u,this._registerListeners()}var n=i.prototype;return n._registerListeners=function(){var p=this.hls;p.on(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var p=this.hls;p.off(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(p,h){if(h===d.PlaylistLevelType.MAIN){var v=this.activeFragment,g=this.activeParts;if(!v)return null;if(g)for(var E=g.length;E--;){var a=g[E],l=a?a.end:v.appendedPTS;if(a.start<=p&&l!==void 0&&p<=l)return E>9&&(this.activeParts=g.slice(E-9)),a}else if(v.start<=p&&v.appendedPTS!==void 0&&p<=v.appendedPTS)return v}return this.getBufferedFrag(p,h)},n.getBufferedFrag=function(p,h){for(var v=this.fragments,g=Object.keys(v),E=g.length;E--;){var a=v[g[E]];if((a==null?void 0:a.body.type)===h&&a.buffered){var l=a.body;if(l.start<=p&&p<=l.end)return l}}return null},n.detectEvictedFragments=function(p,h,v){var g=this;Object.keys(this.fragments).forEach(function(E){var a=g.fragments[E];if(!a)return;if(!a.buffered){a.body.type===v&&g.removeFragment(a.body);return}var l=a.range[p];if(!l)return;l.time.some(function(t){var C=!g.isTimeBuffered(t.startPTS,t.endPTS,h);return C&&g.removeFragment(a.body),C})})},n.detectPartialFragments=function(p){var h=this,v=this.timeRanges,g=p.frag,E=p.part;if(!v||g.sn==="initSegment")return;var a=o(g),l=this.fragments[a];if(!l)return;Object.keys(v).forEach(function(t){var C=g.elementaryStreams[t];if(!C)return;var w=v[t],s=E!==null||C.partial===!0;l.range[t]=h.getBufferedTimes(g,E,s,w)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},n.fragBuffered=function(p){var h=o(p),v=this.fragments[h];v&&(v.backtrack=v.loaded=null,v.buffered=!0)},n.getBufferedTimes=function(p,h,v,g){for(var E={time:[],partial:v},a=h?h.start:p.start,l=h?h.end:p.end,t=p.minEndPTS||l,C=p.maxStartPTS||a,w=0;w<g.length;w++){var s=g.start(w)-this.bufferPadding,L=g.end(w)+this.bufferPadding;if(C>=s&&t<=L){E.time.push({startPTS:Math.max(a,g.start(w)),endPTS:Math.min(l,g.end(w))});break}else if(a<L&&l>s)E.partial=!0,E.time.push({startPTS:Math.max(a,g.start(w)),endPTS:Math.min(l,g.end(w))});else if(l<=s)break}return E},n.getPartialFragment=function(p){var h=null,v,g,E,a=0,l=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(C){var w=t[C];if(!w)return;c(w)&&(g=w.body.start-l,E=w.body.end+l,p>=g&&p<=E&&(v=Math.min(p-g,E-p),a<=v&&(h=w.body,a=v)))}),h},n.getState=function(p){var h=o(p),v=this.fragments[h];return v?v.buffered?c(v)?f.PARTIAL:f.OK:v.backtrack?f.BACKTRACKED:f.APPENDING:f.NOT_LOADED},n.backtrack=function(p,h){var v=o(p),g=this.fragments[v];if(!g||g.backtrack)return null;var E=g.backtrack=h||g.loaded;return g.loaded=null,E},n.getBacktrackData=function(p){var h=o(p),v=this.fragments[h];if(v){var g,E=v.backtrack;if(E!=null&&(g=E.payload)!==null&&g!==void 0&&g.byteLength)return E;this.removeFragment(p)}return null},n.isTimeBuffered=function(p,h,v){for(var g,E,a=0;a<v.length;a++){if(g=v.start(a)-this.bufferPadding,E=v.end(a)+this.bufferPadding,p>=g&&h<=E)return!0;if(h<=g)return!1}return!1},n.onFragLoaded=function(p,h){var v=h.frag,g=h.part;if(v.sn==="initSegment"||v.bitrateTest||g)return;var E=o(v);this.fragments[E]={body:v,loaded:h,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(p,h){var v=this,g=h.frag,E=h.part,a=h.timeRanges;if(g.type===d.PlaylistLevelType.MAIN)if(this.activeFragment=g,E){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(E)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var C=a[t];if(v.detectEvictedFragments(t,C),!E)for(var w=0;w<C.length;w++)g.appendedPTS=Math.max(C.end(w),g.appendedPTS||0)})},n.onFragBuffered=function(p,h){this.detectPartialFragments(h)},n.hasFragment=function(p){var h=o(p);return!!this.fragments[h]},n.removeFragmentsInRange=function(p,h,v){var g=this;Object.keys(this.fragments).forEach(function(E){var a=g.fragments[E];if(!a)return;if(a.buffered){var l=a.body;l.type===v&&l.start<h&&l.end>p&&g.removeFragment(l)}})},n.removeFragment=function(p){var h=o(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[h]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},i}();function c(i){var n,u;return i.buffered&&(((n=i.range.video)===null||n===void 0?void 0:n.partial)||((u=i.range.audio)===null||u===void 0?void 0:u.partial))}function o(i){return i.type+"_"+i.level+"_"+i.urlId+"_"+i.sn}},"./src/controller/gap-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"STALL_MINIMUM_DURATION_MS",function(){return c}),S.d(m,"MAX_START_GAP_JUMP",function(){return o}),S.d(m,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return i}),S.d(m,"SKIP_BUFFER_RANGE_START",function(){return n}),S.d(m,"default",function(){return u});var P=S("./src/utils/buffer-helper.ts"),d=S("./src/errors.ts"),f=S("./src/events.ts"),_=S("./src/utils/logger.ts"),c=250,o=2,i=.1,n=.05,u=function(){function p(v,g,E,a){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=a}var h=p.prototype;return h.destroy=function(){this.hls=this.fragmentTracker=this.media=null},h.poll=function(g){var E=this.config,a=this.media,l=this.stalled,t=a.currentTime,C=a.seeking,w=this.seeking&&!C,s=!this.seeking&&C;if(this.seeking=C,t!==g){if(this.moved=!0,l!==null){if(this.stallReported){var L=self.performance.now()-l;_.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((s||w)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!P.BufferHelper.getBuffered(a).length)return;var O=P.BufferHelper.bufferInfo(a,t,0),x=O.len>0,b=O.nextStart||0;if(!x&&!b)return;if(C){var y=O.len>o,T=!b||b-t>o&&!this.fragmentTracker.getPartialFragment(t);if(y||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,N=Math.max(b,O.start||0)-t,I=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,W=I==null||((k=I.details)===null||k===void 0)?void 0:k.live,K=W?I.details.targetduration*2:o;if(N>0&&N<=K){this._trySkipBufferHole(null);return}}var U=self.performance.now();if(l===null){this.stalled=U;return}var z=U-l;!C&&z>=c&&this._reportStall(O.len);var B=P.BufferHelper.bufferInfo(a,t,E.maxBufferHole);this._tryFixBufferStall(B,z)},h._tryFixBufferStall=function(g,E){var a=this.config,l=this.fragmentTracker,t=this.media,C=t.currentTime,w=l.getPartialFragment(C);if(w){var s=this._trySkipBufferHole(w);if(s)return}g.len>a.maxBufferHole&&E>a.highBufferWatchdogPeriod*1e3&&(_.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(g){var E=this.hls,a=this.media,l=this.stallReported;l||(this.stallReported=!0,_.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+g+")"),E.trigger(f.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},h._trySkipBufferHole=function(g){for(var E=this.config,a=this.hls,l=this.media,t=l.currentTime,C=0,w=P.BufferHelper.getBuffered(l),s=0;s<w.length;s++){var L=w.start(s);if(t+E.maxBufferHole>=C&&t<L){var O=Math.max(L+n,l.currentTime+i);return _.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,l.currentTime=O,g&&a.trigger(f.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:g}),O}C=w.end(s)}return 0},h._tryNudgeBuffer=function(){var g=this.config,E=this.hls,a=this.media,l=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<g.nudgeMaxRetry){var C=l+t*g.nudgeOffset;_.logger.warn("Nudging 'currentTime' from "+l+" to "+C),a.currentTime=C,E.trigger(f.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else _.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+g.nudgeMaxRetry+" nudges"),E.trigger(f.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),d=S("./src/utils/texttrack-utils.ts"),f=S("./src/demux/id3.ts"),_=.25,c=function(){function o(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var i=o.prototype;return i.destroy=function(){this._unregisterListeners()},i._registerListeners=function(){var u=this.hls;u.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i._unregisterListeners=function(){var u=this.hls;u.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i.onMediaAttached=function(u,p){this.media=p.media},i.onMediaDetaching=function(){if(!this.id3Track)return;Object(d.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},i.getID3Track=function(u){if(!this.media)return;for(var p=0;p<u.length;p++){var h=u[p];if(h.kind==="metadata"&&h.label==="id3")return Object(d.sendAddTrackEvent)(h,this.media),h}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(u,p){if(!this.media)return;var h=p.frag,v=p.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 a=f.getID3Frames(v[E].data);if(a){var l=v[E].pts,t=E<v.length-1?v[E+1].pts:h.end,C=t-l;C<=0&&(t=l+_);for(var w=0;w<a.length;w++){var s=a[w];if(!f.isTimeStampFrame(s)){var L=new g(l,t,"");L.value=s,this.id3Track.addCue(L)}}}}},i.onBufferFlushing=function(u,p){var h=p.startOffset,v=p.endOffset,g=p.type;if(!g||g==="audio"){var E=this.id3Track;E&&Object(d.removeCuesInRange)(E,h,v)}},o}();m.default=c},"./src/controller/latency-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/errors.ts"),d=S("./src/events.ts"),f=S("./src/utils/logger.ts");function _(i,n){for(var u=0;u<n.length;u++){var p=n[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}function c(i,n,u){return n&&_(i.prototype,n),u&&_(i,u),i}var o=function(){function i(u){var p=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 p.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var n=i.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(d.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(d.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(d.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(d.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(d.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(d.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(d.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(d.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(d.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(d.Events.ERROR,this.onError)},n.onMediaAttached=function(p,h){this.media=h.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(p,h){var v=h.details;this.levelDetails=v,v.advanced&&this.timeupdate(),!v.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(p,h){if(h.details!==P.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,f.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var p=this.media,h=this.levelDetails;if(!p||!h)return;this.currentTime=p.currentTime;var v=this.computeLatency();if(v===null)return;this._latency=v;var g=this.config,E=g.lowLatencyMode,a=g.maxLiveSyncPlaybackRate;if(!E||a===1)return;var l=this.targetLatency;if(l===null)return;var t=v-l,C=Math.min(this.maxLatency,l+h.targetduration),w=t<C;if(h.live&&w&&t>.05&&this.forwardBufferLength>1){var s=Math.min(2,Math.max(1,a)),L=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;p.playbackRate=Math.min(s,Math.max(1,L))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},n.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},n.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},c(i,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,h=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:h?p.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var h=p.holdBack,v=p.partHoldBack,g=p.targetduration,E=this.config,a=E.liveSyncDuration,l=E.liveSyncDurationCount,t=E.lowLatencyMode,C=this.hls.userConfig,w=t&&v||h;(C.liveSyncDuration||C.liveSyncDurationCount||w===0)&&(w=a!==void 0?a:l*g);var s=g,L=1;return w+Math.min(this.stallCount*L,s)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),h=this.targetLatency,v=this.levelDetails;if(p===null||h===null||v===null)return null;var g=v.edge,E=p-h-this.edgeStalled,a=g-v.totalduration,l=g-(this.config.lowLatencyMode&&v.partTarget||v.targetduration);return Math.min(Math.max(a,E),l)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var h=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-h,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,h=this.levelDetails;if(!p||!h)return 0;var v=p.buffered.length;return v?p.buffered.end(v-1):h.edge-this.currentTime}}]),i}()},"./src/controller/level-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return E});var P=S("./src/types/level.ts"),d=S("./src/events.ts"),f=S("./src/errors.ts"),_=S("./src/utils/codecs.ts"),c=S("./src/controller/level-helper.ts"),o=S("./src/controller/base-playlist-controller.ts"),i=S("./src/types/loader.ts");function n(){return n=Object.assign||function(a){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var C in t)Object.prototype.hasOwnProperty.call(t,C)&&(a[C]=t[C])}return a},n.apply(this,arguments)}function u(a,l){for(var t=0;t<l.length;t++){var C=l[t];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(a,C.key,C)}}function p(a,l,t){return l&&u(a.prototype,l),t&&u(a,t),a}function h(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,v(a,l)}function v(a,l){return v=Object.setPrototypeOf||function(C,w){return C.__proto__=w,C},v(a,l)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),E=function(a){h(l,a);function l(C){var w;return w=a.call(this,C,"[level-controller]")||this,w._levels=[],w._firstLevel=-1,w._startLevel=void 0,w.currentLevelIndex=-1,w.manualLevelIndex=-1,w.onParsedComplete=void 0,w._registerListeners(),w}var t=l.prototype;return t._registerListeners=function(){var w=this.hls;w.on(d.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.on(d.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(d.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.on(d.Events.FRAG_LOADED,this.onFragLoaded,this),w.on(d.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var w=this.hls;w.off(d.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.off(d.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(d.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.off(d.Events.FRAG_LOADED,this.onFragLoaded,this),w.off(d.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var w=this._levels;w.forEach(function(s){s.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(w,s){var L=[],O=[],x=[],b,y={},T,k=!1,N=!1,I=!1;if(s.levels.forEach(function(z){var B=z.attrs;k=k||!!(z.width&&z.height),N=N||!!z.videoCodec,I=I||!!z.audioCodec,g&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var H=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;T=y[H],T?T.url.push(z.url):(T=new P.Level(z),y[H]=T,L.push(T)),B&&(B.AUDIO&&Object(c.addGroupId)(T,"audio",B.AUDIO),B.SUBTITLES&&Object(c.addGroupId)(T,"text",B.SUBTITLES))}),(k||N)&&I&&(L=L.filter(function(z){var B=z.videoCodec,H=z.width,G=z.height;return!!B||!!(H&&G)})),L=L.filter(function(z){var B=z.audioCodec,H=z.videoCodec;return(!B||Object(_.isCodecSupportedInMp4)(B,"audio"))&&(!H||Object(_.isCodecSupportedInMp4)(H,"video"))}),s.audioTracks&&(O=s.audioTracks.filter(function(z){return!z.audioCodec||Object(_.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(c.assignTrackIdsByGroup)(O)),s.subtitles&&(x=s.subtitles,Object(c.assignTrackIdsByGroup)(x)),L.length>0){b=L[0].bitrate,L.sort(function(z,B){return z.bitrate-B.bitrate}),this._levels=L;for(var W=0;W<L.length;W++)if(L[W].bitrate===b){this._firstLevel=W,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+b);break}var K=I&&!N,U={levels:L,audioTracks:O,subtitleTracks:x,firstLevel:this._firstLevel,stats:s.stats,audio:I,video:N,altAudio:!K&&O.some(function(z){return!!z.url})};this.hls.trigger(d.Events.MANIFEST_PARSED,U),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(d.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:s.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(w,s){if(a.prototype.onError.call(this,w,s),s.fatal)return;var L=s.context,O=this._levels[this.currentLevelIndex];if(L&&(L.type===i.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&L.groupId===O.audioGroupIds[O.urlId]||L.type===i.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&L.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var x=!1,b=!0,y;switch(s.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:if(s.frag){var T=this._levels[s.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(y=s.frag.level)):y=s.frag.level}break;case f.ErrorDetails.LEVEL_LOAD_ERROR:case f.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(b=!1),y=L.level),x=!0;break;case f.ErrorDetails.REMUX_ALLOC_ERROR:y=s.level,x=!0;break}y!==void 0&&this.recoverLevel(s,y,x,b)},t.recoverLevel=function(w,s,L,O){var x=w.details,b=this._levels[s];if(b.loadError++,L){var y=this.retryLoadingOrFail(w);if(y)w.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=b.url.length;if(T>1&&b.loadError<T)w.levelRetry=!0,this.redundantFailover(s);else if(this.manualLevelIndex===-1){var k=s===0?this._levels.length-1:s-1;this.currentLevelIndex!==k&&this._levels[k].loadError===0&&(this.warn(x+": switch to "+k),w.levelRetry=!0,this.hls.nextAutoLevel=k)}}},t.redundantFailover=function(w){var s=this._levels[w],L=s.url.length;if(L>1){var O=(s.urlId+1)%L;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(x){x.urlId=O}),this.level=w}},t.onFragLoaded=function(w,s){var L=s.frag;if(L!==void 0&&L.type===i.PlaylistLevelType.MAIN){var O=this._levels[L.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(w,s){var L,O=s.level,x=s.details,b=this._levels[O];if(!b){var y;this.warn("Invalid level index "+O),(y=s.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,s,b.details)):(L=s.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(x.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(w,s){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var O=-1,x=this.hls.audioTracks[s.id].groupId,b=0;b<L.audioGroupIds.length;b++)if(L.audioGroupIds[b]===x){O=b;break}O!==L.urlId&&(L.urlId=O,this.startLoad())}},t.loadPlaylist=function(w){var s=this.currentLevelIndex,L=this._levels[s];if(this.canLoad&&L&&L.url.length>0){var O=L.urlId,x=L.url[O];if(w)try{x=w.addDirectives(x)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+s+(w?" at sn "+w.msn+" part "+w.part:"")+" with URL-id "+O+" "+x),this.clearTimer(),this.hls.trigger(d.Events.LEVEL_LOADING,{url:x,level:s,id:O,deliveryDirectives:w||null})}},t.removeLevel=function(w,s){var L=function(b,y){return y!==s},O=this._levels.filter(function(x,b){return b!==w?!0:x.url.length>1&&s!==void 0?(x.url=x.url.filter(L),x.audioGroupIds&&(x.audioGroupIds=x.audioGroupIds.filter(L)),x.textGroupIds&&(x.textGroupIds=x.textGroupIds.filter(L)),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(d.Events.LEVELS_UPDATED,{levels:O})},p(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(w){var s,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===w&&(s=L[w])!==null&&s!==void 0&&s.details)return;if(w<0||w>=L.length){var O=w<0;if(this.hls.trigger(d.Events.ERROR,{type:f.ErrorTypes.OTHER_ERROR,details:f.ErrorDetails.LEVEL_SWITCH_ERROR,level:w,fatal:O,reason:"invalid level idx"}),O)return;w=Math.min(w,L.length-1)}this.clearTimer();var x=this.currentLevelIndex,b=L[x],y=L[w];this.log("switching to level "+w+" from "+x),this.currentLevelIndex=w;var T=n({},y,{level:w,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete T._urlId,this.hls.trigger(d.Events.LEVEL_SWITCHING,T);var k=y.details;if(!k||k.live){var N=this.switchParams(y.uri,b==null?void 0:b.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(w){this.manualLevelIndex=w,this._startLevel===void 0&&(this._startLevel=w),w!==-1&&(this.level=w)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(w){this._firstLevel=w}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var w=this.hls.config.startLevel;return w!==void 0?w:this._firstLevel}else return this._startLevel},set:function(w){this._startLevel=w}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(w){this.level=w,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=w)}}]),l}(o.default)},"./src/controller/level-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"addGroupId",function(){return f}),S.d(m,"assignTrackIdsByGroup",function(){return _}),S.d(m,"updatePTS",function(){return c}),S.d(m,"updateFragPTSDTS",function(){return i}),S.d(m,"mergeDetails",function(){return n}),S.d(m,"mapPartIntersection",function(){return u}),S.d(m,"mapFragmentIntersection",function(){return p}),S.d(m,"adjustSliding",function(){return h}),S.d(m,"addSliding",function(){return v}),S.d(m,"computeReloadInterval",function(){return g}),S.d(m,"getFragmentWithSN",function(){return E}),S.d(m,"getPartWith",function(){return a});var P=S("./src/polyfills/number.ts"),d=S("./src/utils/logger.ts");function f(l,t,C){switch(t){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(C);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(C);break}}function _(l){var t={};l.forEach(function(C){var w=C.groupId||"";C.id=t[w]=t[w]||0,t[w]++})}function c(l,t,C){var w=l[t],s=l[C];o(w,s)}function o(l,t){var C=t.startPTS;if(Object(P.isFiniteNumber)(C)){var w=0,s;t.sn>l.sn?(w=C-l.start,s=l):(w=l.start-C,s=t),s.duration!==w&&(s.duration=w)}else if(t.sn>l.sn){var L=l.cc===t.cc;L&&l.minEndPTS?t.start=l.start+(l.minEndPTS-l.start):t.start=l.start+l.duration}else t.start=Math.max(l.start-t.duration,0)}function i(l,t,C,w,s,L){var O=w-C;O<=0&&(d.logger.warn("Fragment should have a positive duration",t),w=C+t.duration,L=s+t.duration);var x=C,b=w,y=t.startPTS,T=t.endPTS;if(Object(P.isFiniteNumber)(y)){var k=Math.abs(y-C);Object(P.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(k,t.deltaPTS):t.deltaPTS=k,x=Math.max(C,y),C=Math.min(C,y),s=Math.min(s,t.startDTS),b=Math.min(w,T),w=Math.max(w,T),L=Math.max(L,t.endDTS)}t.duration=w-C;var N=C-t.start;t.appendedPTS=w,t.start=t.startPTS=C,t.maxStartPTS=x,t.startDTS=s,t.endPTS=w,t.minEndPTS=b,t.endDTS=L;var I=t.sn;if(!l||I<l.startSN||I>l.endSN)return 0;var W,K=I-l.startSN,U=l.fragments;for(U[K]=t,W=K;W>0;W--)o(U[W],U[W-1]);for(W=K;W<U.length-1;W++)o(U[W],U[W+1]);return l.fragmentHint&&o(U[U.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,N}function n(l,t){for(var C=null,w=l.fragments,s=w.length-1;s>=0;s--){var L=w[s].initSegment;if(L){C=L;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var O=0,x;if(p(l,t,function(W,K){W.relurl&&(O=W.cc-K.cc),Object(P.isFiniteNumber)(W.startPTS)&&Object(P.isFiniteNumber)(W.endPTS)&&(K.start=K.startPTS=W.startPTS,K.startDTS=W.startDTS,K.appendedPTS=W.appendedPTS,K.maxStartPTS=W.maxStartPTS,K.endPTS=W.endPTS,K.endDTS=W.endDTS,K.minEndPTS=W.minEndPTS,K.duration=W.endPTS-W.startPTS,K.duration&&(x=K),t.PTSKnown=t.alignedSliding=!0),K.elementaryStreams=W.elementaryStreams,K.loader=W.loader,K.stats=W.stats,K.urlId=W.urlId,W.initSegment&&(K.initSegment=W.initSegment,C=W.initSegment)}),C){var b=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;b.forEach(function(W){var K;(!W.initSegment||W.initSegment.relurl===((K=C)===null||K===void 0?void 0:K.relurl))&&(W.initSegment=C)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(W){return!W}),t.deltaUpdateFailed)){d.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){d.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k<T.length;k++)T[k].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),u(l.partList,t.partList,function(W,K){K.elementaryStreams=W.elementaryStreams,K.stats=W.stats}),x?i(t,x,x.startPTS,x.endPTS,x.startDTS,x.endDTS):h(l,t),T.length&&(t.totalduration=t.edge-T[0].start),t.driftStartTime=l.driftStartTime,t.driftStart=l.driftStart;var N=t.advancedDateTime;if(t.advanced&&N){var I=t.edge;t.driftStart||(t.driftStartTime=N,t.driftStart=I),t.driftEndTime=N,t.driftEnd=I}else t.driftEndTime=l.driftEndTime,t.driftEnd=l.driftEnd,t.advancedDateTime=l.advancedDateTime}function u(l,t,C){if(l&&t)for(var w=0,s=0,L=l.length;s<=L;s++){var O=l[s],x=t[s+w];O&&x&&O.index===x.index&&O.fragment.sn===x.fragment.sn?C(O,x):w--}}function p(l,t,C){for(var w=t.skippedSegments,s=Math.max(l.startSN,t.startSN)-t.startSN,L=(l.fragmentHint?1:0)+(w?t.endSN:Math.min(l.endSN,t.endSN))-t.startSN,O=t.startSN-l.startSN,x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,b=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,y=s;y<=L;y++){var T=b[O+y],k=x[y];w&&!k&&y<w&&(k=t.fragments[y]=T),T&&k&&C(T,k)}}function h(l,t){var C=t.startSN+t.skippedSegments-l.startSN,w=l.fragments;if(C<0||C>=w.length)return;v(t,w[C].start)}function v(l,t){if(t){for(var C=l.fragments,w=l.skippedSegments;w<C.length;w++)C[w].start+=t;l.fragmentHint&&(l.fragmentHint.start+=t)}}function g(l,t){var C=1e3*l.levelTargetDuration,w=C/2,s=l.age,L=s>0&&s<C*3,O=t.loading.end-t.loading.start,x,b=l.availabilityDelay;if(l.updated===!1)if(L){var y=333*l.misses;x=Math.max(Math.min(w,O*2),y),l.availabilityDelay=(l.availabilityDelay||0)+x}else x=w;else L?(b=Math.min(b||C/2,s),l.availabilityDelay=b,x=b+C-s):x=C-O;return Math.round(x)}function E(l,t,C){if(!l||!l.details)return null;var w=l.details,s=w.fragments[t-w.startSN];return s||(s=w.fragmentHint,s&&s.sn===t?s:t<w.startSN&&C&&C.sn===t?C:null)}function a(l,t,C){if(!l||!l.details)return null;var w=l.details.partList;if(w)for(var s=w.length;s--;){var L=w[s];if(L.index===C&&L.fragment.sn===t)return L}return null}},"./src/controller/stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return w});var P=S("./src/polyfills/number.ts"),d=S("./src/controller/base-stream-controller.ts"),f=S("./src/is-supported.ts"),_=S("./src/events.ts"),c=S("./src/utils/buffer-helper.ts"),o=S("./src/controller/fragment-tracker.ts"),i=S("./src/types/loader.ts"),n=S("./src/loader/fragment.ts"),u=S("./src/demux/transmuxer-interface.ts"),p=S("./src/types/transmuxer.ts"),h=S("./src/controller/gap-controller.ts"),v=S("./src/errors.ts"),g=S("./src/utils/logger.ts");function E(s,L){for(var O=0;O<L.length;O++){var x=L[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(s,x.key,x)}}function a(s,L,O){return L&&E(s.prototype,L),O&&E(s,O),s}function l(s,L){s.prototype=Object.create(L.prototype),s.prototype.constructor=s,t(s,L)}function t(s,L){return t=Object.setPrototypeOf||function(x,b){return x.__proto__=b,x},t(s,L)}var C=100,w=function(s){l(L,s);function L(x,b){var y;return y=s.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=L.prototype;return O._registerListeners=function(){var b=this.hls;b.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(_.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(_.Events.ERROR,this.onError,this),b.on(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(_.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var b=this.hls;b.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(_.Events.ERROR,this.onError,this),b.off(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(_.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(_.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(C),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var k=T.startLevel;k===-1&&(T.config.testBandwidth?(k=0,this.bitrateTest=!0):k=T.nextAutoLevel),this.level=T.nextLoadLevel=k,this.loadedmetadata=!1}y>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),b=y),this.state=d.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=d.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,s.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case d.State.IDLE:this.doTickIdle();break;case d.State.WAITING_LEVEL:{var b,y=this.levels,T=this.level,k=y==null||((b=y[T])===null||b===void 0)?void 0:b.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=d.State.IDLE;break}break}case d.State.FRAG_LOADING_WAITING_RETRY:{var N,I=self.performance.now(),W=this.retryDate;(!W||I>=W||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=d.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){s.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var b,y,T=this.hls,k=this.levelLastLoaded,N=this.levels,I=this.media,W=T.config,K=T.nextLoadLevel;if(k===null||!I&&(this.startFragRequested||!W.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[K])return;var U=N[K];this.level=T.nextLoadLevel=K;var z=U.details;if(!z||this.state===d.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==K){this.state=d.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:I,i.PlaylistLevelType.MAIN);if(B===null)return;var H=B.len,G=this.getMaxBufferLength(U.maxBitrate);if(H>=G)return;if(this._streamEnded(B,z)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(_.Events.BUFFER_EOS,ee),this.state=d.State.ENDED;return}var ie=B.end,ue=this.getNextFragment(ie,z);if(this.couldBacktrack&&!this.fragPrevious&&ue&&ue.sn!=="initSegment"){var xe=ue.sn-z.startSN;xe>1&&(ue=z.fragments[xe-1],this.fragmentTracker.removeFragment(ue))}if(ue&&this.fragmentTracker.getState(ue)===o.FragmentState.OK&&this.nextLoadPosition>ie){var Te=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(I,Te,i.PlaylistLevelType.MAIN),ue=this.getNextFragment(this.nextLoadPosition,z)}if(!ue)return;ue.initSegment&&!ue.initSegment.data&&!this.bitrateTest&&(ue=ue.initSegment),((b=ue.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((y=ue.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(ue,z):this.loadFragment(ue,z,ie)},O.loadFragment=function(b,y,T){var k,N=this.fragmentTracker.getState(b);if(this.fragCurrent=b,N===o.FragmentState.BACKTRACKED){var I=this.fragmentTracker.getBacktrackData(b);if(I){this._handleFragmentLoadProgress(I),this._handleFragmentLoadComplete(I);return}else N=o.FragmentState.NOT_LOADED}N===o.FragmentState.NOT_LOADED||N===o.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,s.prototype.loadFragment.call(this,b,y,T)):N===o.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(b){var y=this.fragmentTracker.getAppendedFrag(b,i.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},O.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,i.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,k=this.getAppendedFrag(y.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!y.paused&&b){var N=this.hls.nextLoadLevel,I=b[N],W=this.fragLastKbps;W&&this.fragCurrent?T=this.fragCurrent.duration*I.maxBitrate/(1e3*W)+1:T=0}else T=0;var K=this.getBufferedFrag(y.currentTime+T);if(K){var U=this.followingBufferedFrag(K);if(U){this.abortCurrentFrag();var z=U.maxStartPTS?U.maxStartPTS:U.start,B=U.duration,H=Math.max(K.end,z+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(H,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===d.State.KEY_LOADING&&(this.state=d.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(b,y){s.prototype.flushMainBuffer.call(this,b,y,this.altAudio?"video":null)},O.onMediaAttached=function(b,y){s.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 h.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),s.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var b=this.media,y=b?b.currentTime:null;Object(P.isFiniteNumber)(y)&&this.log("Media seeked to "+y.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.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,k=!1,N;y.levels.forEach(function(I){N=I.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(T=!0),N.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=T&&k&&!Object(f.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!==d.State.IDLE)return;var k=T[y.level];(!k.details||k.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(k.details))&&(this.state=d.State.WAITING_LEVEL)},O.onLevelLoaded=function(b,y){var T,k=this.levels,N=y.level,I=y.details,W=I.totalduration;if(!k){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+I.startSN+","+I.endSN+"], cc ["+I.startCC+", "+I.endCC+"] duration:"+W);var K=this.fragCurrent;K&&(this.state===d.State.FRAG_LOADING||this.state===d.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==y.level&&K.loader&&(this.state=d.State.IDLE,K.loader.abort()));var U=k[N],z=0;if(I.live||(T=U.details)!==null&&T!==void 0&&T.live){if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed)return;z=this.alignPlaylists(I,U.details)}if(U.details=I,this.levelLastLoaded=N,this.hls.trigger(_.Events.LEVEL_UPDATED,{details:I,level:N}),this.state===d.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(I))return;this.state=d.State.IDLE}this.startFragRequested?I.live&&this.synchronizeToLiveEdge(I):this.setStartPosition(I,z),this.tick()},O._handleFragmentLoadProgress=function(b){var y,T=b.frag,k=b.part,N=b.payload,I=this.levels;if(!I){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var W=I[T.level],K=W.details;if(!K){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var U=W.videoCodec,z=K.PTSKnown||!K.live,B=(y=T.initSegment)===null||y===void 0?void 0:y.data,H=this._getAudioCodec(W),G=this.transmuxer=this.transmuxer||new u.default(this.hls,i.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=k?k.index:-1,ie=ee!==-1,ue=new p.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,N.byteLength,ee,ie),xe=this.initPTS[T.cc];G.push(N,B,H,U,T,k,K.totalduration,z,ue,xe)},O.onAudioTrackSwitching=function(b,y){var T=this.altAudio,k=!!y.url,N=y.id;if(!k){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var I=this.fragCurrent;I!=null&&I.loader&&(this.log("Switching to main audio track, cancel main fragment load"),I.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var W=this.hls;T&&W.trigger(_.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),W.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(b,y){var T=y.id,k=!!this.hls.audioTracks[T].url;if(k){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=k,this.tick()},O.onBufferCreated=function(b,y){var T=y.tracks,k,N,I=!1;for(var W in T){var K=T[W];if(K.id==="main"){if(N=W,k=K,W==="video"){var U=T[W];U&&(this.videoBuffer=U.buffer)}}else I=!0}I&&k?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(b,y){var T=y.frag,k=y.part;if(T&&T.type!==i.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(k?" p: "+k.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===d.State.PARSED&&(this.state=d.State.IDLE);return}var N=k?k.stats:T.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,k)},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(i.PlaylistLevelType.MAIN,y);break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==d.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=d.State.ERROR):!y.levelRetry&&this.state===d.State.WAITING_LEVEL&&(this.state=d.State.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(y.parent==="main"&&(this.state===d.State.PARSING||this.state===d.State.PARSED)){var T=!0,k=this.getFwdBufferInfo(this.media,i.PlaylistLevelType.MAIN);k&&k.len>.5&&(T=!this.reduceMaxBufferLength(k.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=c.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=d.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(b,y){var T=y.type;if(T!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(T===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,T,i.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 k=c.BufferHelper.getBuffered(b),N=k.length?k.start(0):0,I=N-T;I>0&&(I<this.config.maxBufferHole||I<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+I+" to match buffer start"),T+=I,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+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 k=y.hls;if(!T||k.nextLoadLevel||y.fragContextChanged(b))return;y.fragLoadError=0,y.state=d.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var N=b.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),k.trigger(_.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(b){var y,T="main",k=this.hls,N=b.remuxResult,I=b.chunkMeta,W=this.getCurrentContext(I);if(!W){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var K=W.frag,U=W.part,z=W.level,B=N.video,H=N.text,G=N.id3,ee=N.initSegment,ie=this.altAudio?void 0:N.audio;if(this.fragContextChanged(K))return;if(this.state=d.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(z,ee.tracks,K,I),k.trigger(_.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:T,tracks:ee.tracks}));var ue=ee.initPTS,xe=ee.timescale;Object(P.isFiniteNumber)(ue)&&(this.initPTS[K.cc]=ue,k.trigger(_.Events.INIT_PTS_FOUND,{frag:K,id:T,initPTS:ue,timescale:xe}))}if(B&&N.independent!==!1){if(z.details){var Te=B.startPTS,se=B.endPTS,ve=B.startDTS,de=B.endDTS;if(U)U.elementaryStreams[B.type]={startPTS:Te,endPTS:se,startDTS:ve,endDTS:de};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var ne=this.getLoadPosition()+this.config.maxBufferHole;if(ne<Te){this.backtrack(K);return}K.setElementaryStreamInfo(B.type,K.start,se,K.start,de,!0)}K.setElementaryStreamInfo(B.type,Te,se,ve,de),this.bufferFragmentData(B,K,U,I)}}else if(N.independent===!1){this.backtrack(K);return}if(ie){var ae=ie.startPTS,Z=ie.endPTS,le=ie.startDTS,Q=ie.endDTS;U&&(U.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:Z,startDTS:le,endDTS:Q}),K.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ae,Z,le,Q),this.bufferFragmentData(ie,K,U,I)}if(G!=null&&(y=G.samples)!==null&&y!==void 0&&y.length){var q={frag:K,id:T,samples:G.samples};k.trigger(_.Events.FRAG_PARSING_METADATA,q)}if(H){var be={frag:K,id:T,samples:H.samples};k.trigger(_.Events.FRAG_PARSING_USERDATA,be)}},O._bufferInitSegment=function(b,y,T,k){var N=this;if(this.state!==d.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var I=y.audio,W=y.video,K=y.audiovideo;if(I){var U=b.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(U&&(U.indexOf("mp4a.40.5")!==-1?U="mp4a.40.2":U="mp4a.40.5"),I.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(U="mp4a.40.5")),z.indexOf("android")!==-1&&I.container!=="audio/mpeg"&&(U="mp4a.40.2",this.log("Android: force audio codec to "+U)),b.audioCodec&&b.audioCodec!==U&&this.log('Swapping manifest audio codec "'+b.audioCodec+'" for "'+U+'"'),I.levelCodec=U,I.id="main",this.log("Init audio buffer, container:"+I.container+", codecs[selected/level/parsed]=["+(U||"")+"/"+(b.audioCodec||"")+"/"+I.codec+"]")}W&&(W.levelCodec=b.videoCodec,W.id="main",this.log("Init video buffer, container:"+W.container+", codecs[level/parsed]=["+(b.videoCodec||"")+"/"+W.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(b.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(_.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(B){var H=y[B],G=H.initSegment;G!=null&&G.byteLength&&N.hls.trigger(_.Events.BUFFER_APPENDING,{type:B,data:G,frag:T,part:null,chunkMeta:k,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=d.State.BACKTRACKING},O.checkFragmentChanged=function(){var b=this.media,y=null;if(b&&b.readyState>1&&b.seeking===!1){var T=b.currentTime;if(c.BufferHelper.isBuffered(b,T)?y=this.getAppendedFrag(T):c.BufferHelper.isBuffered(b,T+.1)&&(y=this.getAppendedFrag(T+.1)),y){var k=this.fragPlaying,N=y.level;(!k||y.sn!==k.sn||k.level!==N||y.urlId!==k.urlId)&&(this.hls.trigger(_.Events.FRAG_CHANGED,{frag:y}),(!k||k.level!==N)&&this.hls.trigger(_.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=y)}}},a(L,[{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}}]),L}(d.default)},"./src/controller/subtitle-stream-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"SubtitleStreamController",function(){return l});var P=S("./src/events.ts"),d=S("./src/utils/logger.ts"),f=S("./src/utils/buffer-helper.ts"),_=S("./src/controller/fragment-finders.ts"),c=S("./src/utils/discontinuities.ts"),o=S("./src/controller/level-helper.ts"),i=S("./src/controller/fragment-tracker.ts"),n=S("./src/controller/base-stream-controller.ts"),u=S("./src/types/loader.ts"),p=S("./src/types/level.ts");function h(t,C){for(var w=0;w<C.length;w++){var s=C[w];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function v(t,C,w){return C&&h(t.prototype,C),w&&h(t,w),t}function g(t,C){t.prototype=Object.create(C.prototype),t.prototype.constructor=t,E(t,C)}function E(t,C){return E=Object.setPrototypeOf||function(s,L){return s.__proto__=L,s},E(t,C)}var a=500,l=function(t){g(C,t);function C(s,L){var O;return O=t.call(this,s,L,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var w=C.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var L=this.hls;L.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(P.Events.ERROR,this.onError,this),L.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w._unregisterListeners=function(){var L=this.hls;L.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(P.Events.ERROR,this.onError,this),L.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(a),this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},w.onLevelLoaded=function(L,O){this.mainDetails=O.details},w.onSubtitleFragProcessed=function(L,O){var x=O.frag,b=O.success;if(this.fragPrevious=x,this.state=n.State.IDLE,!b)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var T,k=x.start,N=0;N<y.length;N++)if(k>=y[N].start&&k<=y[N].end){T=y[N];break}var I=x.start+x.duration;T?T.end=I:(T={start:k,end:I},y.push(T)),this.fragmentTracker.fragBuffered(x)},w.onBufferFlushing=function(L,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 k=T[y].details,N=k.targetduration,I=b-N;if(I<=0)return;O.endOffsetSubtitles=Math.max(0,I),this.tracksBuffered.forEach(function(W){for(var K=0;K<W.length;){if(W[K].end<=I){W.shift();continue}else if(W[K].start<I)W[K].start=I;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(x,I,u.PlaylistLevelType.SUBTITLE)}},w.onError=function(L,O){var x,b=O.frag;if(!b||b.type!==u.PlaylistLevelType.SUBTITLE)return;(x=this.fragCurrent)!==null&&x!==void 0&&x.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},w.onSubtitleTracksUpdated=function(L,O){var x=this,b=O.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(y){return new p.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){x.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},w.onSubtitleTrackSwitch=function(L,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(a)},w.onSubtitleTrackLoaded=function(L,O){var x,b=O.details,y=O.id,T=this.currentTrackId,k=this.levels;if(!k.length)return;var N=k[T];if(y>=k.length||y!==T||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(x=N.details)!==null&&x!==void 0&&x.live){var I=this.mainDetails;if(b.deltaUpdateFailed||!I)return;var W=I.fragments[0];if(!N.details)b.hasProgramDateTime&&I.hasProgramDateTime?Object(c.alignMediaPlaylistByPDT)(b,I):W&&Object(o.addSliding)(b,W.start);else{var K=this.alignPlaylists(b,N.details);K===0&&W&&Object(o.addSliding)(b,W.start)}}if(N.details=b,this.levelLastLoaded=y,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var U=Object(_.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);U||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},w._handleFragmentLoadComplete=function(L){var O=L.frag,x=L.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(k){var N=performance.now();y.trigger(P.Events.FRAG_DECRYPTED,{frag:O,payload:k,stats:{tstart:T,tdecrypt:N}})})}},w.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var L,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,k=this.media,N=f.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-y,T.maxBufferHole),I=N.end,W=N.len,K=this.getMaxBufferLength()+y;if(W>K)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var U=b.fragments,z=U.length,B=b.edge,H,G=this.fragPrevious;if(I<B){var ee=T.maxFragLookUpTolerance;G&&b.hasProgramDateTime&&(H=Object(_.findFragmentByPDT)(U,G.endProgramDateTime,ee)),H||(H=Object(_.findFragmentByPTS)(G,U,I,ee),!H&&G&&G.start<U[0].start&&(H=U[0]))}else H=U[z-1];(L=H)!==null&&L!==void 0&&L.encrypted?(d.logger.log("Loading key for "+H.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(P.Events.KEY_LOADING,{frag:H})):H&&this.fragmentTracker.getState(H)===i.FragmentState.NOT_LOADED&&this.loadFragment(H,b,I)}},w.loadFragment=function(L,O,x){this.fragCurrent=L,t.prototype.loadFragment.call(this,L,O,x)},v(C,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),C}(n.default)},"./src/controller/subtitle-track-controller.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/events.ts"),d=S("./src/utils/texttrack-utils.ts"),f=S("./src/controller/base-playlist-controller.ts"),_=S("./src/types/loader.ts");function c(h,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(h,E.key,E)}}function o(h,v,g){return v&&c(h.prototype,v),g&&c(h,g),h}function i(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,n(h,v)}function n(h,v){return n=Object.setPrototypeOf||function(E,a){return E.__proto__=a,E},n(h,v)}var u=function(h){i(v,h);function v(E){var a;return a=h.call(this,E,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var g=v.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,h.prototype.destroy.call(this)},g.registerListeners=function(){var a=this.hls;a.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(P.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var a=this.hls;a.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(P.Events.ERROR,this.onError,this)},g.onMediaAttached=function(a,l){if(this.media=l.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(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},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 a=p(this.media.textTracks);a.forEach(function(l){Object(d.clearCurrentCues)(l)}),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(a,l){this.tracks=l.subtitleTracks},g.onSubtitleTrackLoaded=function(a,l){var t=l.id,C=l.details,w=this.trackId,s=this.tracksInGroup[w];if(!s){this.warn("Invalid subtitle track id "+t);return}var L=s.details;s.details=l.details,this.log("subtitle track "+t+" loaded ["+C.startSN+"-"+C.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,l,L))},g.onLevelLoading=function(a,l){this.switchLevel(l.level)},g.onLevelSwitching=function(a,l){this.switchLevel(l.level)},g.switchLevel=function(a){var l=this.hls.levels[a];if(!(l!=null&&l.textGroupIds))return;var t=l.textGroupIds[l.urlId];if(this.groupId!==t){var C=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=w;var s=this.findTrackId(C==null?void 0:C.name)||this.findTrackId();this.groupId=t;var L={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(P.Events.SUBTITLE_TRACKS_UPDATED,L),s!==-1&&this.setSubtitleTrack(s,C)}},g.findTrackId=function(a){for(var l=this.tracksInGroup,t=0;t<l.length;t++){var C=l[t];if((!this.selectDefaultTrack||C.default)&&(!a||a===C.name))return C.id}return-1},g.onError=function(a,l){if(h.prototype.onError.call(this,a,l),l.fatal||!l.context)return;l.context.type===_.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},g.loadPlaylist=function(a){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var t=l.id,C=l.groupId,w=l.url;if(a)try{w=a.addDirectives(w)}catch(s){this.warn("Could not construct new URL with HLS Delivery Directives: "+s)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADING,{url:w,id:t,groupId:C,deliveryDirectives:a||null})}},g.toggleTrackModes=function(a){var l=this,t=this.media,C=this.subtitleDisplay,w=this.trackId;if(!t)return;var s=p(t.textTracks),L=s.filter(function(b){return b.groupId===l.groupId});if(a===-1)[].slice.call(s).forEach(function(b){b.mode="disabled"});else{var O=L[w];O&&(O.mode="disabled")}var x=L[a];x&&(x.mode=C?"showing":"hidden")},g.setSubtitleTrack=function(a,l){var t,C=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=C[a])!==null&&t!==void 0&&t.details)||a<-1||a>=C.length)return;this.clearTimer();var w=C[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,w){var s=w.id,L=w.groupId,O=L===void 0?"":L,x=w.name,b=w.type,y=w.url;this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:O,name:x,type:b,url:y});var T=this.switchParams(w.url,l==null?void 0:l.details);this.loadPlaylist(T)}else this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:a})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,l=p(this.media.textTracks),t=0;t<l.length;t++)if(l[t].mode==="hidden")a=t;else if(l[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},o(v,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,l)}}]),v}(f.default);function p(h){for(var v=[],g=0;g<h.length;g++){var E=h[g];E.kind==="subtitles"&&E.label&&v.push(h[g])}return v}m.default=u},"./src/controller/timeline-controller.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"TimelineController",function(){return p});var P=S("./src/polyfills/number.ts"),d=S("./src/events.ts"),f=S("./src/utils/cea-608-parser.ts"),_=S("./src/utils/output-filter.ts"),c=S("./src/utils/webvtt-parser.ts"),o=S("./src/utils/texttrack-utils.ts"),i=S("./src/utils/imsc1-ttml-parser.ts"),n=S("./src/types/loader.ts"),u=S("./src/utils/logger.ts"),p=function(){function E(l){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=l,this.config=l.config,this.Cues=l.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 _.default(this,"textTrack1"),C=new _.default(this,"textTrack2"),w=new _.default(this,"textTrack3"),s=new _.default(this,"textTrack4");this.cea608Parser1=new f.default(1,t,C),this.cea608Parser2=new f.default(3,w,s)}l.on(d.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(d.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(d.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(d.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(d.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(d.Events.FRAG_LOADING,this.onFragLoading,this),l.on(d.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(d.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(d.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(d.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(d.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(d.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=E.prototype;return a.destroy=function(){var t=this.hls;t.off(d.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(d.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(d.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(d.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(d.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(d.Events.FRAG_LOADING,this.onFragLoading,this),t.off(d.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(d.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(d.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(d.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(d.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(d.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(t,C,w,s,L){for(var O=!1,x=L.length;x--;){var b=L[x],y=v(b[0],b[1],C,w);if(y>=0&&(b[0]=Math.min(b[0],C),b[1]=Math.max(b[1],w),O=!0,y/(w-C)>.5))return}if(O||L.push([C,w]),this.config.renderTextTracksNatively){var T=this.captionsTracks[t];this.Cues.newCue(T,C,w,s)}else{var k=this.Cues.newCue(null,C,w,s);this.hls.trigger(d.Events.CUES_PARSED,{type:"captions",cues:k,track:t})}},a.onInitPtsFound=function(t,C){var w=this,s=C.frag,L=C.id,O=C.initPTS,x=C.timescale,b=this.unparsedVttFrags;L==="main"&&(this.initPTS[s.cc]=O,this.timescale[s.cc]=x),b.length&&(this.unparsedVttFrags=[],b.forEach(function(y){w.onFragLoaded(d.Events.FRAG_LOADED,y)}))},a.getExistingTrack=function(t){var C=this.media;if(C)for(var w=0;w<C.textTracks.length;w++){var s=C.textTracks[w];if(s[t])return s}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var C=this.captionsProperties,w=this.captionsTracks,s=this.media,L=C[t],O=L.label,x=L.languageCode,b=this.getExistingTrack(t);if(b)w[t]=b,Object(o.clearCurrentCues)(w[t]),Object(o.sendAddTrackEvent)(w[t],s);else{var y=this.createTextTrack("captions",O,x);y&&(y[t]=!0,w[t]=y)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var C=this.captionsProperties[t];if(!C)return;var w=C.label,s={_id:t,label:w,kind:"captions",default:C.media?!!C.media.default:!1,closedCaptions:C.media};this.nonNativeCaptionsTracks[t]=s,this.hls.trigger(d.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})},a.createTextTrack=function(t,C,w){var s=this.media;return s?s.addTextTrack(t,C,w):void 0},a.onMediaAttaching=function(t,C){this.media=C.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(C){Object(o.clearCurrentCues)(t[C]),delete t[C]}),this.nonNativeCaptionsTracks={}},a.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())},a._cleanTracks=function(){var t=this.media;if(!t)return;var C=t.textTracks;if(C)for(var w=0;w<C.length;w++)Object(o.clearCurrentCues)(C[w])},a.onSubtitleTracksUpdated=function(t,C){var w=this;this.textTracks=[];var s=C.subtitleTracks||[],L=s.some(function(y){return y.textCodec===i.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var O=this.tracks&&s&&this.tracks.length===s.length;if(this.tracks=s||[],this.config.renderTextTracksNatively){var x=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,T){var k;if(T<x.length){for(var N=null,I=0;I<x.length;I++)if(h(x[I],y)){N=x[I];break}N&&(k=N)}k?Object(o.clearCurrentCues)(k):(k=w.createTextTrack("subtitles",y.name,y.lang),k&&(k.mode="disabled")),k&&(k.groupId=y.groupId,w.textTracks.push(k))})}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(d.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},a.onManifestLoaded=function(t,C){var w=this;this.config.enableCEA708Captions&&C.captions&&C.captions.forEach(function(s){var L=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(!L)return;var O="textTrack"+L[1],x=w.captionsProperties[O];if(!x)return;x.label=s.name,s.lang&&(x.languageCode=s.lang),x.media=s})},a.onFragLoading=function(t,C){var w=this.cea608Parser1,s=this.cea608Parser2,L=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(w&&s))return;if(C.frag.type===n.PlaylistLevelType.MAIN){var x,b,y=C.frag.sn,T=(x=C==null||((b=C.part)===null||b===void 0)?void 0:b.index)!=null?x:-1;y===L+1||y===L&&T===O+1||(w.reset(),s.reset()),this.lastSn=y,this.lastPartIndex=T}},a.onFragLoaded=function(t,C){var w=C.frag,s=C.payload,L=this.initPTS,O=this.unparsedVttFrags;if(w.type===n.PlaylistLevelType.SUBTITLE)if(s.byteLength){if(!Object(P.isFiniteNumber)(L[w.cc])){O.push(C),L.length&&this.hls.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Missing initial subtitle PTS")});return}var x=w.decryptdata;if(x==null||x.key==null||x.method!=="AES-128"){var b=this.tracks[w.level],y=this.vttCCs;y[w.cc]||(y[w.cc]={start:w.start,prevCC:this.prevCC,new:!0},this.prevCC=w.cc),b&&b.textCodec===i.IMSC1_CODEC?this._parseIMSC1(w,s):this._parseVTTs(w,s,y)}}else this.hls.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,C){var w=this,s=this.hls;Object(i.parseIMSC1)(C,this.initPTS[t.cc],this.timescale[t.cc],function(L){w._appendCues(L,t.level),s.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(L){u.logger.log("Failed to parse IMSC1: "+L),s.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:L})})},a._parseVTTs=function(t,C,w){var s=this,L=this.hls;Object(c.parseWebVTT)(C,this.initPTS[t.cc],this.timescale[t.cc],w,t.cc,t.start,function(O){s._appendCues(O,t.level),L.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){s._fallbackToIMSC1(t,C),u.logger.log("Failed to parse VTT cue: "+O),L.trigger(d.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},a._fallbackToIMSC1=function(t,C){var w=this,s=this.tracks[t.level];s.textCodec||Object(i.parseIMSC1)(C,this.initPTS[t.cc],this.timescale[t.cc],function(){s.textCodec=i.IMSC1_CODEC,w._parseIMSC1(t,C)},function(){s.textCodec="wvtt"})},a._appendCues=function(t,C){var w=this.hls;if(this.config.renderTextTracksNatively){var s=this.textTracks[C];if(s.mode==="disabled")return;t.forEach(function(x){return Object(o.addCueToTrack)(s,x)})}else{var L=this.tracks[C],O=L.default?"default":"subtitles"+C;w.trigger(d.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},a.onFragDecrypted=function(t,C){var w=C.frag;if(w.type===n.PlaylistLevelType.SUBTITLE){if(!Object(P.isFiniteNumber)(this.initPTS[w.cc])){this.unparsedVttFrags.push(C);return}this.onFragLoaded(d.Events.FRAG_LOADED,C)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,C){var w=this.cea608Parser1,s=this.cea608Parser2;if(!this.enabled||!(w&&s))return;for(var L=0;L<C.samples.length;L++){var O=C.samples[L].bytes;if(O){var x=this.extractCea608Data(O);w.addData(C.samples[L].pts,x[0]),s.addData(C.samples[L].pts,x[1])}}},a.onBufferFlushing=function(t,C){var w=C.startOffset,s=C.endOffset,L=C.endOffsetSubtitles,O=C.type,x=this.media;if(!x||x.currentTime<s)return;if(!O||O==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(T){return Object(o.removeCuesInRange)(b[T],w,s)})}if(this.config.renderTextTracksNatively&&(w===0&&L!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(T){return Object(o.removeCuesInRange)(y[T],w,L)})}},a.extractCea608Data=function(t){for(var C=t[0]&31,w=2,s=[[],[]],L=0;L<C;L++){var O=t[w++],x=127&t[w++],b=127&t[w++],y=(4&O)!==0,T=3&O;if(x===0&&b===0)continue;y&&((T===0||T===1)&&(s[T].push(x),s[T].push(b)))}return s},E}();function h(E,a){return E&&E.label===a.name&&!(E.textTrack1||E.textTrack2)}function v(E,a,l,t){return Math.min(a,t)-Math.max(E,l)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function d(_,c){this.subtle=void 0,this.aesIV=void 0,this.subtle=_,this.aesIV=c}var f=d.prototype;return f.decrypt=function(c,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,c)},d}()},"./src/crypt/aes-decryptor.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"removePadding",function(){return d}),S.d(m,"default",function(){return f});var P=S("./src/utils/typed-array.ts");function d(_){var c=_.byteLength,o=c&&new DataView(_.buffer).getUint8(c-1);return o?Object(P.sliceUint8)(_,0,c-o):_}var f=function(){function _(){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 c=_.prototype;return c.uint8ArrayToUint32Array_=function(i){for(var n=new DataView(i),u=new Uint32Array(4),p=0;p<4;p++)u[p]=n.getUint32(p*4);return u},c.initTable=function(){var i=this.sBox,n=this.invSBox,u=this.subMix,p=u[0],h=u[1],v=u[2],g=u[3],E=this.invSubMix,a=E[0],l=E[1],t=E[2],C=E[3],w=new Uint32Array(256),s=0,L=0,O=0;for(O=0;O<256;O++)O<128?w[O]=O<<1:w[O]=O<<1^283;for(O=0;O<256;O++){var x=L^L<<1^L<<2^L<<3^L<<4;x=x>>>8^x&255^99,i[s]=x,n[x]=s;var b=w[s],y=w[b],T=w[y],k=w[x]*257^x*16843008;p[s]=k<<24|k>>>8,h[s]=k<<16|k>>>16,v[s]=k<<8|k>>>24,g[s]=k,k=T*16843009^y*65537^b*257^s*16843008,a[x]=k<<24|k>>>8,l[x]=k<<16|k>>>16,t[x]=k<<8|k>>>24,C[x]=k,s?(s=b^w[w[w[T^b]]],L^=w[w[L]]):s=L=1}},c.expandKey=function(i){for(var n=this.uint8ArrayToUint32Array_(i),u=!0,p=0;p<n.length&&u;)u=n[p]===this.key[p],p++;if(u)return;this.key=n;var h=this.keySize=n.length;if(h!==4&&h!==6&&h!==8)throw new Error("Invalid aes key size="+h);var v=this.ksRows=(h+6+1)*4,g,E,a=this.keySchedule=new Uint32Array(v),l=this.invKeySchedule=new Uint32Array(v),t=this.sBox,C=this.rcon,w=this.invSubMix,s=w[0],L=w[1],O=w[2],x=w[3],b,y;for(g=0;g<v;g++){if(g<h){b=a[g]=n[g];continue}y=b,g%h===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^=C[g/h|0]<<24):h>6&&g%h===4&&(y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255]),a[g]=b=(a[g-h]^y)>>>0}for(E=0;E<v;E++)g=v-E,E&3?y=a[g]:y=a[g-4],E<4||g<=4?l[E]=y:l[E]=s[t[y>>>24]]^L[t[y>>>16&255]]^O[t[y>>>8&255]]^x[t[y&255]],l[E]=l[E]>>>0},c.networkToHostOrderSwap=function(i){return i<<24|(i&65280)<<8|(i&16711680)>>8|i>>>24},c.decrypt=function(i,n,u){for(var p=this.keySize+6,h=this.invKeySchedule,v=this.invSBox,g=this.invSubMix,E=g[0],a=g[1],l=g[2],t=g[3],C=this.uint8ArrayToUint32Array_(u),w=C[0],s=C[1],L=C[2],O=C[3],x=new Int32Array(i),b=new Int32Array(x.length),y,T,k,N,I,W,K,U,z,B,H,G,ee,ie,ue=this.networkToHostOrderSwap;n<x.length;){for(z=ue(x[n]),B=ue(x[n+1]),H=ue(x[n+2]),G=ue(x[n+3]),I=z^h[0],W=G^h[1],K=H^h[2],U=B^h[3],ee=4,ie=1;ie<p;ie++)y=E[I>>>24]^a[W>>16&255]^l[K>>8&255]^t[U&255]^h[ee],T=E[W>>>24]^a[K>>16&255]^l[U>>8&255]^t[I&255]^h[ee+1],k=E[K>>>24]^a[U>>16&255]^l[I>>8&255]^t[W&255]^h[ee+2],N=E[U>>>24]^a[I>>16&255]^l[W>>8&255]^t[K&255]^h[ee+3],I=y,W=T,K=k,U=N,ee=ee+4;y=v[I>>>24]<<24^v[W>>16&255]<<16^v[K>>8&255]<<8^v[U&255]^h[ee],T=v[W>>>24]<<24^v[K>>16&255]<<16^v[U>>8&255]<<8^v[I&255]^h[ee+1],k=v[K>>>24]<<24^v[U>>16&255]<<16^v[I>>8&255]<<8^v[W&255]^h[ee+2],N=v[U>>>24]<<24^v[I>>16&255]<<16^v[W>>8&255]<<8^v[K&255]^h[ee+3],b[n]=ue(y^w),b[n+1]=ue(N^s),b[n+2]=ue(k^L),b[n+3]=ue(T^O),w=z,s=B,L=H,O=G,n=n+4}return b.buffer},_}()},"./src/crypt/decrypter.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return n});var P=S("./src/crypt/aes-crypto.ts"),d=S("./src/crypt/fast-aes-key.ts"),f=S("./src/crypt/aes-decryptor.ts"),_=S("./src/utils/logger.ts"),c=S("./src/utils/mp4-tools.ts"),o=S("./src/utils/typed-array.ts"),i=16,n=function(){function u(h,v,g){var E=g===void 0?{}:g,a=E.removePKCS7Padding,l=a===void 0?!0:a;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=h,this.config=v,this.removePKCS7Padding=l,l)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(C){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=u.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var v=this.currentResult;if(!v){this.reset();return}var g=new Uint8Array(v);return this.reset(),this.removePKCS7Padding?Object(f.removePadding)(g):g},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(v,g,E,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(v),g,E);var l=this.flush();l&&a(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(v),g,E).then(a)},p.softwareDecrypt=function(v,g,E){var a=this.currentIV,l=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(v=Object(c.appendUint8Array)(t,v),this.remainderData=null);var C=this.getValidChunk(v);if(!C.length)return null;a&&(E=a);var w=this.softwareDecrypter;w||(w=this.softwareDecrypter=new f.default),w.expandKey(g);var s=l;return this.currentResult=w.decrypt(C.buffer,0,E),this.currentIV=Object(o.sliceUint8)(C,-16).buffer,s||null},p.webCryptoDecrypt=function(v,g,E){var a=this,l=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new d.default(l,g)),this.fastAesKey.expandKey().then(function(t){if(!l)return Promise.reject(new Error("web crypto not initialized"));var C=new P.default(l,E);return C.decrypt(v.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,v,g,E)})},p.onWebCryptoError=function(v,g,E,a){return _.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",v),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,E,a)},p.getValidChunk=function(v){var g=v,E=v.length-v.length%i;return E!==v.length&&(g=Object(o.sliceUint8)(v,0,E),this.remainderData=Object(o.sliceUint8)(v,E)),g},p.logOnce=function(v){if(!this.logEnabled)return;_.logger.log("[decrypter.ts]: "+v),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function d(_,c){this.subtle=void 0,this.key=void 0,this.subtle=_,this.key=c}var f=d.prototype;return f.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},d}()},"./src/demux/aacdemuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/demux/base-audio-demuxer.ts"),d=S("./src/demux/adts.ts"),f=S("./src/utils/logger.ts"),_=S("./src/demux/id3.ts");function c(n,u){n.prototype=Object.create(u.prototype),n.prototype.constructor=n,o(n,u)}function o(n,u){return o=Object.setPrototypeOf||function(h,v){return h.__proto__=v,h},o(n,u)}var i=function(n){c(u,n);function u(h,v){var g;return g=n.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=h,g.config=v,g}var p=u.prototype;return p.resetInitSegment=function(v,g,E){n.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}},u.probe=function(v){if(!v)return!1;for(var g=_.getID3Data(v,0)||[],E=g.length,a=v.length;E<a;E++)if(d.probe(v,E))return f.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(v,g){return d.canParse(v,g)},p.appendFrame=function(v,g,E){d.initTrackConfig(v,this.observer,g,E,v.manifestCodec);var a=d.appendFrame(v,g,E,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},u}(P.default);i.minProbeByteLength=9,m.default=i},"./src/demux/adts.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"getAudioConfig",function(){return _}),S.d(m,"isHeaderPattern",function(){return c}),S.d(m,"getHeaderLength",function(){return o}),S.d(m,"getFullFrameLength",function(){return i}),S.d(m,"canGetFrameLength",function(){return n}),S.d(m,"isHeader",function(){return u}),S.d(m,"canParse",function(){return p}),S.d(m,"probe",function(){return h}),S.d(m,"initTrackConfig",function(){return v}),S.d(m,"getFrameDuration",function(){return g}),S.d(m,"parseFrameHeader",function(){return E}),S.d(m,"appendFrame",function(){return a});var P=S("./src/utils/logger.ts"),d=S("./src/errors.ts"),f=S("./src/events.ts");function _(l,t,C,w){var s,L,O,x,b=navigator.userAgent.toLowerCase(),y=w,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((t[C+2]&192)>>>6)+1;var k=(t[C+2]&60)>>>2;if(k>T.length-1){l.trigger(f.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return O=(t[C+2]&1)<<2,O|=(t[C+3]&192)>>>6,P.logger.log("manifest codec:"+w+", ADTS type:"+s+", samplingIndex:"+k),/firefox/i.test(b)?k>=6?(s=5,x=new Array(4),L=k-3):(s=2,x=new Array(2),L=k):b.indexOf("android")!==-1?(s=2,x=new Array(2),L=k):(s=5,x=new Array(4),w&&(w.indexOf("mp4a.40.29")!==-1||w.indexOf("mp4a.40.5")!==-1)||!w&&k>=6?L=k-3:((w&&w.indexOf("mp4a.40.2")!==-1&&(k>=6&&O===1||/vivaldi/i.test(b))||!w&&O===1)&&(s=2,x=new Array(2)),L=k)),x[0]=s<<3,x[0]|=(k&14)>>1,x[1]|=(k&1)<<7,x[1]|=O<<3,s===5&&(x[1]|=(L&14)>>1,x[2]=(L&1)<<7,x[2]|=2<<2,x[3]=0),{config:x,samplerate:T[k],channelCount:O,codec:"mp4a.40."+s,manifestCodec:y}}function c(l,t){return l[t]===255&&(l[t+1]&246)===240}function o(l,t){return l[t+1]&1?7:9}function i(l,t){return(l[t+3]&3)<<11|l[t+4]<<3|(l[t+5]&224)>>>5}function n(l,t){return t+5<l.length}function u(l,t){return t+1<l.length&&c(l,t)}function p(l,t){return n(l,t)&&c(l,t)&&i(l,t)<=l.length-t}function h(l,t){if(u(l,t)){var C=o(l,t);if(t+C>=l.length)return!1;var w=i(l,t);if(w<=C)return!1;var s=t+w;return s===l.length||u(l,s)}return!1}function v(l,t,C,w,s){if(!l.samplerate){var L=_(t,C,w,s);if(!L)return;l.config=L.config,l.samplerate=L.samplerate,l.channelCount=L.channelCount,l.codec=L.codec,l.manifestCodec=L.manifestCodec,P.logger.log("parsed codec:"+l.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function g(l){return 1024*9e4/l}function E(l,t,C,w,s){var L=o(l,t),O=i(l,t);if(O-=L,O>0){var x=C+w*s;return{headerLength:L,frameLength:O,stamp:x}}}function a(l,t,C,w,s){var L=g(l.samplerate),O=E(t,C,w,s,L);if(O){var x=O.frameLength,b=O.headerLength,y=O.stamp,T=b+x,k=Math.max(0,C+T-t.length),N;k?(N=new Uint8Array(T-b),N.set(t.subarray(C+b,t.length),0)):N=t.subarray(C+b,C+T);var I={unit:N,pts:y};return k||l.samples.push(I),{sample:I,length:T,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"initPTSFn",function(){return i});var P=S("./src/polyfills/number.ts"),d=S("./src/demux/id3.ts"),f=S("./src/demux/dummy-demuxed-track.ts"),_=S("./src/utils/mp4-tools.ts"),c=S("./src/utils/typed-array.ts"),o=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=n.prototype;return u.resetInitSegment=function(h,v,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(h,v){return!1},u.appendFrame=function(h,v,g){},u.demux=function(h,v){this.cachedData&&(h=Object(_.appendUint8Array)(this.cachedData,h),this.cachedData=null);var g=d.getID3Data(h,0),E=g?g.length:0,a,l,t=this._audioTrack,C=this._id3Track,w=g?d.getTimeStamp(g):void 0,s=h.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=i(w,v)),g&&g.length>0&&C.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),l=this.initPTS;E<s;){if(this.canParse(h,E)){var L=this.appendFrame(t,h,E);L?(this.frameIndex++,l=L.sample.pts,E+=L.length,a=E):E=s}else d.canParse(h,E)?(g=d.getID3Data(h,E),C.samples.push({pts:l,dts:l,data:g}),E+=g.length,a=E):E++;if(E===s&&a!==s){var O=Object(c.sliceUint8)(h,a);this.cachedData?this.cachedData=Object(_.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(f.dummyTrack)(),id3Track:C,textTrack:Object(f.dummyTrack)()}},u.demuxSampleAes=function(h,v,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(h){var v=this.cachedData;return v&&(this.cachedData=null,this.demux(v,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(f.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(f.dummyTrack)()}},u.destroy=function(){},n}(),i=function(u,p){return Object(P.isFiniteNumber)(u)?u*90:p*9e4};m.default=o},"./src/demux/chunk-cache.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function f(){this.chunks=[],this.dataLength=0}var _=f.prototype;return _.push=function(o){this.chunks.push(o),this.dataLength+=o.length},_.flush=function(){var o=this.chunks,i=this.dataLength,n;if(o.length)o.length===1?n=o[0]:n=d(o,i);else return new Uint8Array(0);return this.reset(),n},_.reset=function(){this.chunks.length=0,this.dataLength=0},f}();function d(f,_){for(var c=new Uint8Array(_),o=0,i=0;i<f.length;i++){var n=f[i];c.set(n,o),o+=n.length}return c}},"./src/demux/dummy-demuxed-track.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"dummyTrack",function(){return P});function P(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/logger.ts"),d=function(){function f(c){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=c,this.bytesAvailable=c.byteLength,this.word=0,this.bitsAvailable=0}var _=f.prototype;return _.loadWord=function(){var o=this.data,i=this.bytesAvailable,n=o.byteLength-i,u=new Uint8Array(4),p=Math.min(4,i);if(p===0)throw new Error("no bytes available");u.set(o.subarray(n,n+p)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},_.skipBits=function(o){var i;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,i=o>>3,o-=i>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},_.readBits=function(o){var i=Math.min(this.bitsAvailable,o),n=this.word>>>32-i;return o>32&&P.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),i=o-i,i>0&&this.bitsAvailable?n<<i|this.readBits(i):n},_.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},_.skipUEG=function(){this.skipBits(1+this.skipLZ())},_.skipEG=function(){this.skipBits(1+this.skipLZ())},_.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},_.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>1)},_.readBoolean=function(){return this.readBits(1)===1},_.readUByte=function(){return this.readBits(8)},_.readUShort=function(){return this.readBits(16)},_.readUInt=function(){return this.readBits(32)},_.skipScalingList=function(o){for(var i=8,n=8,u,p=0;p<o;p++)n!==0&&(u=this.readEG(),n=(i+u+256)%256),i=n===0?i:n},_.readSPS=function(){var o=0,i=0,n=0,u=0,p,h,v,g=this.readUByte.bind(this),E=this.readBits.bind(this),a=this.readUEG.bind(this),l=this.readBoolean.bind(this),t=this.skipBits.bind(this),C=this.skipEG.bind(this),w=this.skipUEG.bind(this),s=this.skipScalingList.bind(this);g();var L=g();if(E(5),t(3),g(),w(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var O=a();if(O===3&&t(1),w(),w(),t(1),l())for(h=O!==3?8:12,v=0;v<h;v++)l()&&(v<6?s(16):s(64))}w();var x=a();if(x===0)a();else if(x===1)for(t(1),C(),C(),p=a(),v=0;v<p;v++)C();w(),t(1);var b=a(),y=a(),T=E(1);T===0&&t(1),t(1),l()&&(o=a(),i=a(),n=a(),u=a());var k=[1,1];if(l()&&l()){var N=g();switch(N){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:{k=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((b+1)*16-o*2-i*2),height:(2-T)*(y+1)*16-(T?2:4)*(n+u),pixelRatio:k}},_.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},f}();m.default=d},"./src/demux/id3.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isHeader",function(){return P}),S.d(m,"isFooter",function(){return d}),S.d(m,"getID3Data",function(){return f}),S.d(m,"canParse",function(){return c}),S.d(m,"getTimeStamp",function(){return o}),S.d(m,"isTimeStampFrame",function(){return i}),S.d(m,"getID3Frames",function(){return u}),S.d(m,"decodeFrame",function(){return p}),S.d(m,"utf8ArrayToStr",function(){return a}),S.d(m,"testables",function(){return l});var P=function(s,L){return L+10<=s.length&&(s[L]===73&&s[L+1]===68&&s[L+2]===51&&(s[L+3]<255&&s[L+4]<255&&(s[L+6]<128&&s[L+7]<128&&s[L+8]<128&&s[L+9]<128)))},d=function(s,L){return L+10<=s.length&&(s[L]===51&&s[L+1]===68&&s[L+2]===73&&(s[L+3]<255&&s[L+4]<255&&(s[L+6]<128&&s[L+7]<128&&s[L+8]<128&&s[L+9]<128)))},f=function(s,L){for(var O=L,x=0;P(s,L);){x+=10;var b=_(s,L+6);x+=b,d(s,L+10)&&(x+=10),L+=x}return x>0?s.subarray(O,O+x):void 0},_=function(s,L){var O=0;return O=(s[L]&127)<<21,O|=(s[L+1]&127)<<14,O|=(s[L+2]&127)<<7,O|=s[L+3]&127,O},c=function(s,L){return P(s,L)&&_(s,L+6)+10<=s.length-L},o=function(s){for(var L=u(s),O=0;O<L.length;O++){var x=L[O];if(i(x))return E(x)}return},i=function(s){return s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp"},n=function(s){var L=String.fromCharCode(s[0],s[1],s[2],s[3]),O=_(s,4),x=10;return{type:L,size:O,data:s.subarray(x,x+O)}},u=function(s){for(var L=0,O=[];P(s,L);){var x=_(s,L+6);L+=10;for(var b=L+x;L+8<b;){var y=n(s.subarray(L)),T=p(y);T&&O.push(T),L+=y.size+10}d(s,L)&&(L+=10)}return O},p=function(s){return s.type==="PRIV"?h(s):s.type[0]==="W"?g(s):v(s)},h=function(s){if(s.size<2)return;var L=a(s.data,!0),O=new Uint8Array(s.data.subarray(L.length+1));return{key:s.type,info:L,data:O.buffer}},v=function(s){if(s.size<2)return;if(s.type==="TXXX"){var L=1,O=a(s.data.subarray(L),!0);L+=O.length+1;var x=a(s.data.subarray(L));return{key:s.type,info:O,data:x}}var b=a(s.data.subarray(1));return{key:s.type,data:b}},g=function(s){if(s.type==="WXXX"){if(s.size<2)return;var L=1,O=a(s.data.subarray(L),!0);L+=O.length+1;var x=a(s.data.subarray(L));return{key:s.type,info:O,data:x}}var b=a(s.data);return{key:s.type,data:b}},E=function(s){if(s.data.byteLength===8){var L=new Uint8Array(s.data),O=L[3]&1,x=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return x/=45,O&&(x+=4772185884e-2),Math.round(x)}return},a=function(s,L){L===void 0&&(L=!1);var O=C();if(O){var x=O.decode(s);if(L){var b=x.indexOf("\0");return b!==-1?x.substring(0,b):x}return x.replace(/\0/g,"")}for(var y=s.length,T,k,N,I="",W=0;W<y;){if(T=s[W++],T===0&&L)return I;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:I+=String.fromCharCode(T);break;case 12:case 13:k=s[W++],I+=String.fromCharCode((T&31)<<6|k&63);break;case 14:k=s[W++],N=s[W++],I+=String.fromCharCode((T&15)<<12|(k&63)<<6|(N&63)<<0);break;default:}}return I},l={decodeTextFrame:v},t;function C(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/demux/base-audio-demuxer.ts"),d=S("./src/demux/id3.ts"),f=S("./src/utils/logger.ts"),_=S("./src/demux/mpegaudio.ts");function c(n,u){n.prototype=Object.create(u.prototype),n.prototype.constructor=n,o(n,u)}function o(n,u){return o=Object.setPrototypeOf||function(h,v){return h.__proto__=v,h},o(n,u)}var i=function(n){c(u,n);function u(){return n.apply(this,arguments)||this}var p=u.prototype;return p.resetInitSegment=function(v,g,E){n.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}},u.probe=function(v){if(!v)return!1;for(var g=d.getID3Data(v,0)||[],E=g.length,a=v.length;E<a;E++)if(_.probe(v,E))return f.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(v,g){return _.canParse(v,g)},p.appendFrame=function(v,g,E){return this.initPTS===null?void 0:_.appendFrame(v,g,E,this.initPTS,this.frameIndex)},u}(P.default);i.minProbeByteLength=4,m.default=i},"./src/demux/mp4demuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/mp4-tools.ts"),d=S("./src/demux/dummy-demuxed-track.ts"),f=function(){function _(o,i){this.remainderData=null,this.config=void 0,this.config=i}var c=_.prototype;return c.resetTimeStamp=function(){},c.resetInitSegment=function(){},c.resetContiguity=function(){},_.probe=function(i){return Object(P.findBox)({data:i,start:0,end:Math.min(i.length,16384)},["moof"]).length>0},c.demux=function(i){var n=i,u=Object(d.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(P.appendUint8Array)(this.remainderData,i));var p=Object(P.segmentValidRange)(n);this.remainderData=p.remainder,u.samples=p.valid||new Uint8Array}else u.samples=n;return{audioTrack:Object(d.dummyTrack)(),avcTrack:u,id3Track:Object(d.dummyTrack)(),textTrack:Object(d.dummyTrack)()}},c.flush=function(){var i=Object(d.dummyTrack)();return i.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(d.dummyTrack)(),avcTrack:i,id3Track:Object(d.dummyTrack)(),textTrack:Object(d.dummyTrack)()}},c.demuxSampleAes=function(i,n,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},_}();f.minProbeByteLength=1024,m.default=f},"./src/demux/mpegaudio.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"appendFrame",function(){return o}),S.d(m,"parseHeader",function(){return i}),S.d(m,"isHeaderPattern",function(){return n}),S.d(m,"isHeader",function(){return u}),S.d(m,"canParse",function(){return p}),S.d(m,"probe",function(){return h});var P=null,d=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],f=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],c=[0,1,1,4];function o(v,g,E,a,l){if(E+24>g.length)return;var t=i(g,E);if(t&&E+t.frameLength<=g.length){var C=t.samplesPerFrame*9e4/t.sampleRate,w=a+l*C,s={unit:g.subarray(E,E+t.frameLength),pts:w,dts:w};return v.config=[],v.channelCount=t.channelCount,v.samplerate=t.sampleRate,v.samples.push(s),{sample:s,length:t.frameLength,missing:0}}}function i(v,g){var E=v[g+1]>>3&3,a=v[g+1]>>1&3,l=v[g+2]>>4&15,t=v[g+2]>>2&3;if(E!==1&&l!==0&&l!==15&&t!==3){var C=v[g+2]>>1&1,w=v[g+3]>>6,s=E===3?3-a:a===3?3:4,L=d[s*14+l-1]*1e3,O=E===3?0:E===2?1:2,x=f[O*3+t],b=w===3?1:2,y=_[E][a],T=c[a],k=y*8*T,N=Math.floor(y*L/x+C)*T;if(P===null){var I=navigator.userAgent||"",W=I.match(/Chrome\/(\d+)/i);P=W?parseInt(W[1]):0}var K=!!P&&P<=87;return K&&a===2&&L>=224e3&&w===0&&(v[g+3]=v[g+3]|128),{sampleRate:x,channelCount:b,frameLength:N,samplesPerFrame:k}}}function n(v,g){return v[g]===255&&(v[g+1]&224)===224&&(v[g+1]&6)!==0}function u(v,g){return g+1<v.length&&n(v,g)}function p(v,g){var E=4;return n(v,g)&&E<=v.length-g}function h(v,g){if(g+1<v.length&&n(v,g)){var E=4,a=i(v,g),l=E;a!=null&&a.frameLength&&(l=a.frameLength);var t=g+l;return t===v.length||u(v,t)}return!1}},"./src/demux/sample-aes.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/crypt/decrypter.ts"),d=S("./src/demux/tsdemuxer.ts"),f=function(){function _(o,i,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new P.default(o,i,{removePKCS7Padding:!1})}var c=_.prototype;return c.decryptBuffer=function(i,n){this.decrypter.decrypt(i,this.keyData.key.buffer,this.keyData.iv.buffer,n)},c.decryptAacSample=function(i,n,u,p){var h=i[n].unit,v=h.subarray(16,h.length-h.length%16),g=v.buffer.slice(v.byteOffset,v.byteOffset+v.length),E=this;this.decryptBuffer(g,function(a){var l=new Uint8Array(a);h.set(l,16),p||E.decryptAacSamples(i,n+1,u)})},c.decryptAacSamples=function(i,n,u){for(;;n++){if(n>=i.length){u();return}if(i[n].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(i,n,u,p),!p)return}},c.getAvcEncryptedData=function(i){for(var n=Math.floor((i.length-48)/160)*16+16,u=new Int8Array(n),p=0,h=32;h<=i.length-16;h+=160,p+=16)u.set(i.subarray(h,h+16),p);return u},c.getAvcDecryptedUnit=function(i,n){for(var u=new Uint8Array(n),p=0,h=32;h<=i.length-16;h+=160,p+=16)i.set(u.subarray(p,p+16),h);return i},c.decryptAvcSample=function(i,n,u,p,h,v){var g=Object(d.discardEPB)(h.data),E=this.getAvcEncryptedData(g),a=this;this.decryptBuffer(E.buffer,function(l){h.data=a.getAvcDecryptedUnit(g,l),v||a.decryptAvcSamples(i,n,u+1,p)})},c.decryptAvcSamples=function(i,n,u,p){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,u=0){if(n>=i.length){p();return}for(var h=i[n].units;!(u>=h.length);u++){var v=h[u];if(v.data.length<=48||v.type!==1&&v.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(i,n,u,p,v,g),!g)return}}},_}();m.default=f},"./src/demux/transmuxer-interface.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return h});var P=S("./node_modules/webworkify-webpack/index.js"),d=S.n(P),f=S("./src/events.ts"),_=S("./src/demux/transmuxer.ts"),c=S("./src/utils/logger.ts"),o=S("./src/errors.ts"),i=S("./src/utils/mediasource-helper.ts"),n=S("./node_modules/eventemitter3/index.js"),u=S.n(n),p=Object(i.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function v(E,a,l,t){var C=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=a,this.onTransmuxComplete=l,this.onFlush=t;var w=E.config,s=function(y,T){T=T||{},T.frag=C.frag,T.id=C.id,E.trigger(y,T)};this.observer=new n.EventEmitter,this.observer.on(f.Events.FRAG_DECRYPTED,s),this.observer.on(f.Events.ERROR,s);var L={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(w.enableWorker&&typeof Worker!="undefined"){c.logger.log("demuxing in webworker");var x;try{x=this.worker=P("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(b){E.trigger(f.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},x.postMessage({cmd:"init",typeSupported:L,vendor:O,id:a,config:JSON.stringify(w)})}catch(b){c.logger.warn("Error in worker:",b),c.logger.error("Error while initializing DemuxerWorker, fallback to inline"),x&&self.URL.revokeObjectURL(x.objectURL),this.transmuxer=new _.default(this.observer,L,w,O,a),this.worker=null}}else this.transmuxer=new _.default(this.observer,L,w,O,a)}var g=v.prototype;return g.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},g.push=function(a,l,t,C,w,s,L,O,x,b){var y=this;x.transmuxing.start=self.performance.now();var T=this.transmuxer,k=this.worker,N=s?s.start:w.start,I=w.decryptdata,W=this.frag,K=!(W&&w.cc===W.cc),U=!(W&&x.level===W.level),z=W?x.sn-W.sn:-1,B=this.part?x.part-this.part.index:1,H=!U&&(z===1||z===0&&B===1),G=self.performance.now();(U||z||w.stats.parsing.start===0)&&(w.stats.parsing.start=G),s&&(B||!H)&&(s.stats.parsing.start=G);var ee=new _.TransmuxState(K,H,O,U,N);if(!H||K){c.logger.log("[transmuxer-interface, "+w.type+"]: Starting new transmux session for sn: "+x.sn+" p: "+x.part+" level: "+x.level+" id: "+x.id+`
discontinuity: `+K+`
trackSwitch: `+U+`
contiguous: `+H+`
accurateTimeOffset: `+O+`
timeOffset: `+N);var ie=new _.TransmuxConfig(t,C,l,L,b);this.configureTransmuxer(ie)}if(this.frag=w,this.part=s,k)k.postMessage({cmd:"demux",data:a,decryptdata:I,chunkMeta:x,state:ee},a instanceof ArrayBuffer?[a]:[]);else if(T){var ue=T.push(a,I,x,ee);Object(_.isPromise)(ue)?ue.then(function(xe){y.handleTransmuxComplete(xe)}):this.handleTransmuxComplete(ue)}},g.flush=function(a){var l=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,C=this.worker;if(C)C.postMessage({cmd:"flush",chunkMeta:a});else if(t){var w=t.flush(a);Object(_.isPromise)(w)?w.then(function(s){l.handleFlushResult(s,a)}):this.handleFlushResult(w,a)}},g.handleFlushResult=function(a,l){var t=this;a.forEach(function(C){t.handleTransmuxComplete(C)}),this.onFlush(l)},g.onWorkerMessage=function(a){var l=a.data,t=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,t.trigger(l.event,l.data);break}}},g.configureTransmuxer=function(a){var l=this.worker,t=this.transmuxer;l?l.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},g.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},v}()},"./src/demux/transmuxer-worker.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return o});var P=S("./src/demux/transmuxer.ts"),d=S("./src/events.ts"),f=S("./src/utils/logger.ts"),_=S("./node_modules/eventemitter3/index.js"),c=S.n(_);function o(h){var v=new _.EventEmitter,g=function(a,l){h.postMessage({event:a,data:l})};v.on(d.Events.FRAG_DECRYPTED,g),v.on(d.Events.ERROR,g),h.addEventListener("message",function(E){var a=E.data;switch(a.cmd){case"init":{var l=JSON.parse(a.config);h.transmuxer=new P.default(v,a.typeSupported,l,a.vendor,a.id),Object(f.enableLogs)(l.debug),g("init",null);break}case"configure":{h.transmuxer.configure(a.config);break}case"demux":{var t=h.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(P.isPromise)(t)?t.then(function(s){i(h,s)}):i(h,t);break}case"flush":{var C=a.chunkMeta,w=h.transmuxer.flush(C);Object(P.isPromise)(w)?w.then(function(s){u(h,s,C)}):u(h,w,C);break}default:break}})}function i(h,v){if(p(v.remuxResult))return;var g=[],E=v.remuxResult,a=E.audio,l=E.video;a&&n(g,a),l&&n(g,l),h.postMessage({event:"transmuxComplete",data:v},g)}function n(h,v){v.data1&&h.push(v.data1.buffer),v.data2&&h.push(v.data2.buffer)}function u(h,v,g){v.forEach(function(E){i(h,E)}),h.postMessage({event:"flush",data:g})}function p(h){return!h.audio&&!h.video&&!h.text&&!h.id3&&!h.initSegment}},"./src/demux/transmuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return l}),S.d(m,"isPromise",function(){return w}),S.d(m,"TransmuxConfig",function(){return s}),S.d(m,"TransmuxState",function(){return L});var P=S("./src/events.ts"),d=S("./src/errors.ts"),f=S("./src/crypt/decrypter.ts"),_=S("./src/demux/aacdemuxer.ts"),c=S("./src/demux/mp4demuxer.ts"),o=S("./src/demux/tsdemuxer.ts"),i=S("./src/demux/mp3demuxer.ts"),n=S("./src/remux/mp4-remuxer.ts"),u=S("./src/remux/passthrough-remuxer.ts"),p=S("./src/demux/chunk-cache.ts"),h=S("./src/utils/mp4-tools.ts"),v=S("./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:o.default,remux:n.default},{demux:c.default,remux:u.default},{demux:_.default,remux:n.default},{demux:i.default,remux:n.default}],a=1024;E.forEach(function(O){var x=O.demux;a=Math.max(a,x.minProbeByteLength)});var l=function(){function O(b,y,T,k,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=b,this.typeSupported=y,this.config=T,this.vendor=k,this.id=N}var x=O.prototype;return x.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},x.push=function(y,T,k,N){var I=this,W=k.transmuxing;W.executeStart=g();var K=new Uint8Array(y),U=this.cache,z=this.config,B=this.currentTransmuxState,H=this.transmuxConfig;N&&(this.currentTransmuxState=N);var G=t(K,T);if(G&&G.method==="AES-128"){var ee=this.getDecrypter();if(z.enableSoftwareAES){var ie=ee.softwareDecrypt(K,G.key.buffer,G.iv.buffer);if(!ie)return W.executeEnd=g(),C(k);K=new Uint8Array(ie)}else return this.decryptionPromise=ee.webCryptoDecrypt(K,G.key.buffer,G.iv.buffer).then(function(J){var X=I.push(J,null,k);return I.decryptionPromise=null,X}),this.decryptionPromise}var ue=N||B,xe=ue.contiguous,Te=ue.discontinuity,se=ue.trackSwitch,ve=ue.accurateTimeOffset,de=ue.timeOffset,ne=H.audioCodec,ae=H.videoCodec,Z=H.defaultInitPts,le=H.duration,Q=H.initSegmentData;if((Te||se)&&this.resetInitSegment(Q,ne,ae,le),Te&&this.resetInitialTimestamp(Z),xe||this.resetContiguity(),this.needsProbing(K,Te,se)){if(U.dataLength){var q=U.flush();K=Object(h.appendUint8Array)(q,K)}this.configureTransmuxer(K,H)}var be=this.transmux(K,G,de,ve,k),te=this.currentTransmuxState;return te.contiguous=!0,te.discontinuity=!1,te.trackSwitch=!1,W.executeEnd=g(),be},x.flush=function(y){var T=this,k=y.transmuxing;k.executeStart=g();var N=this.decrypter,I=this.cache,W=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return T.flush(y)});var U=[],z=W.timeOffset;if(N){var B=N.flush();B&&U.push(this.push(B,null,y))}var H=I.dataLength;I.reset();var G=this.demuxer,ee=this.remuxer;if(!G||!ee)return H>=a&&this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=g(),[C(y)];var ie=G.flush(z);return w(ie)?ie.then(function(ue){return T.flushRemux(U,ue,y),U}):(this.flushRemux(U,ie,y),U)},x.flushRemux=function(y,T,k){var N=T.audioTrack,I=T.avcTrack,W=T.id3Track,K=T.textTrack,U=this.currentTransmuxState,z=U.accurateTimeOffset,B=U.timeOffset;v.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var H=this.remuxer.remux(N,I,W,K,B,z,!0,this.id);y.push({remuxResult:H,chunkMeta:k}),k.transmuxing.executeEnd=g()},x.resetInitialTimestamp=function(y){var T=this.demuxer,k=this.remuxer;if(!T||!k)return;T.resetTimeStamp(y),k.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,k,N){var I=this.demuxer,W=this.remuxer;if(!I||!W)return;I.resetInitSegment(T,k,N),W.resetInitSegment(y,T,k)},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,k,N,I){var W;return T&&T.method==="SAMPLE-AES"?W=this.transmuxSampleAes(y,T,k,N,I):W=this.transmuxUnencrypted(y,k,N,I),W},x.transmuxUnencrypted=function(y,T,k,N){var I=this.demuxer.demux(y,T,!1,!this.config.progressive),W=I.audioTrack,K=I.avcTrack,U=I.id3Track,z=I.textTrack,B=this.remuxer.remux(W,K,U,z,T,k,!1,this.id);return{remuxResult:B,chunkMeta:N}},x.transmuxSampleAes=function(y,T,k,N,I){var W=this;return this.demuxer.demuxSampleAes(y,T,k).then(function(K){var U=W.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,k,N,!1,W.id);return{remuxResult:U,chunkMeta:I}})},x.configureTransmuxer=function(y,T){for(var k=this.config,N=this.observer,I=this.typeSupported,W=this.vendor,K=T.audioCodec,U=T.defaultInitPts,z=T.duration,B=T.initSegmentData,H=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:c.default,remux:u.default});var ue=this.demuxer,xe=this.remuxer,Te=G.remux,se=G.demux;(!xe||!(xe instanceof Te))&&(this.remuxer=new Te(N,k,I,W)),(!ue||!(ue instanceof se))&&(this.demuxer=new se(N,k,I),this.probe=se.probe),this.resetInitSegment(B,K,H,z),this.resetInitialTimestamp(U)},x.needsProbing=function(y,T,k){return!this.demuxer||!this.remuxer||T||k},x.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new f.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 C=function(x){return{remuxResult:{},chunkMeta:x}};function w(O){return"then"in O&&O.then instanceof Function}var s=function(x,b,y,T,k){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=k},L=function(x,b,y,T,k){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=k}},"./src/demux/tsdemuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"discardEPB",function(){return C});var P=S("./src/demux/adts.ts"),d=S("./src/demux/mpegaudio.ts"),f=S("./src/demux/exp-golomb.ts"),_=S("./src/demux/id3.ts"),c=S("./src/demux/sample-aes.ts"),o=S("./src/events.ts"),i=S("./src/utils/mp4-tools.ts"),n=S("./src/utils/logger.ts"),u=S("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},h=function(){function w(L,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=L,this.config=O,this.typeSupported=x}w.probe=function(O){var x=w.syncOffset(O);return x<0?!1:(x&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},w.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},w.createTrack=function(O,x){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:p[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?x:void 0}};var s=w.prototype;return s.resetInitSegment=function(O,x,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video",b),this._audioTrack=w.createTrack("audio",b),this._id3Track=w.createTrack("id3",b),this._txtTrack=w.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},s.resetTimeStamp=function(){},s.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},s.demux=function(O,x,b,y){b===void 0&&(b=!1),y===void 0&&(y=!1),b||(this.sampleAes=null);var T,k=this._avcTrack,N=this._audioTrack,I=this._id3Track,W=k.pid,K=k.pesData,U=N.pid,z=I.pid,B=N.pesData,H=I.pesData,G=!1,ee=this.pmtParsed,ie=this._pmtId,ue=O.length;if(this.remainderData&&(O=Object(i.appendUint8Array)(this.remainderData,O),ue=O.length,this.remainderData=null),ue<188&&!y)return this.remainderData=O,{audioTrack:N,avcTrack:k,id3Track:I,textTrack:this._txtTrack};var xe=Math.max(0,w.syncOffset(O));ue-=(ue+xe)%188,ue<O.byteLength&&!y&&(this.remainderData=new Uint8Array(O.buffer,ue,O.buffer.byteLength-ue));for(var Te=xe;Te<ue;Te+=188)if(O[Te]===71){var se=!!(O[Te+1]&64),ve=((O[Te+1]&31)<<8)+O[Te+2],de=(O[Te+3]&48)>>4,ne=void 0;if(de>1){if(ne=Te+5+O[Te+4],ne===Te+188)continue}else ne=Te+4;switch(ve){case W:se&&(K&&(T=a(K))&&this.parseAVCPES(T,!1),K={data:[],size:0}),K&&(K.data.push(O.subarray(ne,Te+188)),K.size+=Te+188-ne);break;case U:se&&(B&&(T=a(B))&&(N.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),B={data:[],size:0}),B&&(B.data.push(O.subarray(ne,Te+188)),B.size+=Te+188-ne);break;case z:se&&(H&&(T=a(H))&&this.parseID3PES(T),H={data:[],size:0}),H&&(H.data.push(O.subarray(ne,Te+188)),H.size+=Te+188-ne);break;case 0:se&&(ne+=O[ne]+1),ie=this._pmtId=g(O,ne);break;case ie:{se&&(ne+=O[ne]+1);var ae=E(O,ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);W=ae.avc,W>0&&(k.pid=W),U=ae.audio,U>0&&(N.pid=U,N.isAAC=ae.isAAC),z=ae.id3,z>0&&(I.pid=z),G&&!ee&&(n.logger.log("reparse from beginning"),G=!1,Te=xe-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=K,N.pesData=B,I.pesData=H;var Z={audioTrack:N,avcTrack:k,id3Track:I,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(Z),Z},s.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},s.extractRemainingSamples=function(O){var x=O.audioTrack,b=O.avcTrack,y=O.id3Track,T=b.pesData,k=x.pesData,N=y.pesData,I;T&&(I=a(T))?(this.parseAVCPES(I,!0),b.pesData=null):b.pesData=T,k&&(I=a(k))?(x.isAAC?this.parseAACPES(I):this.parseMPEGPES(I),x.pesData=null):(k!=null&&k.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),x.pesData=k),N&&(I=a(N))?(this.parseID3PES(I),y.pesData=null):y.pesData=N},s.demuxSampleAes=function(O,x,b){var y=this.demux(O,b,!0,!this.config.progressive),T=this.sampleAes=new c.default(this.observer,this.config,x);return this.decrypt(y,T)},s.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)})})},s.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},s.parseAVCPES=function(O,x){var b=this,y=this._avcTrack,T=this.parseAVCNALu(O.data),k=!1,N=this.avcSample,I,W=!1;O.data=null,N&&T.length&&!y.audFound&&(l(N,y),N=this.avcSample=v(!1,O.pts,O.dts,"")),T.forEach(function(K){switch(K.type){case 1:{I=!0,N||(N=b.avcSample=v(!0,O.pts,O.dts,"")),k&&(N.debug+="NDR "),N.frame=!0;var U=K.data;if(W&&U.length>4){var z=new f.default(U).readSliceType();(z===2||z===4||z===7||z===9)&&(N.key=!0)}break}case 5:I=!0,N||(N=b.avcSample=v(!0,O.pts,O.dts,"")),k&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{I=!0,k&&N&&(N.debug+="SEI ");var B=new f.default(C(K.data));B.readUByte();for(var H=0,G=0,ee=!1,ie=0;!ee&&B.bytesAvailable>1;){H=0;do ie=B.readUByte(),H+=ie;while(ie===255);G=0;do ie=B.readUByte(),G+=ie;while(ie===255);if(H===4&&B.bytesAvailable!==0){ee=!0;var ue=B.readUByte();if(ue===181){var xe=B.readUShort();if(xe===49){var Te=B.readUInt();if(Te===1195456820){var se=B.readUByte();if(se===3){for(var ve=B.readUByte(),de=B.readUByte(),ne=31&ve,ae=[ve,de],Z=0;Z<ne;Z++)ae.push(B.readUByte()),ae.push(B.readUByte()),ae.push(B.readUByte());t(b._txtTrack.samples,{type:3,pts:O.pts,bytes:ae})}}}}}else if(H===5&&B.bytesAvailable!==0){if(ee=!0,G>16){for(var le=[],Q=0;Q<16;Q++)le.push(B.readUByte().toString(16)),(Q===3||Q===5||Q===7||Q===9)&&le.push("-");for(var q=G-16,be=new Uint8Array(q),te=0;te<q;te++)be[te]=B.readUByte();t(b._txtTrack.samples,{pts:O.pts,payloadType:H,uuid:le.join(""),userData:Object(_.utf8ArrayToStr)(be),userDataBytes:be})}}else if(G<B.bytesAvailable)for(var J=0;J<G;J++)B.readUByte()}break}case 7:if(I=!0,W=!0,k&&N&&(N.debug+="SPS "),!y.sps){var X=new f.default(K.data),$=X.readSPS();y.width=$.width,y.height=$.height,y.pixelRatio=$.pixelRatio,y.sps=[K.data],y.duration=b._duration;for(var ge=K.data.subarray(1,4),fe="avc1.",_e=0;_e<3;_e++){var He=ge[_e].toString(16);He.length<2&&(He="0"+He),fe+=He}y.codec=fe}break;case 8:I=!0,k&&N&&(N.debug+="PPS "),y.pps||(y.pps=[K.data]);break;case 9:I=!1,y.audFound=!0,N&&l(N,y),N=b.avcSample=v(!1,O.pts,O.dts,k?"AUD ":"");break;case 12:I=!1;break;default:I=!1,N&&(N.debug+="unknown NAL "+K.type+" ");break}if(N&&I){var $e=N.units;$e.push(K)}}),x&&N&&(l(N,y),this.avcSample=null)},s.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},s.parseAVCNALu=function(O){var x=O.byteLength,b=this._avcTrack,y=b.naluState||0,T=y,k=[],N=0,I,W,K,U=-1,z=0;for(y===-1&&(U=0,z=O[0]&31,y=0,N=1);N<x;){if(I=O[N++],!y){y=I?0:1;continue}if(y===1){y=I?0:2;continue}if(!I)y=3;else if(I===1){if(U>=0){var B={data:O.subarray(U,N-y-1),type:z};k.push(B)}else{var H=this.getLastNalUnit();if(H&&(T&&N<=4-T&&(H.state&&(H.data=H.data.subarray(0,H.data.byteLength-T))),W=N-y-1,W>0)){var G=new Uint8Array(H.data.byteLength+W);G.set(H.data,0),G.set(O.subarray(0,W),H.data.byteLength),H.data=G,H.state=0}}N<x?(K=O[N]&31,U=N,z=K,y=0):y=-1}else y=0}if(U>=0&&y>=0){var ee={data:O.subarray(U,x),type:z,state:y};k.push(ee)}if(k.length===0){var ie=this.getLastNalUnit();if(ie){var ue=new Uint8Array(ie.data.byteLength+O.byteLength);ue.set(ie.data,0),ue.set(O,ie.data.byteLength),ie.data=ue}}return b.naluState=y,k},s.parseAACPES=function(O){var x=0,b=this._audioTrack,y=this.aacOverFlow,T=O.data;if(y){this.aacOverFlow=null;var k=y.sample.unit.byteLength,N=Math.min(y.missing,k),I=k-N;y.sample.unit.set(T.subarray(0,N),I),b.samples.push(y.sample),x=y.missing}var W,K;for(W=x,K=T.length;W<K-1&&!P.isHeader(T,W);W++);if(W!==x){var U,z;if(W<K-1?(U="AAC PES did not start with ADTS header,offset:"+W,z=!1):(U="no ADTS header found in AAC PES",z=!0),n.logger.warn("parsing error:"+U),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:U}),z)return}P.initTrackConfig(b,this.observer,T,W,this.audioCodec);var B;if(O.pts!==void 0)B=O.pts;else if(y){var H=P.getFrameDuration(b.samplerate);B=y.sample.pts+H}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;W<K;)if(P.isHeader(T,W)){if(W+5<K){var ee=P.appendFrame(b,T,W,B,G);if(ee)if(ee.missing)this.aacOverFlow=ee;else{W+=ee.length,G++;continue}}break}else W++},s.parseMPEGPES=function(O){var x=O.data,b=x.length,y=0,T=0,k=O.pts;if(k===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<b;)if(d.isHeader(x,T)){var N=d.appendFrame(this._audioTrack,x,T,k,y);if(N)T+=N.length,y++;else break}else T++},s.parseID3PES=function(O){if(O.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},w}();h.minProbeByteLength=188;function v(w,s,L,O){return{key:w,frame:!1,pts:s,dts:L,units:[],debug:O,length:0}}function g(w,s){return(w[s+10]&31)<<8|w[s+11]}function E(w,s,L,O){var x={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(w[s+1]&15)<<8|w[s+2],y=s+3+b-4,T=(w[s+10]&15)<<8|w[s+11];for(s+=12+T;s<y;){var k=(w[s+1]&31)<<8|w[s+2];switch(w[s]){case 207:if(!O){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:x.audio===-1&&(x.audio=k);break;case 21:x.id3===-1&&(x.id3=k);break;case 219:if(!O){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:x.avc===-1&&(x.avc=k);break;case 3:case 4:L?x.audio===-1&&(x.audio=k,x.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}s+=((w[s+3]&15)<<8|w[s+4])+5}return x}function a(w){var s=0,L,O,x,b,y,T=w.data;if(!w||w.size===0)return null;for(;T[0].length<19&&T.length>1;){var k=new Uint8Array(T[0].length+T[1].length);k.set(T[0]),k.set(T[1],T[0].length),T[0]=k,T.splice(1,1)}L=T[0];var N=(L[0]<<16)+(L[1]<<8)+L[2];if(N===1){if(O=(L[4]<<8)+L[5],O&&O>w.size-6)return null;var I=L[7];I&192&&(b=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,I&64?(y=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,b-y>60*9e4&&(n.logger.warn(Math.round((b-y)/9e4)+"s delta between PTS and DTS, align them"),b=y)):y=b),x=L[8];var W=x+9;if(w.size<=W)return null;w.size-=W;for(var K=new Uint8Array(w.size),U=0,z=T.length;U<z;U++){L=T[U];var B=L.byteLength;if(W)if(W>B){W-=B;continue}else L=L.subarray(W),B-=W,W=0;K.set(L,s),s+=B}return O&&(O-=x+3),{data:K,pts:b,dts:y,len:O}}return null}function l(w,s){if(w.units.length&&w.frame){if(w.pts===void 0){var L=s.samples,O=L.length;if(O){var x=L[O-1];w.pts=x.pts,w.dts=x.dts}else{s.dropped++;return}}s.samples.push(w)}w.debug.length&&n.logger.log(w.pts+"/"+w.dts+":"+w.debug)}function t(w,s){var L=w.length;if(L>0){if(s.pts>=w[L-1].pts)w.push(s);else for(var O=L-1;O>=0;O--)if(s.pts<w[O].pts){w.splice(O,0,s);break}}else w.push(s)}function C(w){for(var s=w.byteLength,L=[],O=1;O<s-2;)w[O]===0&&w[O+1]===0&&w[O+2]===3?(L.push(O+2),O+=2):O++;if(L.length===0)return w;var x=s-L.length,b=new Uint8Array(x),y=0;for(O=0;O<x;y++,O++)y===L[0]&&(y++,L.shift()),b[O]=w[y];return b}m.default=h},"./src/errors.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ErrorTypes",function(){return P}),S.d(m,"ErrorDetails",function(){return d});var P;(function(f){f.NETWORK_ERROR="networkError",f.MEDIA_ERROR="mediaError",f.KEY_SYSTEM_ERROR="keySystemError",f.MUX_ERROR="muxError",f.OTHER_ERROR="otherError"})(P||(P={}));var d;(function(f){f.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",f.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",f.KEY_SYSTEM_NO_SESSION="keySystemNoSession",f.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",f.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",f.MANIFEST_LOAD_ERROR="manifestLoadError",f.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",f.MANIFEST_PARSING_ERROR="manifestParsingError",f.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",f.LEVEL_EMPTY_ERROR="levelEmptyError",f.LEVEL_LOAD_ERROR="levelLoadError",f.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",f.LEVEL_SWITCH_ERROR="levelSwitchError",f.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",f.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",f.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",f.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",f.FRAG_LOAD_ERROR="fragLoadError",f.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",f.FRAG_DECRYPT_ERROR="fragDecryptError",f.FRAG_PARSING_ERROR="fragParsingError",f.REMUX_ALLOC_ERROR="remuxAllocError",f.KEY_LOAD_ERROR="keyLoadError",f.KEY_LOAD_TIMEOUT="keyLoadTimeOut",f.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",f.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",f.BUFFER_APPEND_ERROR="bufferAppendError",f.BUFFER_APPENDING_ERROR="bufferAppendingError",f.BUFFER_STALLED_ERROR="bufferStalledError",f.BUFFER_FULL_ERROR="bufferFullError",f.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",f.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",f.INTERNAL_EXCEPTION="internalException",f.INTERNAL_ABORTED="aborted",f.UNKNOWN="unknown"})(d||(d={}))},"./src/events.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"Events",function(){return P});var P;(function(d){d.MEDIA_ATTACHING="hlsMediaAttaching",d.MEDIA_ATTACHED="hlsMediaAttached",d.MEDIA_DETACHING="hlsMediaDetaching",d.MEDIA_DETACHED="hlsMediaDetached",d.BUFFER_RESET="hlsBufferReset",d.BUFFER_CODECS="hlsBufferCodecs",d.BUFFER_CREATED="hlsBufferCreated",d.BUFFER_APPENDING="hlsBufferAppending",d.BUFFER_APPENDED="hlsBufferAppended",d.BUFFER_EOS="hlsBufferEos",d.BUFFER_FLUSHING="hlsBufferFlushing",d.BUFFER_FLUSHED="hlsBufferFlushed",d.MANIFEST_LOADING="hlsManifestLoading",d.MANIFEST_LOADED="hlsManifestLoaded",d.MANIFEST_PARSED="hlsManifestParsed",d.LEVEL_SWITCHING="hlsLevelSwitching",d.LEVEL_SWITCHED="hlsLevelSwitched",d.LEVEL_LOADING="hlsLevelLoading",d.LEVEL_LOADED="hlsLevelLoaded",d.LEVEL_UPDATED="hlsLevelUpdated",d.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",d.LEVELS_UPDATED="hlsLevelsUpdated",d.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",d.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",d.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",d.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",d.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",d.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",d.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",d.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",d.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",d.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",d.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",d.CUES_PARSED="hlsCuesParsed",d.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",d.INIT_PTS_FOUND="hlsInitPtsFound",d.FRAG_LOADING="hlsFragLoading",d.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",d.FRAG_LOADED="hlsFragLoaded",d.FRAG_DECRYPTED="hlsFragDecrypted",d.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",d.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",d.FRAG_PARSING_METADATA="hlsFragParsingMetadata",d.FRAG_PARSED="hlsFragParsed",d.FRAG_BUFFERED="hlsFragBuffered",d.FRAG_CHANGED="hlsFragChanged",d.FPS_DROP="hlsFpsDrop",d.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",d.ERROR="hlsError",d.DESTROYING="hlsDestroying",d.KEY_LOADING="hlsKeyLoading",d.KEY_LOADED="hlsKeyLoaded",d.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",d.BACK_BUFFER_REACHED="hlsBackBufferReached"})(P||(P={}))},"./src/hls.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return w});var P=S("./node_modules/url-toolkit/src/url-toolkit.js"),d=S.n(P),f=S("./src/loader/playlist-loader.ts"),_=S("./src/loader/key-loader.ts"),c=S("./src/controller/id3-track-controller.ts"),o=S("./src/controller/latency-controller.ts"),i=S("./src/controller/level-controller.ts"),n=S("./src/controller/fragment-tracker.ts"),u=S("./src/controller/stream-controller.ts"),p=S("./src/is-supported.ts"),h=S("./src/utils/logger.ts"),v=S("./src/config.ts"),g=S("./node_modules/eventemitter3/index.js"),E=S.n(g),a=S("./src/events.ts"),l=S("./src/errors.ts");function t(s,L){for(var O=0;O<L.length;O++){var x=L[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(s,x.key,x)}}function C(s,L,O){return L&&t(s.prototype,L),O&&t(s,O),s}var w=function(){s.isSupported=function(){return Object(p.isSupported)()};function s(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new 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)(s.DefaultConfig,O);this.userConfig=O,Object(h.enableLogs)(x.debug),this._autoLevelCapping=-1,x.progressive&&Object(v.enableStreamingMode)(x);var b=x.abrController,y=x.bufferController,T=x.capLevelController,k=x.fpsController,N=this.abrController=new b(this),I=this.bufferController=new y(this),W=this.capLevelController=new T(this),K=new k(this),U=new f.default(this),z=new _.default(this),B=new c.default(this),H=this.levelController=new i.default(this),G=new n.FragmentTracker(this),ee=this.streamController=new u.default(this,G);W.setStreamController(ee),K.setStreamController(ee);var ie=[H,ee];this.networkControllers=ie;var ue=[U,z,N,I,W,K,B,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,ue),this.emeController=this.createController(x.emeController,null,ue),this.cmcdController=this.createController(x.cmcdController,null,ue),this.latencyController=this.createController(o.default,null,ue),this.coreComponents=ue}var L=s.prototype;return L.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},L.on=function(x,b,y){y===void 0&&(y=this),this._emitter.on(x,b,y)},L.once=function(x,b,y){y===void 0&&(y=this),this._emitter.once(x,b,y)},L.removeAllListeners=function(x){this._emitter.removeAllListeners(x)},L.off=function(x,b,y,T){y===void 0&&(y=this),this._emitter.off(x,b,y,T)},L.listeners=function(x){return this._emitter.listeners(x)},L.emit=function(x,b,y){return this._emitter.emit(x,b,y)},L.trigger=function(x,b){if(this.config.debug)return this.emit(x,x,b);try{return this.emit(x,x,b)}catch(y){h.logger.error("An internal error happened while handling event "+x+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(a.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:x,error:y})}return!1},L.listenerCount=function(x){return this._emitter.listenerCount(x)},L.destroy=function(){h.logger.log("destroy"),this.trigger(a.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},L.attachMedia=function(x){h.logger.log("attachMedia"),this._media=x,this.trigger(a.Events.MEDIA_ATTACHING,{media:x})},L.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(x){this.stopLoad();var b=this.media,y=this.url,T=this.url=P.buildAbsoluteURL(self.location.href,x,{alwaysNormalize:!0});h.logger.log("loadSource:"+T),b&&y&&y!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(a.Events.MANIFEST_LOADING,{url:x})},L.startLoad=function(x){x===void 0&&(x=-1),h.logger.log("startLoad("+x+")"),this.networkControllers.forEach(function(b){b.startLoad(x)})},L.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach(function(x){x.stopLoad()})},L.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){h.logger.log("recoverMediaError");var x=this._media;this.detachMedia(),x&&this.attachMedia(x)},L.removeLevel=function(x,b){b===void 0&&(b=0),this.levelController.removeLevel(x,b)},C(s,[{key:"levels",get:function(){var x=this.levelController.levels;return x||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(x){h.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){h.logger.log("set nextLevel:"+x),this.levelController.manualLevel=x,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(x){h.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){h.logger.log("set firstLevel:"+x),this.levelController.firstLevel=x}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(x){h.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&&(h.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 a.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return s.defaultConfig?s.defaultConfig:v.hlsDefaultConfig},set:function(x){s.defaultConfig=x}}]),s}();w.defaultConfig=void 0},"./src/is-supported.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isSupported",function(){return f}),S.d(m,"changeTypeSupported",function(){return _});var P=S("./src/utils/mediasource-helper.ts");function d(){return self.SourceBuffer||self.WebKitSourceBuffer}function f(){var c=Object(P.getMediaSource)();if(!c)return!1;var o=d(),i=c&&typeof c.isTypeSupported=="function"&&c.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!i&&!!n}function _(){var c,o=d();return typeof(o==null||((c=o.prototype)===null||c===void 0)?void 0:c.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return h}),S.d(m,"LoadError",function(){return g});var P=S("./src/polyfills/number.ts"),d=S("./src/errors.ts");function f(E,a){E.prototype=Object.create(a.prototype),E.prototype.constructor=E,n(E,a)}function _(E){var a=typeof Map=="function"?new Map:void 0;return _=function(t){if(t===null||!i(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(t))return a.get(t);a.set(t,C)}function C(){return c(t,arguments,u(this).constructor)}return C.prototype=Object.create(t.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),n(C,t)},_(E)}function c(E,a,l){return o()?c=Reflect.construct:c=function(C,w,s){var L=[null];L.push.apply(L,w);var O=Function.bind.apply(C,L),x=new O;return s&&n(x,s.prototype),x},c.apply(null,arguments)}function o(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(E){return!1}}function i(E){return Function.toString.call(E).indexOf("[native code]")!==-1}function n(E,a){return n=Object.setPrototypeOf||function(t,C){return t.__proto__=C,t},n(E,a)}function u(E){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},u(E)}var p=Math.pow(2,17),h=function(){function E(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var a=E.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,C){var w=this,s=t.url;if(!s)return Promise.reject(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(s?"part list":"url")));this.abort();var L=this.config,O=L.fLoader,x=L.loader;return new Promise(function(b,y){w.loader&&w.loader.destroy();var T=w.loader=t.loader=O?new O(L):new x(L),k=v(t),N={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};t.stats=T.stats,T.load(k,N,{onSuccess:function(W,K,U,z){w.resetLoader(t,T),b({frag:t,part:null,payload:W.data,networkDetails:z})},onError:function(W,K,U){w.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:W,networkDetails:U}))},onAbort:function(W,K,U){w.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:U}))},onTimeout:function(W,K,U){w.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:U}))},onProgress:function(W,K,U,z){C&&C({frag:t,part:null,payload:U,networkDetails:z})}})})},a.loadPart=function(t,C,w){var s=this;this.abort();var L=this.config,O=L.fLoader,x=L.loader;return new Promise(function(b,y){s.loader&&s.loader.destroy();var T=s.loader=t.loader=O?new O(L):new x(L),k=v(t,C),N={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:p};C.stats=T.stats,T.load(k,N,{onSuccess:function(W,K,U,z){s.resetLoader(t,T),s.updateStatsFromPart(t,C);var B={frag:t,part:C,payload:W.data,networkDetails:z};w(B),b(B)},onError:function(W,K,U){s.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:C,response:W,networkDetails:U}))},onAbort:function(W,K,U){t.stats.aborted=C.stats.aborted,s.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:C,networkDetails:U}))},onTimeout:function(W,K,U){s.resetLoader(t,T),y(new g({type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:C,networkDetails:U}))}})})},a.updateStatsFromPart=function(t,C){var w=t.stats,s=C.stats,L=s.total;if(w.loaded+=s.loaded,L){var O=Math.round(t.duration/C.duration),x=Math.min(Math.round(w.loaded/L),O),b=O-x,y=b*Math.round(w.loaded/x);w.total=w.loaded+y}else w.total=Math.max(w.loaded,w.total);var T=w.loading,k=s.loading;T.start?T.first+=k.first-k.start:(T.start=k.start,T.first=k.first),T.end=k.end},a.resetLoader=function(t,C){t.loader=null,this.loader===C&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),C.destroy()},E}();function v(E,a){a===void 0&&(a=null);var l=a||E,t={frag:E,part:a,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},C=l.byteRangeStartOffset,w=l.byteRangeEndOffset;return Object(P.isFiniteNumber)(C)&&Object(P.isFiniteNumber)(w)&&(t.rangeStart=C,t.rangeEnd=w),t}var g=function(E){f(a,E);function a(l){for(var t,C=arguments.length,w=new Array(C>1?C-1:0),s=1;s<C;s++)w[s-1]=arguments[s];return t=E.call.apply(E,[this].concat(w))||this,t.data=void 0,t.data=l,t}return a}(_(Error))},"./src/loader/fragment.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ElementaryStreamTypes",function(){return h}),S.d(m,"BaseSegment",function(){return v}),S.d(m,"Fragment",function(){return g}),S.d(m,"Part",function(){return E});var P=S("./src/polyfills/number.ts"),d=S("./node_modules/url-toolkit/src/url-toolkit.js"),f=S.n(d),_=S("./src/utils/logger.ts"),c=S("./src/loader/level-key.ts"),o=S("./src/loader/load-stats.ts");function i(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,n(a,l)}function n(a,l){return n=Object.setPrototypeOf||function(C,w){return C.__proto__=w,C},n(a,l)}function u(a,l){for(var t=0;t<l.length;t++){var C=l[t];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(a,C.key,C)}}function p(a,l,t){return l&&u(a.prototype,l),t&&u(a,t),a}var h;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(h||(h={}));var v=function(){function a(t){var C;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(C={},C[h.AUDIO]=null,C[h.VIDEO]=null,C[h.AUDIOVIDEO]=null,C),this.baseurl=t}var l=a.prototype;return l.setByteRange=function(C,w){var s=C.split("@",2),L=[];s.length===1?L[0]=w?w.byteRangeEndOffset:0:L[0]=parseInt(s[1]),L[1]=parseInt(s[0])+L[0],this._byteRange=L},p(a,[{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(d.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(C){this._url=C}}]),a}(),g=function(a){i(l,a);function l(C,w){var s;return s=a.call(this,w)||this,s._decryptdata=null,s.rawProgramDateTime=null,s.programDateTime=null,s.tagList=[],s.duration=0,s.sn=0,s.levelkey=void 0,s.type=void 0,s.loader=null,s.level=-1,s.cc=0,s.startPTS=void 0,s.endPTS=void 0,s.appendedPTS=void 0,s.startDTS=void 0,s.endDTS=void 0,s.start=0,s.deltaPTS=void 0,s.maxStartPTS=void 0,s.minEndPTS=void 0,s.stats=new o.LoadStats,s.urlId=0,s.data=void 0,s.bitrateTest=!1,s.title=null,s.initSegment=null,s.type=C,s}var t=l.prototype;return t.createInitializationVector=function(w){for(var s=new Uint8Array(16),L=12;L<16;L++)s[L]=w>>8*(15-L)&255;return s},t.setDecryptDataFromLevelKey=function(w,s){var L=w;return(w==null?void 0:w.method)==="AES-128"&&w.uri&&!w.iv&&(L=c.LevelKey.fromURI(w.uri),L.method=w.method,L.iv=this.createInitializationVector(s),L.keyFormat="identity"),L},t.setElementaryStreamInfo=function(w,s,L,O,x,b){b===void 0&&(b=!1);var y=this.elementaryStreams,T=y[w];if(!T){y[w]={startPTS:s,endPTS:L,startDTS:O,endDTS:x,partial:b};return}T.startPTS=Math.min(T.startPTS,s),T.endPTS=Math.max(T.endPTS,L),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,x)},t.clearElementaryStreamInfo=function(){var w=this.elementaryStreams;w[h.AUDIO]=null,w[h.VIDEO]=null,w[h.AUDIOVIDEO]=null},p(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var w=this.sn;typeof w!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&_.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),w=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,w)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(P.isFiniteNumber)(this.programDateTime))return null;var w=Object(P.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+w*1e3}},{key:"encrypted",get:function(){var w;return!!((w=this.decryptdata)!==null&&w!==void 0&&w.keyFormat&&this.decryptdata.uri)}}]),l}(v),E=function(a){i(l,a);function l(t,C,w,s,L){var O;O=a.call(this,w)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new o.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=C,O.index=s;var x=t.enumeratedString("BYTERANGE");return x&&O.setByteRange(x,L),L&&(O.fragOffset=L.fragOffset+L.duration),O}return p(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var C=this.elementaryStreams;return!!(C.audio||C.video||C.audiovideo)}}]),l}(v)},"./src/loader/key-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return _});var P=S("./src/events.ts"),d=S("./src/errors.ts"),f=S("./src/utils/logger.ts"),_=function(){function c(i){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=i,this._registerListeners()}var o=c.prototype;return o._registerListeners=function(){this.hls.on(P.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(P.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var u=this.loaders[n];u&&u.destroy()}this.loaders={}},o.onKeyLoading=function(n,u){var p=u.frag,h=p.type,v=this.loaders[h];if(!p.decryptdata){f.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=p.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var E=this.hls.config;if(v&&(f.logger.warn("abort previous key loader for type:"+h),v.abort()),!g){f.logger.warn("key uri is falsy");return}var a=E.loader,l=p.loader=this.loaders[h]=new a(E);this.decrypturl=g,this.decryptkey=null;var t={url:g,frag:p,responseType:"arraybuffer"},C={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:E.fragLoadingRetryDelay,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:0},w={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(t,C,w)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(P.Events.KEY_LOADED,{frag:p}))},o.loadsuccess=function(n,u,p){var h=p.frag;if(!h.decryptdata){f.logger.error("after key load, decryptdata unset");return}this.decryptkey=h.decryptdata.key=new Uint8Array(n.data),h.loader=null,delete this.loaders[h.type],this.hls.trigger(P.Events.KEY_LOADED,{frag:h})},o.loaderror=function(n,u){var p=u.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:n})},o.loadtimeout=function(n,u){var p=u.frag,h=p.loader;h&&h.abort(),delete this.loaders[p.type],this.hls.trigger(P.Events.ERROR,{type:d.ErrorTypes.NETWORK_ERROR,details:d.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},c}()},"./src/loader/level-details.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LevelDetails",function(){return c});var P=S("./src/polyfills/number.ts");function d(o,i){for(var n=0;n<i.length;n++){var u=i[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function f(o,i,n){return i&&d(o.prototype,i),n&&d(o,n),o}var _=10,c=function(){function o(n){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=n}var i=o.prototype;return i.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-u.lastPartSn,h=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!h||!!p,this.advanced=this.endSN>u.endSN||p>0||p===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},f(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(P.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||_}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var p=this.driftEnd-this.driftStart;return p*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.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 u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LevelKey",function(){return c});var P=S("./node_modules/url-toolkit/src/url-toolkit.js"),d=S.n(P);function f(o,i){for(var n=0;n<i.length;n++){var u=i[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function _(o,i,n){return i&&f(o.prototype,i),n&&f(o,n),o}var c=function(){o.fromURL=function(n,u){return new o(n,u)},o.fromURI=function(n){return new o(n)};function o(i,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(P.buildAbsoluteURL)(i,n,{alwaysNormalize:!0}):this._uri=i}return _(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"LoadStats",function(){return P});var P=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(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return l});var P=S("./src/polyfills/number.ts"),d=S("./node_modules/url-toolkit/src/url-toolkit.js"),f=S.n(d),_=S("./src/loader/fragment.ts"),c=S("./src/loader/level-details.ts"),o=S("./src/loader/level-key.ts"),i=S("./src/utils/attr-list.ts"),n=S("./src/utils/logger.ts"),u=S("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,h=/#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 a(L){var O,x;return E.test((O=(x=d.parseURL(L))===null||x===void 0?void 0:x.path)!=null?O:"")}var l=function(){function L(){}return L.findGroup=function(x,b){for(var y=0;y<x.length;y++){var T=x[y];if(T.id===b)return T}},L.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},L.resolve=function(x,b){return d.buildAbsoluteURL(b,x,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(x,b){var y=[],T={},k=!1;p.lastIndex=0;for(var N;(N=p.exec(x))!=null;)if(N[1]){var I=new i.AttrList(N[1]),W={attrs:I,bitrate:I.decimalInteger("AVERAGE-BANDWIDTH")||I.decimalInteger("BANDWIDTH"),name:I.NAME,url:L.resolve(N[2],b)},K=I.decimalResolution("RESOLUTION");K&&(W.width=K.width,W.height=K.height),t((I.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),W),W.videoCodec&&W.videoCodec.indexOf("avc1")!==-1&&(W.videoCodec=L.convertAVC1ToAVCOTI(W.videoCodec)),y.push(W)}else if(N[3]){var U=new i.AttrList(N[3]);U["DATA-ID"]&&(k=!0,T[U["DATA-ID"]]=U)}return{levels:y,sessionData:k?T:null}},L.parseMasterPlaylistMedia=function(x,b,y,T){T===void 0&&(T=[]);var k,N=[],I=0;for(h.lastIndex=0;(k=h.exec(x))!==null;){var W=new i.AttrList(k[1]);if(W.TYPE===y){var K={attrs:W,bitrate:0,id:I++,groupId:W["GROUP-ID"],instreamId:W["INSTREAM-ID"],name:W.NAME||W.LANGUAGE||"",type:y,default:W.bool("DEFAULT"),autoselect:W.bool("AUTOSELECT"),forced:W.bool("FORCED"),lang:W.LANGUAGE,url:W.URI?L.resolve(W.URI,b):""};if(T.length){var U=L.findGroup(T,K.groupId)||T[0];C(K,U,"audioCodec"),C(K,U,"textCodec")}N.push(K)}}return N},L.parseLevelPlaylist=function(x,b,y,T,k){var N=new c.LevelDetails(b),I=N.fragments,W=null,K=0,U=0,z=0,B=0,H=null,G=new _.Fragment(T,b),ee,ie,ue,xe=-1,Te=!1;for(v.lastIndex=0,N.m3u8=x;(ee=v.exec(x))!==null;){Te&&(Te=!1,G=new _.Fragment(T,b),G.start=z,G.sn=K,G.cc=B,G.level=y,W&&(G.initSegment=W,G.rawProgramDateTime=W.rawProgramDateTime));var se=ee[1];if(se){G.duration=parseFloat(se);var ve=(" "+ee[2]).slice(1);G.title=ve||null,G.tagList.push(ve?["INF",se,ve]:["INF",se])}else if(ee[3])Object(P.isFiniteNumber)(G.duration)&&(G.start=z,ue&&(G.levelkey=ue),G.sn=K,G.level=y,G.cc=B,G.urlId=k,I.push(G),G.relurl=(" "+ee[3]).slice(1),s(G,H),H=G,z+=G.duration,K++,U=0,Te=!0);else if(ee[4]){var de=(" "+ee[4]).slice(1);H?G.setByteRange(de,H):G.setByteRange(de)}else if(ee[5])G.rawProgramDateTime=(" "+ee[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),xe===-1&&(xe=I.length);else{if(ee=ee[0].match(g),!ee){n.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),Z=ee[ie+2]?(" "+ee[ie+2]).slice(1):"";switch(ne){case"PLAYLIST-TYPE":N.type=ae.toUpperCase();break;case"MEDIA-SEQUENCE":K=N.startSN=parseInt(ae);break;case"SKIP":{var le=new i.AttrList(ae),Q=le.decimalInteger("SKIPPED-SEGMENTS");if(Object(P.isFiniteNumber)(Q)){N.skippedSegments=Q;for(var q=Q;q--;)I.unshift(null);K+=Q}var be=le.enumeratedString("RECENTLY-REMOVED-DATERANGES");be&&(N.recentlyRemovedDateranges=be.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(ae);break;case"VERSION":N.version=parseInt(ae);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(ae||Z)&&G.tagList.push(Z?[ae,Z]:[ae]);break;case"DIS":B++;case"GAP":G.tagList.push([ne]);break;case"BITRATE":G.tagList.push([ne,ae]);break;case"DISCONTINUITY-SEQ":B=parseInt(ae);break;case"KEY":{var te,J=new i.AttrList(ae),X=J.enumeratedString("METHOD"),$=J.URI,ge=J.hexadecimalInteger("IV"),fe=J.enumeratedString("KEYFORMATVERSIONS"),_e=J.enumeratedString("KEYID"),He=(te=J.enumeratedString("KEYFORMAT"))!=null?te:"identity",$e=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if($e.indexOf(He)>-1){n.logger.warn("Keyformat "+He+" is not supported from the manifest");continue}else if(He!=="identity")continue;X&&(ue=o.LevelKey.fromURL(b,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(ue.method=X,ue.keyFormat=He,_e&&(ue.keyID=_e),fe&&(ue.keyFormatVersions=fe),ue.iv=ge));break}case"START":{var Ve=new i.AttrList(ae),et=Ve.decimalFloatingPoint("TIME-OFFSET");Object(P.isFiniteNumber)(et)&&(N.startTimeOffset=et);break}case"MAP":{var at=new i.AttrList(ae);G.relurl=at.URI,at.BYTERANGE&&G.setByteRange(at.BYTERANGE),G.level=y,G.sn="initSegment",ue&&(G.levelkey=ue),G.initSegment=null,W=G,Te=!0;break}case"SERVER-CONTROL":{var st=new i.AttrList(ae);N.canBlockReload=st.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=st.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&st.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=st.optionalFloat("PART-HOLD-BACK",0),N.holdBack=st.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new i.AttrList(ae);N.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Se=N.partList;Se||(Se=N.partList=[]);var Ye=U>0?Se[Se.length-1]:void 0,it=U++,Ke=new _.Part(new i.AttrList(ae),G,b,it,Ye);Se.push(Ke),G.duration+=Ke.duration;break}case"PRELOAD-HINT":{var qe=new i.AttrList(ae);N.preloadHint=qe;break}case"RENDITION-REPORT":{var ke=new i.AttrList(ae);N.renditionReports=N.renditionReports||[],N.renditionReports.push(ke);break}default:n.logger.warn("line parsed but not handled: "+ee);break}}}H&&!H.relurl?(I.pop(),z-=H.duration,N.partList&&(N.fragmentHint=H)):N.partList&&(s(G,H),G.cc=B,N.fragmentHint=G);var Oe=I.length,Re=I[0],pe=I[Oe-1];if(z+=N.skippedSegments*N.targetduration,z>0&&Oe&&pe){N.averagetargetduration=z/Oe;var Ee=pe.sn;N.endSN=Ee!=="initSegment"?Ee:0,Re&&(N.startCC=Re.cc,Re.initSegment||N.fragments.every(function(we){return we.relurl&&a(we.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new _.Fragment(T,b),G.relurl=pe.relurl,G.level=y,G.sn="initSegment",Re.initSegment=G,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(z+=N.fragmentHint.duration),N.totalduration=z,N.endCC=B,xe>0&&w(I,xe),N},L}();function t(L,O){["video","audio","text"].forEach(function(x){var b=L.filter(function(T){return Object(u.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],L=L.filter(function(T){return b.indexOf(T)===-1})}}),O.unknownCodecs=L}function C(L,O,x){var b=O[x];b&&(L[x]=b)}function w(L,O){for(var x=L[O],b=O;b--;){var y=L[b];if(!y)return;y.programDateTime=x.programDateTime-y.duration*1e3,x=y}}function s(L,O){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):O!=null&&O.programDateTime&&(L.programDateTime=O.endProgramDateTime),Object(P.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),d=S("./src/events.ts"),f=S("./src/errors.ts"),_=S("./src/utils/logger.ts"),c=S("./src/utils/mp4-tools.ts"),o=S("./src/loader/m3u8-parser.ts"),i=S("./src/types/loader.ts"),n=S("./src/utils/attr-list.ts");function u(v){var g=v.type;switch(g){case i.PlaylistContextType.AUDIO_TRACK:return i.PlaylistLevelType.AUDIO;case i.PlaylistContextType.SUBTITLE_TRACK:return i.PlaylistLevelType.SUBTITLE;default:return i.PlaylistLevelType.MAIN}}function p(v,g){var E=v.url;return(E===void 0||E.indexOf("data:")===0)&&(E=g.url),E}var h=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 a=this.hls;a.on(d.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(d.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(d.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(d.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.unregisterListeners=function(){var a=this.hls;a.off(d.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(d.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(d.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(d.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.createInternalLoader=function(a){var l=this.hls.config,t=l.pLoader,C=l.loader,w=t||C,s=new w(l);return a.loader=s,this.loaders[a.type]=s,s},g.getInternalLoader=function(a){return this.loaders[a.type]},g.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},g.destroyInternalLoaders=function(){for(var a in this.loaders){var l=this.loaders[a];l&&l.destroy(),this.resetInternalLoader(a)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(a,l){var t=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:i.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},g.onLevelLoading=function(a,l){var t=l.id,C=l.level,w=l.url,s=l.deliveryDirectives;this.load({id:t,groupId:null,level:C,responseType:"text",type:i.PlaylistContextType.LEVEL,url:w,deliveryDirectives:s})},g.onAudioTrackLoading=function(a,l){var t=l.id,C=l.groupId,w=l.url,s=l.deliveryDirectives;this.load({id:t,groupId:C,level:null,responseType:"text",type:i.PlaylistContextType.AUDIO_TRACK,url:w,deliveryDirectives:s})},g.onSubtitleTrackLoading=function(a,l){var t=l.id,C=l.groupId,w=l.url,s=l.deliveryDirectives;this.load({id:t,groupId:C,level:null,responseType:"text",type:i.PlaylistContextType.SUBTITLE_TRACK,url:w,deliveryDirectives:s})},g.load=function(a){var l,t=this.hls.config,C=this.getInternalLoader(a);if(C){var w=C.context;if(w&&w.url===a.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),C.abort()}var s,L,O,x;switch(a.type){case i.PlaylistContextType.MANIFEST:s=t.manifestLoadingMaxRetry,L=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,x=t.manifestLoadingMaxRetryTimeout;break;case i.PlaylistContextType.LEVEL:case i.PlaylistContextType.AUDIO_TRACK:case i.PlaylistContextType.SUBTITLE_TRACK:s=0,L=t.levelLoadingTimeOut;break;default:s=t.levelLoadingMaxRetry,L=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,x=t.levelLoadingMaxRetryTimeout;break}if(C=this.createInternalLoader(a),(l=a.deliveryDirectives)!==null&&l!==void 0&&l.part){var b;if(a.type===i.PlaylistContextType.LEVEL&&a.level!==null?b=this.hls.levels[a.level].details:a.type===i.PlaylistContextType.AUDIO_TRACK&&a.id!==null?b=this.hls.audioTracks[a.id].details:a.type===i.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(b=this.hls.subtitleTracks[a.id].details),b){var y=b.partTarget,T=b.targetduration;y&&T&&(L=Math.min(Math.max(y*3,T*.8)*1e3,L))}}var k={timeout:L,maxRetry:s,retryDelay:O,maxRetryDelay:x,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};C.load(a,k,N)},g.loadsuccess=function(a,l,t,C){if(C===void 0&&(C=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,l,t,C);return}this.resetInternalLoader(t.type);var w=a.data;if(w.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",C);return}l.parsing.start=performance.now(),w.indexOf("#EXTINF:")>0||w.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,l,t,C):this.handleMasterPlaylist(a,l,t,C)},g.loaderror=function(a,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!1,a)},g.loadtimeout=function(a,l,t){t===void 0&&(t=null),this.handleNetworkError(l,t,!0)},g.handleMasterPlaylist=function(a,l,t,C){var w=this.hls,s=a.data,L=p(a,t),O=o.default.parseMasterPlaylist(s,L),x=O.levels,b=O.sessionData;if(!x.length){this.handleManifestParsingError(a,t,"no level found in manifest",C);return}var y=x.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),T=x.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),k=o.default.parseMasterPlaylistMedia(s,L,"AUDIO",y),N=o.default.parseMasterPlaylistMedia(s,L,"SUBTITLES",T),I=o.default.parseMasterPlaylistMedia(s,L,"CLOSED-CAPTIONS");if(k.length){var W=k.some(function(K){return!K.url});!W&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}w.trigger(d.Events.MANIFEST_LOADED,{levels:x,audioTracks:k,subtitles:N,captions:I,url:L,stats:l,networkDetails:C,sessionData:b})},g.handleTrackOrLevelPlaylist=function(a,l,t,C){var w=this.hls,s=t.id,L=t.level,O=t.type,x=p(a,t),b=Object(P.isFiniteNumber)(s)?s:0,y=Object(P.isFiniteNumber)(L)?L:b,T=u(t),k=o.default.parseLevelPlaylist(a.data,x,y,T,b);if(!k.fragments.length){w.trigger(d.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.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===i.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:k,name:"",url:x};w.trigger(d.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:x,stats:l,networkDetails:C,sessionData:null})}if(l.parsing.end=performance.now(),k.needSidxRanges){var I,W=(I=k.fragments[0].initSegment)===null||I===void 0?void 0:I.url;this.load({url:W,isSidxRequest:!0,type:O,level:L,levelDetails:k,id:s,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=k,this.handlePlaylistLoaded(a,l,t,C)},g.handleSidxRequest=function(a,l){var t=Object(c.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var C=t.references,w=l.levelDetails;C.forEach(function(s,L){var O=s.info,x=w.fragments[L];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(a,l,t,C){this.hls.trigger(d.Events.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===i.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:l,networkDetails:C})},g.handleNetworkError=function(a,l,t,C){t===void 0&&(t=!1),_.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var w=f.ErrorDetails.UNKNOWN,s=!1,L=this.getInternalLoader(a);switch(a.type){case i.PlaylistContextType.MANIFEST:w=t?f.ErrorDetails.MANIFEST_LOAD_TIMEOUT:f.ErrorDetails.MANIFEST_LOAD_ERROR,s=!0;break;case i.PlaylistContextType.LEVEL:w=t?f.ErrorDetails.LEVEL_LOAD_TIMEOUT:f.ErrorDetails.LEVEL_LOAD_ERROR,s=!1;break;case i.PlaylistContextType.AUDIO_TRACK:w=t?f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,s=!1;break;case i.PlaylistContextType.SUBTITLE_TRACK:w=t?f.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:f.ErrorDetails.SUBTITLE_LOAD_ERROR,s=!1;break}L&&this.resetInternalLoader(a.type);var O={type:f.ErrorTypes.NETWORK_ERROR,details:w,fatal:s,url:a.url,loader:L,context:a,networkDetails:l};C&&(O.response=C),this.hls.trigger(d.Events.ERROR,O)},g.handlePlaylistLoaded=function(a,l,t,C){var w=t.type,s=t.level,L=t.id,O=t.groupId,x=t.loader,b=t.levelDetails,y=t.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",C);return}if(!x)return;b.live&&(x.getCacheAge&&(b.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(w){case i.PlaylistContextType.MANIFEST:case i.PlaylistContextType.LEVEL:this.hls.trigger(d.Events.LEVEL_LOADED,{details:b,level:s||0,id:L||0,stats:l,networkDetails:C,deliveryDirectives:y});break;case i.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(d.Events.AUDIO_TRACK_LOADED,{details:b,id:L||0,groupId:O||"",stats:l,networkDetails:C,deliveryDirectives:y});break;case i.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(d.Events.SUBTITLE_TRACK_LOADED,{details:b,id:L||0,groupId:O||"",stats:l,networkDetails:C,deliveryDirectives:y});break}},v}();m.default=h},"./src/polyfills/number.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isFiniteNumber",function(){return P}),S.d(m,"MAX_SAFE_INTEGER",function(){return d});var P=Number.isFinite||function(f){return typeof f=="number"&&isFinite(f)},d=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(D,m,S){"use strict";S.r(m);var P=function(){function d(){}return d.getSilentFrame=function(_,c){switch(_){case"mp4a.40.2":if(c===1)return new Uint8Array([0,200,0,128,35,128]);if(c===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(c===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(c===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(c===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(c===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(c===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(c===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(c===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},d}();m.default=P},"./src/remux/mp4-generator.ts":function(D,m,S){"use strict";S.r(m);var P=Math.pow(2,32)-1,d=function(){function f(){}return f.init=function(){f.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var c;for(c in f.types)f.types.hasOwnProperty(c)&&(f.types[c]=[c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2),c.charCodeAt(3)]);var o=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);f.HDLR_TYPES={video:o,audio:i};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);f.STTS=f.STSC=f.STCO=u,f.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),f.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),f.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),f.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),h=new Uint8Array([97,118,99,49]),v=new Uint8Array([0,0,0,1]);f.FTYP=f.box(f.types.ftyp,p,v,p,h),f.DINF=f.box(f.types.dinf,f.box(f.types.dref,n))},f.box=function(c){for(var o=8,i=arguments.length,n=new Array(i>1?i-1:0),u=1;u<i;u++)n[u-1]=arguments[u];for(var p=n.length,h=p;p--;)o+=n[p].byteLength;var v=new Uint8Array(o);for(v[0]=o>>24&255,v[1]=o>>16&255,v[2]=o>>8&255,v[3]=o&255,v.set(c,4),p=0,o=8;p<h;p++)v.set(n[p],o),o+=n[p].byteLength;return v},f.hdlr=function(c){return f.box(f.types.hdlr,f.HDLR_TYPES[c])},f.mdat=function(c){return f.box(f.types.mdat,c)},f.mdhd=function(c,o){o*=c;var i=Math.floor(o/(P+1)),n=Math.floor(o%(P+1));return f.box(f.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},f.mdia=function(c){return f.box(f.types.mdia,f.mdhd(c.timescale,c.duration),f.hdlr(c.type),f.minf(c))},f.mfhd=function(c){return f.box(f.types.mfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255]))},f.minf=function(c){return c.type==="audio"?f.box(f.types.minf,f.box(f.types.smhd,f.SMHD),f.DINF,f.stbl(c)):f.box(f.types.minf,f.box(f.types.vmhd,f.VMHD),f.DINF,f.stbl(c))},f.moof=function(c,o,i){return f.box(f.types.moof,f.mfhd(c),f.traf(i,o))},f.moov=function(c){for(var o=c.length,i=[];o--;)i[o]=f.trak(c[o]);return f.box.apply(null,[f.types.moov,f.mvhd(c[0].timescale,c[0].duration)].concat(i).concat(f.mvex(c)))},f.mvex=function(c){for(var o=c.length,i=[];o--;)i[o]=f.trex(c[o]);return f.box.apply(null,[f.types.mvex].concat(i))},f.mvhd=function(c,o){o*=c;var i=Math.floor(o/(P+1)),n=Math.floor(o%(P+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return f.box(f.types.mvhd,u)},f.sdtp=function(c){var o=c.samples||[],i=new Uint8Array(4+o.length),n,u;for(n=0;n<o.length;n++)u=o[n].flags,i[n+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return f.box(f.types.sdtp,i)},f.stbl=function(c){return f.box(f.types.stbl,f.stsd(c),f.box(f.types.stts,f.STTS),f.box(f.types.stsc,f.STSC),f.box(f.types.stsz,f.STSZ),f.box(f.types.stco,f.STCO))},f.avc1=function(c){var o=[],i=[],n,u,p;for(n=0;n<c.sps.length;n++)u=c.sps[n],p=u.byteLength,o.push(p>>>8&255),o.push(p&255),o=o.concat(Array.prototype.slice.call(u));for(n=0;n<c.pps.length;n++)u=c.pps[n],p=u.byteLength,i.push(p>>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(u));var h=f.box(f.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|c.sps.length].concat(o).concat([c.pps.length]).concat(i))),v=c.width,g=c.height,E=c.pixelRatio[0],a=c.pixelRatio[1];return f.box(f.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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]),h,f.box(f.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),f.box(f.types.pasp,new Uint8Array([E>>24,E>>16&255,E>>8&255,E&255,a>>24,a>>16&255,a>>8&255,a&255])))},f.esds=function(c){var o=c.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(c.config).concat([6,1,2]))},f.mp4a=function(c){var o=c.samplerate;return f.box(f.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),f.box(f.types.esds,f.esds(c)))},f.mp3=function(c){var o=c.samplerate;return f.box(f.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},f.stsd=function(c){return c.type==="audio"?!c.isAAC&&c.codec==="mp3"?f.box(f.types.stsd,f.STSD,f.mp3(c)):f.box(f.types.stsd,f.STSD,f.mp4a(c)):f.box(f.types.stsd,f.STSD,f.avc1(c))},f.tkhd=function(c){var o=c.id,i=c.duration*c.timescale,n=c.width,u=c.height,p=Math.floor(i/(P+1)),h=Math.floor(i%(P+1));return f.box(f.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&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,n>>8&255,n&255,0,0,u>>8&255,u&255,0,0]))},f.traf=function(c,o){var i=f.sdtp(c),n=c.id,u=Math.floor(o/(P+1)),p=Math.floor(o%(P+1));return f.box(f.types.traf,f.box(f.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),f.box(f.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,p>>24,p>>16&255,p>>8&255,p&255])),f.trun(c,i.length+16+20+8+16+8+8),i)},f.trak=function(c){return c.duration=c.duration||4294967295,f.box(f.types.trak,f.tkhd(c),f.mdia(c))},f.trex=function(c){var o=c.id;return f.box(f.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},f.trun=function(c,o){var i=c.samples||[],n=i.length,u=12+16*n,p=new Uint8Array(u),h,v,g,E,a,l;for(o+=8+u,p.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),h=0;h<n;h++)v=i[h],g=v.duration,E=v.size,a=v.flags,l=v.cts,p.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*h);return f.box(f.types.trun,p)},f.initSegment=function(c){f.types||f.init();var o=f.moov(c),i=new Uint8Array(f.FTYP.byteLength+o.byteLength);return i.set(f.FTYP),i.set(o,f.FTYP.byteLength),i},f}();d.types=void 0,d.HDLR_TYPES=void 0,d.STTS=void 0,d.STSC=void 0,d.STCO=void 0,d.STSZ=void 0,d.VMHD=void 0,d.SMHD=void 0,d.STSD=void 0,d.FTYP=void 0,d.DINF=void 0,m.default=d},"./src/remux/mp4-remuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return l}),S.d(m,"normalizePts",function(){return t});var P=S("./src/polyfills/number.ts"),d=S("./src/remux/aac-helper.ts"),f=S("./src/remux/mp4-generator.ts"),_=S("./src/events.ts"),c=S("./src/errors.ts"),o=S("./src/utils/logger.ts"),i=S("./src/types/loader.ts"),n=S("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(L){for(var O=1;O<arguments.length;O++){var x=arguments[O];for(var b in x)Object.prototype.hasOwnProperty.call(x,b)&&(L[b]=x[b])}return L},u.apply(this,arguments)}var p=10*1e3,h=1024,v=1152,g=null,E=null,a=!1,l=function(){function L(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 k=navigator.userAgent||"",N=k.match(/Chrome\/(\d+)/i);g=N?parseInt(N[1]):0}if(E===null){var I=navigator.userAgent.match(/Safari\/(\d+)/i);E=I?parseInt(I[1]):0}a=!!g&&g<75||!!E&&E<600}var O=L.prototype;return O.destroy=function(){},O.resetTimeStamp=function(b){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},O.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(b){var y=!1,T=b.reduce(function(k,N){var I=N.pts-k;return I<-4294967296?(y=!0,t(k,N.pts)):I>0?k:N.pts},b[0].pts);return y&&o.logger.debug("PTS rollover detected"),T},O.remux=function(b,y,T,k,N,I,W,K){var U,z,B,H,G,ee,ie=N,ue=N,xe=b.pid>-1,Te=y.pid>-1,se=y.samples.length,ve=b.samples.length>0,de=se>1,ne=(!xe||ve)&&(!Te||de)||this.ISGenerated||W;if(ne){this.ISGenerated||(B=this.generateIS(b,y,N));var ae=this.isVideoContiguous,Z=-1;if(de&&(Z=C(y.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,Z>0){o.logger.warn("[mp4-remuxer]: Dropped "+Z+" out of "+se+" video samples due to a missing keyframe");var le=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(Z),y.dropped+=Z,ue+=(y.samples[0].pts-le)/(y.timescale||9e4)}else Z===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+se+" video samples"),ee=!1);if(this.ISGenerated){if(ve&&de){var Q=this.getVideoStartPts(y.samples),q=t(b.samples[0].pts,Q)-Q,be=q/y.inputTimeScale;ie+=Math.max(0,be),ue+=Math.max(0,-be)}if(ve){if(b.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(b,y,N)),z=this.remuxAudio(b,ie,this.isAudioContiguous,I,Te||de||K===i.PlaylistLevelType.AUDIO?ue:void 0),de){var te=z?z.endPTS-z.startPTS:0;y.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(b,y,N)),U=this.remuxVideo(y,ue,ae,te)}}else de&&(U=this.remuxVideo(y,ue,ae,0));U&&(U.firstKeyFrame=Z,U.independent=Z!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,N)),k.samples.length&&(H=this.remuxText(k,N))),{audio:z,video:U,initSegment:B,independent:ee,text:H,id3:G}},O.generateIS=function(b,y,T){var k=b.samples,N=y.samples,I=this.typeSupported,W={},K=!Object(P.isFiniteNumber)(this._initPTS),U="audio/mp4",z,B,H;if(K&&(z=B=Infinity),b.config&&k.length&&(b.timescale=b.samplerate,b.isAAC||(I.mpeg?(U="audio/mpeg",b.codec=""):I.mp3&&(b.codec="mp3")),W.audio={id:"audio",container:U,codec:b.codec,initSegment:!b.isAAC&&I.mpeg?new Uint8Array(0):f.default.initSegment([b]),metadata:{channelCount:b.channelCount}},K&&(H=b.inputTimeScale,z=B=k[0].pts-Math.round(H*T))),y.sps&&y.pps&&N.length&&(y.timescale=y.inputTimeScale,W.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:f.default.initSegment([y]),metadata:{width:y.width,height:y.height}},K)){H=y.inputTimeScale;var G=this.getVideoStartPts(N),ee=Math.round(H*T);B=Math.min(B,t(N[0].dts,G)-ee),z=Math.min(z,G-ee)}if(Object.keys(W).length)return this.ISGenerated=!0,K&&(this._initPTS=z,this._initDTS=B),{tracks:W,initPTS:z,timescale:H}},O.remuxVideo=function(b,y,T,k){var N=b.inputTimeScale,I=b.samples,W=[],K=I.length,U=this._initPTS,z=this.nextAvcDts,B=8,H,G,ee,ie=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,xe=0,Te=!1;if(!T||z===null){var se=y*N,ve=I[0].pts-t(I[0].dts,I[0].pts);z=se-ve}for(var de=0;de<K;de++){var ne=I[de];if(ne.pts=t(ne.pts-U,z),ne.dts=t(ne.dts-U,z),ne.dts>ne.pts){var ae=9e4*.2;xe=Math.max(Math.min(xe,ne.pts-ne.dts),-1*ae)}ne.dts<I[de>0?de-1:de].dts&&(Te=!0)}Te&&I.sort(function(nr,Wt){var pt=nr.dts-Wt.dts,Rr=nr.pts-Wt.pts;return pt||Rr}),G=I[0].dts,ee=I[I.length-1].dts;var Z=Math.round((ee-G)/(K-1));if(xe<0){if(xe<Z*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-Z,!0)+" ms");for(var le=xe,Q=0;Q<K;Q++)I[Q].dts=le=Math.max(le,I[Q].pts-Z),I[Q].pts=Math.max(le,I[Q].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(xe,!0)+" ms to overcome this issue");for(var q=0;q<K;q++)I[q].dts=I[q].dts+xe}G=I[0].dts}if(T){var be=G-z,te=be>Z,J=be<-1;if(te||J){te?o.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(be,!0)+" ms ("+be+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-be,!0)+" ms ("+be+"dts) overlapping between fragments detected"),G=z;var X=I[0].pts-be;I[0].dts=G,I[0].pts=X,o.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(be,!0)+" ms")}}a&&(G=Math.max(0,G));for(var $=0,ge=0,fe=0;fe<K;fe++){for(var _e=I[fe],He=_e.units,$e=He.length,Ve=0,et=0;et<$e;et++)Ve+=He[et].data.length;ge+=Ve,$+=$e,_e.length=Ve,_e.dts=Math.max(_e.dts,G),_e.pts=Math.max(_e.pts,_e.dts,0),ie=Math.min(_e.pts,ie),ue=Math.max(_e.pts,ue)}ee=I[K-1].dts;var at=ge+4*$+8,st;try{st=new Uint8Array(at)}catch(nr){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:at,reason:"fail allocating video mdat "+at});return}var Me=new DataView(st.buffer);Me.setUint32(0,at),st.set(f.default.types.mdat,4);for(var Se=0;Se<K;Se++){for(var Ye=I[Se],it=Ye.units,Ke=0,qe=0,ke=it.length;qe<ke;qe++){var Oe=it[qe],Re=Oe.data,pe=Oe.data.byteLength;Me.setUint32(B,pe),B+=4,st.set(Re,B),B+=pe,Ke+=4+pe}if(Se<K-1)H=I[Se+1].dts-Ye.dts;else{var Ee=this.config,we=Ye.dts-I[Se>0?Se-1:Se].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(Ee.maxBufferHole*N),Ge=(k?ie+k*N:this.nextAudioPts)-Ye.pts;Ge>De?(H=Ge-we,H<0&&(H=we),o.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+H/90+" ms for the last video frame.")):H=we}else H=we}var nt=Math.round(Ye.pts-Ye.dts);W.push(new w(Ye.key,H,Ke,nt))}if(W.length&&g&&g<70){var lt=W[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(H!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=ee+H,this.isVideoContiguous=!0;var ut=f.default.moof(b.sequenceNumber++,G,u({},b,{samples:W})),Rt="video",tt={data1:ut,data2:st,startPTS:ie/N,endPTS:(ue+H)/N,startDTS:G/N,endDTS:z/N,type:Rt,hasAudio:!1,hasVideo:!0,nb:W.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(st.length,"MDAT length must not be zero"),tt},O.remuxAudio=function(b,y,T,k,N){var I=b.inputTimeScale,W=b.samplerate?b.samplerate:I,K=I/W,U=b.isAAC?h:v,z=U*K,B=this._initPTS,H=!b.isAAC&&this.typeSupported.mpeg,G=[],ee=b.samples,ie=H?0:8,ue=this.nextAudioPts||-1,xe=y*I;if(this.isAudioContiguous=T=T||ee.length&&ue>0&&(k&&Math.abs(xe-ue)<9e3||Math.abs(t(ee[0].pts-B,xe)-ue)<20*z),ee.forEach(function(Re){Re.pts=t(Re.pts-B,xe)}),!T||ue<0){if(ee=ee.filter(function(Re){return Re.pts>=0}),!ee.length)return;N===0?ue=0:k?ue=Math.max(0,xe):ue=ee[0].pts}if(b.isAAC)for(var Te=N!==void 0,se=this.config.maxAudioFramesDrift,ve=0,de=ue;ve<ee.length;ve++){var ne=ee[ve],ae=ne.pts,Z=ae-de,le=Math.abs(1e3*Z/I);if(Z<=-se*z&&Te)ve===0&&(o.logger.warn("Audio frame @ "+(ae/I).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Z/I)+" ms."),this.nextAudioPts=ue=de=ae);else if(Z>=se*z&&le<p&&Te){var Q=Math.round(Z/z);de=ae-Q*z,de<0&&(Q--,de+=z),ve===0&&(this.nextAudioPts=ue=de),o.logger.warn("[mp4-remuxer]: Injecting "+Q+" audio frame @ "+(de/I).toFixed(3)+"s due to "+Math.round(1e3*Z/I)+" ms gap.");for(var q=0;q<Q;q++){var be=Math.max(de,0),te=d.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);te||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),te=ne.unit.subarray()),ee.splice(ve,0,{unit:te,pts:be}),de+=z,ve++}}ne.pts=de,de+=z}for(var J=null,X=null,$,ge=0,fe=ee.length;fe--;)ge+=ee[fe].unit.byteLength;for(var _e=0,He=ee.length;_e<He;_e++){var $e=ee[_e],Ve=$e.unit,et=$e.pts;if(X!==null){var at=G[_e-1];at.duration=Math.round((et-X)/K)}else if(T&&b.isAAC&&(et=ue),J=et,ge>0){ge+=ie;try{$=new Uint8Array(ge)}catch(Re){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ge,reason:"fail allocating audio mdat "+ge});return}if(!H){var st=new DataView($.buffer);st.setUint32(0,ge),$.set(f.default.types.mdat,4)}}else return;$.set(Ve,ie);var Me=Ve.byteLength;ie+=Me,G.push(new w(!0,U,Me,0)),X=et}var Se=G.length;if(!Se)return;var Ye=G[G.length-1];this.nextAudioPts=ue=X+K*Ye.duration;var it=H?new Uint8Array(0):f.default.moof(b.sequenceNumber++,J/K,u({},b,{samples:G}));b.samples=[];var Ke=J/I,qe=ue/I,ke="audio",Oe={data1:it,data2:$,startPTS:Ke,endPTS:qe,startDTS:Ke,endDTS:qe,type:ke,hasAudio:!0,hasVideo:!1,nb:Se};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),Oe},O.remuxEmptyAudio=function(b,y,T,k){var N=b.inputTimeScale,I=b.samplerate?b.samplerate:N,W=N/I,K=this.nextAudioPts,U=(K!==null?K:k.startDTS*N)+this._initDTS,z=k.endDTS*N+this._initDTS,B=W*h,H=Math.ceil((z-U)/B),G=d.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],ie=0;ie<H;ie++){var ue=U+ie*B;ee.push({unit:G,pts:ue,dts:ue})}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 k=b.inputTimeScale,N=this._initPTS,I=this._initDTS,W=0;W<T;W++){var K=b.samples[W];K.pts=t(K.pts-N,y*k)/k,K.dts=t(K.dts-I,y*k)/k}var U=b.samples;return b.samples=[],{samples:U}},O.remuxText=function(b,y){var T=b.samples.length;if(!T)return;for(var k=b.inputTimeScale,N=this._initPTS,I=0;I<T;I++){var W=b.samples[I];W.pts=t(W.pts-N,y*k)/k}b.samples.sort(function(U,z){return U.pts-z.pts});var K=b.samples;return b.samples=[],{samples:K}},L}();function t(L,O){var x;if(O===null)return L;for(O<L?x=-8589934592:x=8589934592;Math.abs(L-O)>4294967296;)L+=x;return L}function C(L){for(var O=0;O<L.length;O++)if(L[O].key)return O;return-1}var w=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 s(O)},s=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/polyfills/number.ts"),d=S("./src/utils/mp4-tools.ts"),f=S("./src/loader/fragment.ts"),_=S("./src/utils/logger.ts"),c=function(){function n(){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 u=n.prototype;return u.destroy=function(){},u.resetTimeStamp=function(h){this.initPTS=h,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(h,v,g){this.audioCodec=v,this.videoCodec=g,this.generateInitSegment(h),this.emitInitSegment=!0},u.generateInitSegment=function(h){var v=this.audioCodec,g=this.videoCodec;if(!h||!h.byteLength){this.initTracks=void 0,this.initData=void 0;return}var E=this.initData=Object(d.parseInitSegment)(h);v||(v=i(E.audio,f.ElementaryStreamTypes.AUDIO)),g||(g=i(E.video,f.ElementaryStreamTypes.VIDEO));var a={};E.audio&&E.video?a.audiovideo={container:"video/mp4",codec:v+","+g,initSegment:h,id:"main"}:E.audio?a.audio={container:"audio/mp4",codec:v,initSegment:h,id:"audio"}:E.video?a.video={container:"video/mp4",codec:g,initSegment:h,id:"main"}:_.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},u.remux=function(h,v,g,E,a){var l=this.initPTS,t=this.lastEndDTS,C={audio:void 0,video:void 0,text:E,id3:g,initSegment:void 0};Object(P.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var w=v.samples;if(!w||!w.length)return C;var s={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(w),L=this.initData),!L||!L.length)return _.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),C;this.emitInitSegment&&(s.tracks=this.initTracks,this.emitInitSegment=!1),Object(P.isFiniteNumber)(l)||(this.initPTS=s.initPTS=l=o(L,w,t));var O=Object(d.getDuration)(w,L),x=t,b=O+x;Object(d.offsetStartDTS)(L,w,l),O>0?this.lastEndDTS=b:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!L.audio,T=!!L.video,k="";y&&(k+="audio"),T&&(k+="video");var N={data1:w,startPTS:x,startDTS:x,endPTS:b,endDTS:b,type:k,hasAudio:y,hasVideo:T,nb:1,dropped:0};return C.audio=N.type==="audio"?N:void 0,C.video=N.type!=="audio"?N:void 0,C.text=E,C.id3=g,C.initSegment=s,C},n}(),o=function(u,p,h){return Object(d.getStartDTS)(u,p)-h};function i(n,u){var p=n==null?void 0:n.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||u===f.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}m.default=c},"./src/task-loop.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function d(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var f=d.prototype;return f.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},f.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},f.onHandlerDestroyed=function(){},f.hasInterval=function(){return!!this._tickInterval},f.hasNextTick=function(){return!!this._tickTimer},f.setInterval=function(c){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,c),!0)},f.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},f.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},f.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},f.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},f.doTick=function(){},d}()},"./src/types/cmcd.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"CMCDVersion",function(){return P}),S.d(m,"CMCDObjectType",function(){return d}),S.d(m,"CMCDStreamingFormat",function(){return f}),S.d(m,"CMCDStreamType",function(){return _});var P=1,d;(function(c){c.MANIFEST="m",c.AUDIO="a",c.VIDEO="v",c.MUXED="av",c.INIT="i",c.CAPTION="c",c.TIMED_TEXT="tt",c.KEY="k",c.OTHER="o"})(d||(d={}));var f;(function(c){c.DASH="d",c.HLS="h",c.SMOOTH="s",c.OTHER="o"})(f||(f={}));var _;(function(c){c.VOD="v",c.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"HlsSkip",function(){return f}),S.d(m,"getSkipValue",function(){return _}),S.d(m,"HlsUrlParameters",function(){return c}),S.d(m,"Level",function(){return o});function P(i,n){for(var u=0;u<n.length;u++){var p=n[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}function d(i,n,u){return n&&P(i.prototype,n),u&&P(i,u),i}var f;(function(i){i.No="",i.Yes="YES",i.v2="v2"})(f||(f={}));function _(i,n){var u=i.canSkipUntil,p=i.canSkipDateRanges,h=i.endSN,v=n!==void 0?n-h:0;return u&&v<u?p?f.v2:f.Yes:f.No}var c=function(){function i(u,p,h){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=p,this.skip=h}var n=i.prototype;return n.addDirectives=function(p){var h=new self.URL(p);return this.msn!==void 0&&h.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&h.searchParams.set("_HLS_part",this.part.toString()),this.skip&&h.searchParams.set("_HLS_skip",this.skip),h.toString()},i}(),o=function(){function i(n){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=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return d(i,[{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(u){var p=u%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),i}()},"./src/types/loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"PlaylistContextType",function(){return P}),S.d(m,"PlaylistLevelType",function(){return d});var P;(function(f){f.MANIFEST="manifest",f.LEVEL="level",f.AUDIO_TRACK="audioTrack",f.SUBTITLE_TRACK="subtitleTrack"})(P||(P={}));var d;(function(f){f.MAIN="main",f.AUDIO="audio",f.SUBTITLE="subtitle"})(d||(d={}))},"./src/types/transmuxer.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"ChunkMetadata",function(){return P});var P=function(_,c,o,i,n,u){i===void 0&&(i=0),n===void 0&&(n=-1),u===void 0&&(u=!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=d(),this.buffering={audio:d(),video:d(),audiovideo:d()},this.level=_,this.sn=c,this.id=o,this.size=i,this.part=n,this.partial=u};function d(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"AttrList",function(){return f});var P=/^(\d+)x(\d+)$/,d=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,f=function(){function _(o){typeof o=="string"&&(o=_.parseAttrList(o));for(var i in o)o.hasOwnProperty(i)&&(this[i]=o[i])}var c=_.prototype;return c.decimalInteger=function(i){var n=parseInt(this[i],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},c.hexadecimalInteger=function(i){if(this[i]){var n=(this[i]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var u=new Uint8Array(n.length/2),p=0;p<n.length/2;p++)u[p]=parseInt(n.slice(p*2,p*2+2),16);return u}else return null},c.hexadecimalIntegerAsNumber=function(i){var n=parseInt(this[i],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},c.decimalFloatingPoint=function(i){return parseFloat(this[i])},c.optionalFloat=function(i,n){var u=this[i];return u?parseFloat(u):n},c.enumeratedString=function(i){return this[i]},c.bool=function(i){return this[i]==="YES"},c.decimalResolution=function(i){var n=P.exec(this[i]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},_.parseAttrList=function(i){var n,u={},p='"';for(d.lastIndex=0;(n=d.exec(i))!==null;){var h=n[2];h.indexOf(p)===0&&h.lastIndexOf(p)===h.length-1&&(h=h.slice(1,-1)),u[n[1]]=h}return u},_}()},"./src/utils/binary-search.ts":function(D,m,S){"use strict";S.r(m);var P={search:function(f,_){for(var c=0,o=f.length-1,i=null,n=null;c<=o;){i=(c+o)/2|0,n=f[i];var u=_(n);if(u>0)c=i+1;else if(u<0)o=i-1;else return n}return null}};m.default=P},"./src/utils/buffer-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"BufferHelper",function(){return f});var P=S("./src/utils/logger.ts"),d={length:0,start:function(){return 0},end:function(){return 0}},f=function(){function _(){}return _.isBuffered=function(o,i){try{if(o){for(var n=_.getBuffered(o),u=0;u<n.length;u++)if(i>=n.start(u)&&i<=n.end(u))return!0}}catch(p){}return!1},_.bufferInfo=function(o,i,n){try{if(o){var u=_.getBuffered(o),p=[],h;for(h=0;h<u.length;h++)p.push({start:u.start(h),end:u.end(h)});return this.bufferedInfo(p,i,n)}}catch(v){}return{len:0,start:i,end:i,nextStart:void 0}},_.bufferedInfo=function(o,i,n){i=Math.max(0,i),o.sort(function(s,L){var O=s.start-L.start;return O||L.end-s.end});var u=[];if(n)for(var p=0;p<o.length;p++){var h=u.length;if(h){var v=u[h-1].end;o[p].start-v<n?o[p].end>v&&(u[h-1].end=o[p].end):u.push(o[p])}else u.push(o[p])}else u=o;for(var g=0,E,a=i,l=i,t=0;t<u.length;t++){var C=u[t].start,w=u[t].end;if(i+n>=C&&i<w)a=C,l=w,g=l-i;else if(i+n<C){E=C;break}}return{len:g,start:a||0,end:l||0,nextStart:E}},_.getBuffered=function(o){try{return o.buffered}catch(i){return P.logger.log("failed to get media.buffered",i),d}},_}()},"./src/utils/cea-608-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"Row",function(){return l}),S.d(m,"CaptionScreen",function(){return t});var P=S("./src/utils/logger.ts"),d={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},f=function(b){var y=b;return d.hasOwnProperty(b)&&(y=d[b]),String.fromCharCode(y)},_=15,c=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},i={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],h;(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"})(h||(h={}));var v=function(){function x(){this.time=null,this.verboseLevel=h.ERROR}var b=x.prototype;return b.log=function(T,k){this.verboseLevel>=T&&P.logger.log(this.time+" ["+T+"] "+k)},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,k,N,I){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=k||!1,this.background=N||"black",this.flash=I||!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 k=["foreground","underline","italics","background","flash"],N=0;N<k.length;N++){var I=k[N];T.hasOwnProperty(I)&&(this[I]=T[I])}},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}(),a=function(){function x(y,T,k,N,I,W){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new E(T,k,N,I,W)}var b=x.prototype;return b.reset=function(){this.uchar=" ",this.penState.reset()},b.setChar=function(T,k){this.uchar=T,this.penState.copy(k)},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}(),l=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<c;T++)this.chars.push(new a);this.logger=y,this.pos=0,this.currPenState=new E}var b=x.prototype;return b.equals=function(T){for(var k=!0,N=0;N<c;N++)if(!this.chars[N].equals(T.chars[N])){k=!1;break}return k},b.copy=function(T){for(var k=0;k<c;k++)this.chars[k].copy(T.chars[k])},b.isEmpty=function(){for(var T=!0,k=0;k<c;k++)if(!this.chars[k].isEmpty()){T=!1;break}return T},b.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(h.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>c&&(this.logger.log(h.DEBUG,"Too large cursor position "+this.pos),this.pos=c)},b.moveCursor=function(T){var k=this.pos+T;if(T>1)for(var N=this.pos+1;N<k+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(k)},b.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},b.insertChar=function(T){T>=144&&this.backSpace();var k=f(T);if(this.pos>=c){this.logger.log(h.ERROR,"Cannot insert "+T.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},b.clearFromPos=function(T){var k;for(k=T;k<c;k++)this.chars[k].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=[],k=!0,N=0;N<c;N++){var I=this.chars[N].uchar;I!==" "&&(k=!1),T.push(I)}return k?"":T.join("")},b.setPenStyles=function(T){this.currPenState.setStyles(T);var k=this.chars[this.pos];k.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<_;T++)this.rows.push(new l(y));this.logger=y,this.currRow=_-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=x.prototype;return b.reset=function(){for(var T=0;T<_;T++)this.rows[T].clear();this.currRow=_-1},b.equals=function(T){for(var k=!0,N=0;N<_;N++)if(!this.rows[N].equals(T.rows[N])){k=!1;break}return k},b.copy=function(T){for(var k=0;k<_;k++)this.rows[k].copy(T.rows[k])},b.isEmpty=function(){for(var T=!0,k=0;k<_;k++)if(!this.rows[k].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 k=this.rows[this.currRow];k.insertChar(T)},b.setPen=function(T){var k=this.rows[this.currRow];k.setPenStyles(T)},b.moveCursor=function(T){var k=this.rows[this.currRow];k.moveCursor(T)},b.setCursor=function(T){this.logger.log(h.INFO,"setCursor: "+T);var k=this.rows[this.currRow];k.setCursor(T)},b.setPAC=function(T){this.logger.log(h.INFO,"pacData = "+JSON.stringify(T));var k=T.row-1;if(this.nrRollUpRows&&k<this.nrRollUpRows-1&&(k=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==k){for(var N=0;N<_;N++)this.rows[N].clear();var I=this.currRow+1-this.nrRollUpRows,W=this.lastOutputScreen;if(W){var K=W.rows[I].cueStartTime,U=this.logger.time;if(K&&U!==null&&K<U)for(var z=0;z<this.nrRollUpRows;z++)this.rows[k-this.nrRollUpRows+z+1].copy(W.rows[I+z])}}this.currRow=k;var B=this.rows[this.currRow];if(T.indent!==null){var H=T.indent,G=Math.max(H-1,0);B.setCursor(T.indent),T.color=B.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(h.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(h.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(h.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,k=this.rows.splice(T,1)[0];k.clear(),this.rows.splice(this.currRow,0,k),this.logger.log(h.INFO,"Rolling up")},b.getDisplayText=function(T){T=T||!1;for(var k=[],N="",I=-1,W=0;W<_;W++){var K=this.rows[W].getTextString();K&&(I=W+1,T?k.push("Row "+I+": '"+K+"'"):k.push(K.trim()))}return k.length>0&&(T?N="["+k.join(" | ")+"]":N=k.join(`
`)),N},b.getTextAndFormat=function(){return this.rows},x}(),C=function(){function x(y,T,k){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(k),this.nonDisplayedMemory=new t(k),this.lastOutputScreen=new t(k),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}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[_-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(h.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 k=0;k<T.length;k++)this.writeScreen.insertChar(T[k]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(h.INFO,N+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(h.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},b.ccRCL=function(){this.logger.log(h.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},b.ccBS=function(){if(this.logger.log(h.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(h.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},b.ccRU=function(T){this.logger.log(h.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},b.ccFON=function(){this.logger.log(h.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},b.ccRDC=function(){this.logger.log(h.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},b.ccTR=function(){this.logger.log(h.INFO,"TR"),this.setMode("MODE_TEXT")},b.ccRTD=function(){this.logger.log(h.INFO,"RTD"),this.setMode("MODE_TEXT")},b.ccEDM=function(){this.logger.log(h.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},b.ccCR=function(){this.logger.log(h.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},b.ccENM=function(){this.logger.log(h.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},b.ccEOC=function(){if(this.logger.log(h.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(h.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},b.ccTO=function(T){this.logger.log(h.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},b.ccMIDROW=function(T){var k={flash:!1};if(k.underline=T%2===1,k.italics=T>=46,k.italics)k.foreground="white";else{var N=Math.floor(T/2)-16,I=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=I[N]}this.logger.log(h.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},b.outputDataUpdate=function(T){T===void 0&&(T=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),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}(),w=function(){function x(y,T,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new v;this.channels=[null,new C(y,T,N),new C(y+1,k,N)],this.cmdHistory=O(),this.logger=N}var b=x.prototype;return b.getHandler=function(T){return this.channels[T].getHandler()},b.setHandler=function(T,k){this.channels[T].setHandler(k)},b.addData=function(T,k){var N,I,W,K=!1;this.logger.time=T;for(var U=0;U<k.length;U+=2){if(I=k[U]&127,W=k[U+1]&127,I===0&&W===0)continue;if(this.logger.log(h.DATA,"["+g([k[U],k[U+1]])+"] -> ("+g([I,W])+")"),N=this.parseCmd(I,W),N||(N=this.parseMidrow(I,W)),N||(N=this.parsePAC(I,W)),N||(N=this.parseBackgroundAttributes(I,W)),!N&&(K=this.parseChars(I,W),K)){var z=this.currentChannel;if(z&&z>0){var B=this.channels[z];B.insertChars(K)}else this.logger.log(h.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!K&&this.logger.log(h.WARNING,"Couldn't parse cleaned data "+g([I,W])+" orig: "+g([k[U],k[U+1]]))}},b.parseCmd=function(T,k){var N=this.cmdHistory,I=(T===20||T===28||T===21||T===29)&&k>=32&&k<=47,W=(T===23||T===31)&&k>=33&&k<=35;if(!(I||W))return!1;if(L(T,k,N))return s(null,null,N),this.logger.log(h.DEBUG,"Repeated command ("+g([T,k])+") is dropped"),!0;var K=T===20||T===21||T===23?1:2,U=this.channels[K];return T===20||T===21||T===28||T===29?k===32?U.ccRCL():k===33?U.ccBS():k===34?U.ccAOF():k===35?U.ccAON():k===36?U.ccDER():k===37?U.ccRU(2):k===38?U.ccRU(3):k===39?U.ccRU(4):k===40?U.ccFON():k===41?U.ccRDC():k===42?U.ccTR():k===43?U.ccRTD():k===44?U.ccEDM():k===45?U.ccCR():k===46?U.ccENM():k===47&&U.ccEOC():U.ccTO(k-32),s(T,k,N),this.currentChannel=K,!0},b.parseMidrow=function(T,k){var N=0;if((T===17||T===25)&&k>=32&&k<=47){if(T===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(h.ERROR,"Mismatch channel in midrow parsing"),!1;var I=this.channels[N];return I?(I.ccMIDROW(k),this.logger.log(h.DEBUG,"MIDROW ("+g([T,k])+")"),!0):!1}return!1},b.parsePAC=function(T,k){var N,I=this.cmdHistory,W=(T>=17&&T<=23||T>=25&&T<=31)&&k>=64&&k<=127,K=(T===16||T===24)&&k>=64&&k<=95;if(!(W||K))return!1;if(L(T,k,I))return s(null,null,I),!0;var U=T<=23?1:2;k>=64&&k<=95?N=U===1?o[T]:n[T]:N=U===1?i[T]:u[T];var z=this.channels[U];return z?(z.setPAC(this.interpretPAC(N,k)),s(T,k,I),this.currentChannel=U,!0):!1},b.interpretPAC=function(T,k){var N,I={color:null,italics:!1,indent:null,underline:!1,row:T};return k>95?N=k-96:N=k-64,I.underline=(N&1)===1,N<=13?I.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(I.italics=!0,I.color="white"):I.indent=Math.floor((N-16)/2)*4,I},b.parseChars=function(T,k){var N,I=null,W=null;if(T>=25?(N=2,W=T-8):(N=1,W=T),W>=17&&W<=19){var K;W===17?K=k+80:W===18?K=k+112:K=k+144,this.logger.log(h.INFO,"Special char '"+f(K)+"' in channel "+N),I=[K]}else T>=32&&T<=127&&(I=k===0?[T]:[T,k]);if(I){var U=g(I);this.logger.log(h.DEBUG,"Char codes = "+U.join(",")),s(T,k,this.cmdHistory)}return I},b.parseBackgroundAttributes=function(T,k){var N=(T===16||T===24)&&k>=32&&k<=47,I=(T===23||T===31)&&k>=45&&k<=47;if(!(N||I))return!1;var W,K={};T===16||T===24?(W=Math.floor((k-32)/2),K.background=p[W],k%2===1&&(K.background=K.background+"_semi")):k===45?K.background="transparent":(K.foreground="black",k===47&&(K.underline=!0));var U=T<=23?1:2,z=this.channels[U];return z.setBkgData(K),s(T,k,this.cmdHistory),!0},b.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var k=this.channels[T];k&&k.reset()}this.cmdHistory=O()},b.cueSplitAtTime=function(T){for(var k=0;k<this.channels.length;k++){var N=this.channels[k];N&&N.cueSplitAtTime(T)}},x}();function s(x,b,y){y.a=x,y.b=b}function L(x,b,y){return y.a===x&&y.b===b}function O(){return{a:null,b:null}}m.default=w},"./src/utils/codecs.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"isCodecType",function(){return d}),S.d(m,"isCodecSupportedInMp4",function(){return f});var P={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 d(_,c){var o=P[c];return!!o&&o[_.slice(0,4)]===!0}function f(_,c){return MediaSource.isTypeSupported((c||"video")+'/mp4;codecs="'+_+'"')}},"./src/utils/cues.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/vttparser.ts"),d=S("./src/utils/webvtt-parser.ts"),f=S("./src/utils/texttrack-utils.ts"),_=/\s/,c={newCue:function(i,n,u,p){for(var h=[],v,g,E,a,l,t=self.VTTCue||self.TextTrackCue,C=0;C<p.rows.length;C++)if(v=p.rows[C],E=!0,a=0,l="",!v.isEmpty()){for(var w=0;w<v.chars.length;w++)_.test(v.chars[w].uchar)&&E?a++:(l+=v.chars[w].uchar,E=!1);v.cueStartTime=n,n===u&&(u+=1e-4),a>=16?a--:a++;var s=Object(P.fixLineBreaks)(l.trim()),L=Object(d.generateCueId)(n,u,s);(!i||!i.cues||!i.cues.getCueById(L))&&(g=new t(n,u,s),g.id=L,g.line=C+1,g.align="left",g.position=10+Math.min(80,Math.floor(a*8/32)*10),h.push(g))}return i&&h.length&&(h.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}),h.forEach(function(O){return Object(f.addCueToTrack)(i,O)})),h}};m.default=c},"./src/utils/discontinuities.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"findFirstFragWithCC",function(){return _}),S.d(m,"shouldAlignOnDiscontinuities",function(){return c}),S.d(m,"findDiscontinuousReferenceFrag",function(){return o}),S.d(m,"adjustSlidingStart",function(){return n}),S.d(m,"alignStream",function(){return u}),S.d(m,"alignPDT",function(){return h}),S.d(m,"alignFragmentByPDTDelta",function(){return v}),S.d(m,"alignMediaPlaylistByPDT",function(){return g});var P=S("./src/polyfills/number.ts"),d=S("./src/utils/logger.ts"),f=S("./src/controller/level-helper.ts");function _(E,a){for(var l=null,t=0,C=E.length;t<C;t++){var w=E[t];if(w&&w.cc===a){l=w;break}}return l}function c(E,a,l){return!!(a.details&&(l.endCC>l.startCC||E&&E.cc<l.startCC))}function o(E,a){var l=E.fragments,t=a.fragments;if(!t.length||!l.length){d.logger.log("No fragments to align");return}var C=_(l,t[0].cc);if(!C||C&&!C.startPTS){d.logger.log("No frag in previous level to align on");return}return C}function i(E,a){if(E){var l=E.start+a;E.start=E.startPTS=l,E.endPTS=l+E.duration}}function n(E,a){for(var l=a.fragments,t=0,C=l.length;t<C;t++)i(l[t],E);a.fragmentHint&&i(a.fragmentHint,E),a.alignedSliding=!0}function u(E,a,l){if(!a)return;p(E,l,a),!l.alignedSliding&&a.details&&h(l,a.details),!l.alignedSliding&&a.details&&!l.skippedSegments&&Object(f.adjustSliding)(a.details,l)}function p(E,a,l){if(c(E,l,a)){var t=o(l.details,a);t&&Object(P.isFiniteNumber)(t.start)&&(d.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),n(t.start,a))}}function h(E,a){if(!a.fragments.length||!E.hasProgramDateTime||!a.hasProgramDateTime)return;var l=a.fragments[0].programDateTime,t=E.fragments[0].programDateTime,C=(t-l)/1e3+a.fragments[0].start;C&&Object(P.isFiniteNumber)(C)&&(d.logger.log("Adjusting PTS using programDateTime delta "+(t-l)+"ms, sliding:"+C.toFixed(3)+" "+E.url+" "),n(C,E))}function v(E,a){var l=E.programDateTime;if(!l)return;var t=(l-a)/1e3;E.start=E.startPTS=t,E.endPTS=t+E.duration}function g(E,a){if(!a.fragments.length||!E.hasProgramDateTime||!a.hasProgramDateTime)return;var l=a.fragments[0].programDateTime,t=a.fragments[0].start,C=l-t*1e3;E.fragments.forEach(function(w){v(w,C)}),E.fragmentHint&&v(E.fragmentHint,C),E.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/ewma.ts"),d=function(){function f(c,o,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new P.default(c),this.fast_=new P.default(o)}var _=f.prototype;return _.update=function(o,i){var n=this.slow_,u=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new P.default(o,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==i&&(this.fast_=new P.default(i,u.getEstimate(),u.getTotalWeight()))},_.sample=function(o,i){o=Math.max(o,this.minDelayMs_);var n=8*i,u=o/1e3,p=n/u;this.fast_.sample(u,p),this.slow_.sample(u,p)},_.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},f}();m.default=d},"./src/utils/ewma.ts":function(D,m,S){"use strict";S.r(m);var P=function(){function d(_,c,o){c===void 0&&(c=0),o===void 0&&(o=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=c,this.totalWeight_=o}var f=d.prototype;return f.sample=function(c,o){var i=Math.pow(this.alpha_,c);this.estimate_=o*(1-i)+i*this.estimate_,this.totalWeight_+=c},f.getTotalWeight=function(){return this.totalWeight_},f.getEstimate=function(){if(this.alpha_){var c=1-Math.pow(this.alpha_,this.totalWeight_);if(c)return this.estimate_/c}return this.estimate_},d}();m.default=P},"./src/utils/fetch-loader.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"fetchSupported",function(){return v});var P=S("./src/polyfills/number.ts"),d=S("./src/loader/load-stats.ts"),f=S("./src/demux/chunk-cache.ts");function _(t,C){t.prototype=Object.create(C.prototype),t.prototype.constructor=t,u(t,C)}function c(t){var C=typeof Map=="function"?new Map:void 0;return c=function(s){if(s===null||!n(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C!="undefined"){if(C.has(s))return C.get(s);C.set(s,L)}function L(){return o(s,arguments,p(this).constructor)}return L.prototype=Object.create(s.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),u(L,s)},c(t)}function o(t,C,w){return i()?o=Reflect.construct:o=function(L,O,x){var b=[null];b.push.apply(b,O);var y=Function.bind.apply(L,b),T=new y;return x&&u(T,x.prototype),T},o.apply(null,arguments)}function i(){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 n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function u(t,C){return u=Object.setPrototypeOf||function(s,L){return s.__proto__=L,s},u(t,C)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},p(t)}function h(){return h=Object.assign||function(t){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var s in w)Object.prototype.hasOwnProperty.call(w,s)&&(t[s]=w[s])}return t},h.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(w){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=w.fetchSetup||a,this.controller=new self.AbortController,this.stats=new d.LoadStats}var C=t.prototype;return C.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},C.abortInternal=function(){var s=this.response;(!s||!s.ok)&&(this.stats.aborted=!0,this.controller.abort())},C.abort=function(){var s;this.abortInternal(),(s=this.callbacks)!==null&&s!==void 0&&s.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},C.load=function(s,L,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(s,this.controller.signal),T=O.onProgress,k=s.responseType==="arraybuffer",N=k?"byteLength":"length";this.context=s,this.config=L,this.callbacks=O,this.request=this.fetchSetup(s,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){x.abortInternal(),O.onTimeout(b,s,x.response)},L.timeout),self.fetch(this.request).then(function(I){if(x.response=x.loader=I,!I.ok){var W=I.status,K=I.statusText;throw new l(K||"fetch, bad network response",W,I)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(I.headers.get("Content-Length")||"0"),T&&Object(P.isFiniteNumber)(L.highWaterMark)?x.loadProgressively(I,b,s,L.highWaterMark,T):k?I.arrayBuffer():I.text()}).then(function(I){var W=x.response;self.clearTimeout(x.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=I[N];var K={url:W.url,data:I};T&&!Object(P.isFiniteNumber)(L.highWaterMark)&&T(b,s,I,W),O.onSuccess(K,b,s,W)}).catch(function(I){if(self.clearTimeout(x.requestTimeout),b.aborted)return;var W=I.code||0;O.onError({code:W,text:I.message},s,I.details)})},C.getCacheAge=function(){var s=null;if(this.response){var L=this.response.headers.get("age");s=L?parseFloat(L):null}return s},C.loadProgressively=function(s,L,O,x,b){x===void 0&&(x=0);var y=new f.default,T=s.body.getReader(),k=function N(){return T.read().then(function(I){if(I.done)return y.dataLength&&b(L,O,y.flush(),s),Promise.resolve(new ArrayBuffer(0));var W=I.value,K=W.length;return L.loaded+=K,K<x||y.dataLength?(y.push(W),y.dataLength>=x&&b(L,O,y.flush(),s)):b(L,O,W,s),N()}).catch(function(){return Promise.reject()})};return k()},t}();function E(t,C){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:C,headers:new self.Headers(h({},t.headers))};return t.rangeEnd&&w.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),w}function a(t,C){return new self.Request(t.url,C)}var l=function(t){_(C,t);function C(w,s,L){var O;return O=t.call(this,w)||this,O.code=void 0,O.details=void 0,O.code=s,O.details=L,O}return C}(c(Error));m.default=g},"./src/utils/imsc1-ttml-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"IMSC1_CODEC",function(){return n}),S.d(m,"parseIMSC1",function(){return v});var P=S("./src/utils/mp4-tools.ts"),d=S("./src/utils/vttparser.ts"),f=S("./src/utils/vttcue.ts"),_=S("./src/demux/id3.ts"),c=S("./src/utils/timescale-conversion.ts"),o=S("./src/utils/webvtt-parser.ts");function i(){return i=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},i.apply(this,arguments)}var n="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,h={left:"start",center:"center",right:"end",start:"start",end:"end"};function v(x,b,y,T,k){var N=Object(P.findBox)(new Uint8Array(x),["mdat"]);if(N.length===0){k(new Error("Could not parse IMSC1 mdat"));return}var I=N[0],W=Object(_.utf8ArrayToStr)(new Uint8Array(x,I.start,I.end-I.start)),K=Object(c.toTimescaleFromScale)(b,1,y);try{T(g(W,K))}catch(U){k(U)}}function g(x,b){var y=new DOMParser,T=y.parseFromString(x,"text/xml"),k=T.getElementsByTagName("tt")[0];if(!k)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},I=Object.keys(N).reduce(function(B,H){return B[H]=k.getAttribute("ttp:"+H)||N[H],B},{}),W=k.getAttribute("xml:space")!=="preserve",K=a(E(k,"styling","style")),U=a(E(k,"layout","region")),z=E(k,"body","[begin]");return[].map.call(z,function(B){var H=l(B,W);if(!H||!B.hasAttribute("begin"))return null;var G=s(B.getAttribute("begin"),I),ee=s(B.getAttribute("dur"),I),ie=s(B.getAttribute("end"),I);if(G===null)throw w(B);if(ie===null){if(ee===null)throw w(B);ie=G+ee}var ue=new f.default(G-b,ie-b,H);ue.id=Object(o.generateCueId)(ue.startTime,ue.endTime,ue.text);var xe=U[B.getAttribute("region")],Te=K[B.getAttribute("style")];ue.position=10,ue.size=80;var se=t(xe,Te),ve=se.textAlign;if(ve){var de=h[ve];de&&(ue.lineAlign=de),ue.align=ve}return i(ue,se),ue}).filter(function(B){return B!==null})}function E(x,b,y){var T=x.getElementsByTagName(b)[0];return T?[].slice.call(T.querySelectorAll(y)):[]}function a(x){return x.reduce(function(b,y){var T=y.getAttribute("xml:id");return T&&(b[T]=y),b},{})}function l(x,b){return[].slice.call(x.childNodes).reduce(function(y,T,k){var N;return T.nodeName==="br"&&k?y+`
`:(N=T.childNodes)!==null&&N!==void 0&&N.length?l(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(k,N){var I=C(b,y,N)||C(x,y,N);return I&&(k[N]=I),k},{})}function C(x,b,y){return x.hasAttributeNS(b,y)?x.getAttributeNS(b,y):null}function w(x){return new Error("Could not parse ttml timestamp "+x)}function s(x,b){if(!x)return null;var y=Object(d.parseTimeStamp)(x);return y===null&&(u.test(x)?y=L(x,b):p.test(x)&&(y=O(x,b))),y}function L(x,b){var y=u.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=p.exec(x),T=Number(y[1]),k=y[2];switch(k){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(D,m,S){"use strict";S.r(m),S.d(m,"enableLogs",function(){return o}),S.d(m,"logger",function(){return i});var P=function(){},d={trace:P,debug:P,log:P,warn:P,info:P,error:P},f=d;function _(n){var u=self.console[n];return u?u.bind(self.console,"["+n+"] >"):P}function c(n){for(var u=arguments.length,p=new Array(u>1?u-1:0),h=1;h<u;h++)p[h-1]=arguments[h];p.forEach(function(v){f[v]=n[v]?n[v].bind(n):_(v)})}function o(n){if(self.console&&n===!0||typeof n=="object"){c(n,"debug","log","info","warn","error");try{f.log()}catch(u){f=d}}else f=d}var i=f},"./src/utils/mediakeys-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"KeySystems",function(){return P}),S.d(m,"requestMediaKeySystemAccess",function(){return d});var P;(function(f){f.WIDEVINE="com.widevine.alpha",f.PLAYREADY="com.microsoft.playready"})(P||(P={}));var d=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"getMediaSource",function(){return P});function P(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"bin2str",function(){return c}),S.d(m,"readUint16",function(){return o}),S.d(m,"readUint32",function(){return i}),S.d(m,"writeUint32",function(){return n}),S.d(m,"findBox",function(){return u}),S.d(m,"parseSegmentIndex",function(){return p}),S.d(m,"parseInitSegment",function(){return h}),S.d(m,"getStartDTS",function(){return v}),S.d(m,"getDuration",function(){return g}),S.d(m,"computeRawDurationFromSamples",function(){return E}),S.d(m,"offsetStartDTS",function(){return a}),S.d(m,"segmentValidRange",function(){return l}),S.d(m,"appendUint8Array",function(){return t});var P=S("./src/utils/typed-array.ts"),d=S("./src/loader/fragment.ts"),f=Math.pow(2,32)-1,_=[].push;function c(C){return String.fromCharCode.apply(null,C)}function o(C,w){"data"in C&&(w+=C.start,C=C.data);var s=C[w]<<8|C[w+1];return s<0?65536+s:s}function i(C,w){"data"in C&&(w+=C.start,C=C.data);var s=C[w]<<24|C[w+1]<<16|C[w+2]<<8|C[w+3];return s<0?4294967296+s:s}function n(C,w,s){"data"in C&&(w+=C.start,C=C.data),C[w]=s>>24,C[w+1]=s>>16&255,C[w+2]=s>>8&255,C[w+3]=s&255}function u(C,w){var s=[];if(!w.length)return s;var L,O,x;"data"in C?(L=C.data,O=C.start,x=C.end):(L=C,O=0,x=L.byteLength);for(var b=O;b<x;){var y=i(L,b),T=c(L.subarray(b+4,b+8)),k=y>1?b+y:x;if(T===w[0])if(w.length===1)s.push({data:L,start:b+8,end:k});else{var N=u({data:L,start:b+8,end:k},w.slice(1));N.length&&_.apply(s,N)}b=k}return s}function p(C){var w=u(C,["moov"]),s=w[0],L=s?s.end:null,O=u(C,["sidx"]);if(!O||!O[0])return null;var x=[],b=O[0],y=b.data[0],T=y===0?8:16,k=i(b,T);T+=4;var N=0,I=0;y===0?T+=8:T+=16,T+=2;var W=b.end+I,K=o(b,T);T+=2;for(var U=0;U<K;U++){var z=T,B=i(b,z);z+=4;var H=B&2147483647,G=(B&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=i(b,z);z+=4,x.push({referenceSize:H,subsegmentDuration:ee,info:{duration:ee/k,start:W,end:W+H-1}}),W+=H,z+=4,T=z}return{earliestPresentationTime:N,timescale:k,version:y,referencesCount:K,references:x,moovEndOffset:L}}function h(C){for(var w=[],s=u(C,["moov","trak"]),L=0;L<s.length;L++){var O=s[L],x=u(O,["tkhd"])[0];if(x){var b=x.data[x.start],y=b===0?12:20,T=i(x,y),k=u(O,["mdia","mdhd"])[0];if(k){b=k.data[k.start],y=b===0?12:20;var N=i(k,y),I=u(O,["mdia","hdlr"])[0];if(I){var W=c(I.data.subarray(I.start+8,I.start+12)),K={soun:d.ElementaryStreamTypes.AUDIO,vide:d.ElementaryStreamTypes.VIDEO}[W];if(K){var U=u(O,["mdia","minf","stbl","stsd"])[0],z=void 0;U&&(z=c(U.data.subarray(U.start+12,U.start+16))),w[T]={timescale:N,type:K},w[K]={timescale:N,id:T,codec:z}}}}}}var B=u(C,["moov","mvex","trex"]);return B.forEach(function(H){var G=i(H,4),ee=w[G];ee&&(ee.default={duration:i(H,12),flags:i(H,20)})}),w}function v(C,w){return u(w,["moof","traf"]).reduce(function(s,L){var O=u(L,["tfdt"])[0],x=O.data[O.start],b=u(L,["tfhd"]).reduce(function(y,T){var k=i(T,4),N=C[k];if(N){var I=i(O,4);x===1&&(I*=Math.pow(2,32),I+=i(O,8));var W=N.timescale||9e4,K=I/W;if(isFinite(K)&&(y===null||K<y))return K}return y},null);return b!==null&&isFinite(b)&&(s===null||b<s)?b:s},null)||0}function g(C,w){for(var s=0,L=0,O=0,x=u(C,["moof","traf"]),b=0;b<x.length;b++){var y=x[b],T=u(y,["tfhd"])[0],k=i(T,4),N=w[k];if(!N)continue;var I=N.default,W=i(T,0)|(I==null?void 0:I.flags),K=I==null?void 0:I.duration;W&8&&(W&2?K=i(T,12):K=i(T,8));for(var U=N.timescale||9e4,z=u(y,["trun"]),B=0;B<z.length;B++){if(K){var H=i(z[B],4);s=K*H}else s=E(z[B]);N.type===d.ElementaryStreamTypes.VIDEO?L+=s/U:N.type===d.ElementaryStreamTypes.AUDIO&&(O+=s/U)}}if(L===0&&O===0){var G=p(C);if(G!=null&&G.references)return G.references.reduce(function(ee,ie){return ee+ie.info.duration||0},0)}return L||O}function E(C){var w=i(C,0),s=8;w&1&&(s+=4),w&4&&(s+=4);for(var L=0,O=i(C,4),x=0;x<O;x++){if(w&256){var b=i(C,s);L+=b,s+=4}w&512&&(s+=4),w&1024&&(s+=4),w&2048&&(s+=4)}return L}function a(C,w,s){u(w,["moof","traf"]).forEach(function(L){u(L,["tfhd"]).forEach(function(O){var x=i(O,4),b=C[x];if(!b)return;var y=b.timescale||9e4;u(L,["tfdt"]).forEach(function(T){var k=T.data[T.start],N=i(T,4);if(k===0)n(T,4,N-s*y);else{N*=Math.pow(2,32),N+=i(T,8),N-=s*y,N=Math.max(N,0);var I=Math.floor(N/(f+1)),W=Math.floor(N%(f+1));n(T,4,I),n(T,8,W)}})})})}function l(C){var w={valid:null,remainder:null},s=u(C,["moof"]);if(s){if(s.length<2)return w.remainder=C,w}else return w;var L=s[s.length-1];return w.valid=Object(P.sliceUint8)(C,0,L.start-8),w.remainder=Object(P.sliceUint8)(C,L.start-8),w}function t(C,w){var s=new Uint8Array(C.length+w.length);return s.set(C),s.set(w,C.length),s}},"./src/utils/output-filter.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"default",function(){return P});var P=function(){function d(_,c){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=_,this.trackName=c}var f=d.prototype;return f.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},f.newCue=function(c,o,i){(this.startTime===null||this.startTime>c)&&(this.startTime=c),this.endTime=o,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},f.reset=function(){this.cueRanges=[]},d}()},"./src/utils/texttrack-utils.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"sendAddTrackEvent",function(){return d}),S.d(m,"addCueToTrack",function(){return f}),S.d(m,"clearCurrentCues",function(){return _}),S.d(m,"removeCuesInRange",function(){return c}),S.d(m,"getCuesInRange",function(){return i});var P=S("./src/utils/logger.ts");function d(n,u){var p;try{p=new Event("addtrack")}catch(h){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=n,u.dispatchEvent(p)}function f(n,u){var p=n.mode;if(p==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(u.id))try{if(n.addCue(u),!n.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(v){P.logger.debug("[texttrack-utils]: "+v);var h=new self.TextTrackCue(u.startTime,u.endTime,u.text);h.id=u.id,n.addCue(h)}p==="disabled"&&(n.mode=p)}function _(n){var u=n.mode;if(u==="disabled"&&(n.mode="hidden"),n.cues)for(var p=n.cues.length;p--;)n.removeCue(n.cues[p]);u==="disabled"&&(n.mode=u)}function c(n,u,p){var h=n.mode;if(h==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var v=i(n.cues,u,p),g=0;g<v.length;g++)n.removeCue(v[g]);h==="disabled"&&(n.mode=h)}function o(n,u){if(u<n[0].startTime)return 0;var p=n.length-1;if(u>n[p].endTime)return-1;for(var h=0,v=p;h<=v;){var g=Math.floor((v+h)/2);if(u<n[g].startTime)v=g-1;else if(u>n[g].startTime&&h<p)h=g+1;else return g}return n[h].startTime-u<u-n[v].startTime?h:v}function i(n,u,p){var h=[],v=o(n,u);if(v>-1)for(var g=v,E=n.length;g<E;g++){var a=n[g];if(a.startTime>=u&&a.endTime<=p)h.push(a);else if(a.startTime>p)return h}return h}},"./src/utils/time-ranges.ts":function(D,m,S){"use strict";S.r(m);var P={toString:function(f){for(var _="",c=f.length,o=0;o<c;o++)_+="["+f.start(o).toFixed(3)+","+f.end(o).toFixed(3)+"]";return _}};m.default=P},"./src/utils/timescale-conversion.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"toTimescaleFromBase",function(){return d}),S.d(m,"toTimescaleFromScale",function(){return f}),S.d(m,"toMsFromMpegTsClock",function(){return _}),S.d(m,"toMpegTsClockFromTimescale",function(){return c});var P=9e4;function d(o,i,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var p=o*i*n;return u?Math.round(p):p}function f(o,i,n,u){return n===void 0&&(n=1),u===void 0&&(u=!1),d(o,i,1/n,u)}function _(o,i){return i===void 0&&(i=!1),d(o,1e3,1/P,i)}function c(o,i){return i===void 0&&(i=1),d(o,P,1/i)}},"./src/utils/typed-array.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"sliceUint8",function(){return P});function P(d,f,_){return Uint8Array.prototype.slice?d.slice(f,_):new Uint8Array(Array.prototype.slice.call(d,f,_))}},"./src/utils/vttcue.ts":function(D,m,S){"use strict";S.r(m),m.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var P=["","lr","rl"],d=["start","middle","end","left","right"];function f(n,u){if(typeof u!="string")return!1;if(!Array.isArray(n))return!1;var p=u.toLowerCase();return~n.indexOf(p)?p:!1}function _(n){return f(P,n)}function c(n){return f(d,n)}function o(n){for(var u=arguments.length,p=new Array(u>1?u-1:0),h=1;h<u;h++)p[h-1]=arguments[h];for(var v=1;v<arguments.length;v++){var g=arguments[v];for(var E in g)n[E]=g[E]}return n}function i(n,u,p){var h=this,v={enumerable:!0};h.hasBeenReset=!1;var g="",E=!1,a=n,l=u,t=p,C=null,w="",s=!0,L="auto",O="start",x=50,b="middle",y=50,T="middle";Object.defineProperty(h,"id",o({},v,{get:function(){return g},set:function(N){g=""+N}})),Object.defineProperty(h,"pauseOnExit",o({},v,{get:function(){return E},set:function(N){E=!!N}})),Object.defineProperty(h,"startTime",o({},v,{get:function(){return a},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");a=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",o({},v,{get:function(){return l},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");l=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",o({},v,{get:function(){return t},set:function(N){t=""+N,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",o({},v,{get:function(){return C},set:function(N){C=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",o({},v,{get:function(){return w},set:function(N){var I=_(N);if(I===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=I,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",o({},v,{get:function(){return s},set:function(N){s=!!N,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",o({},v,{get:function(){return L},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",o({},v,{get:function(){return O},set:function(N){var I=c(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");O=I,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",o({},v,{get:function(){return x},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");x=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",o({},v,{get:function(){return b},set:function(N){var I=c(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");b=I,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",o({},v,{get:function(){return y},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");y=N,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",o({},v,{get:function(){return T},set:function(N){var I=c(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");T=I,this.hasBeenReset=!0}})),h.displayState=void 0}return i.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},i}()},"./src/utils/vttparser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"parseTimeStamp",function(){return f}),S.d(m,"fixLineBreaks",function(){return u}),S.d(m,"VTTParser",function(){return p});var P=S("./src/utils/vttcue.ts"),d=function(){function h(){}var v=h.prototype;return v.decode=function(E,a){if(!E)return"";if(typeof E!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(E))},h}();function f(h){function v(E,a,l,t){return(E|0)*3600+(a|0)*60+(l|0)+parseFloat(t||0)}var g=h.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 _=function(){function h(){this.values=Object.create(null)}var v=h.prototype;return v.set=function(E,a){!this.get(E)&&a!==""&&(this.values[E]=a)},v.get=function(E,a,l){return l?this.has(E)?this.values[E]:a[l]:this.has(E)?this.values[E]:a},v.has=function(E){return E in this.values},v.alt=function(E,a,l){for(var t=0;t<l.length;++t)if(a===l[t]){this.set(E,a);break}},v.integer=function(E,a){/^-?\d+$/.test(a)&&this.set(E,parseInt(a,10))},v.percent=function(E,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var l=parseFloat(a);if(l>=0&&l<=100)return this.set(E,l),!0}return!1},h}();function c(h,v,g,E){var a=E?h.split(E):[h];for(var l in a){if(typeof a[l]!="string")continue;var t=a[l].split(g);if(t.length!==2)continue;var C=t[0],w=t[1];v(C,w)}}var o=new P.default(0,0,""),i=o.align==="middle"?"middle":"center";function n(h,v,g){var E=h;function a(){var C=f(h);if(C===null)throw new Error("Malformed timestamp: "+E);return h=h.replace(/^[^\sa-zA-Z-]+/,""),C}function l(C,w){var s=new _;c(C,function(x,b){var y;switch(x){case"region":for(var T=g.length-1;T>=0;T--)if(g[T].id===b){s.set(x,g[T].region);break}break;case"vertical":s.alt(x,b,["rl","lr"]);break;case"line":y=b.split(","),s.integer(x,y[0]),s.percent(x,y[0])&&s.set("snapToLines",!1),s.alt(x,y[0],["auto"]),y.length===2&&s.alt("lineAlign",y[1],["start",i,"end"]);break;case"position":y=b.split(","),s.percent(x,y[0]),y.length===2&&s.alt("positionAlign",y[1],["start",i,"end","line-left","line-right","auto"]);break;case"size":s.percent(x,b);break;case"align":s.alt(x,b,["start",i,"end","left","right"]);break}},/:/,/\s/),w.region=s.get("region",null),w.vertical=s.get("vertical","");var L=s.get("line","auto");L==="auto"&&o.line===-1&&(L=-1),w.line=L,w.lineAlign=s.get("lineAlign","start"),w.snapToLines=s.get("snapToLines",!0),w.size=s.get("size",100),w.align=s.get("align",i);var O=s.get("position","auto");O==="auto"&&o.position===50&&(O=w.align==="start"||w.align==="left"?0:w.align==="end"||w.align==="right"?100:50),w.position=O}function t(){h=h.replace(/^\s+/,"")}if(t(),v.startTime=a(),t(),h.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+E);h=h.substr(3),t(),v.endTime=a(),t(),l(h,v)}function u(h){return h.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function h(){this.state="INITIAL",this.buffer="",this.decoder=new d,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var v=h.prototype;return v.parse=function(E){var a=this;E&&(a.buffer+=a.decoder.decode(E,{stream:!0}));function l(){var O=a.buffer,x=0;for(O=u(O);x<O.length&&O[x]!=="\r"&&O[x]!==`
`;)++x;var b=O.substr(0,x);return O[x]==="\r"&&++x,O[x]===`
`&&++x,a.buffer=O.substr(x),b}function t(O){c(O,function(x,b){},/:/)}try{var C="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;C=l();var w=C.match(/^()?WEBVTT([ \t].*)?$/);if(!w||!w[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var s=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;s?s=!1:C=l();switch(a.state){case"HEADER":/:/.test(C)?t(C):C||(a.state="ID");continue;case"NOTE":C||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(C)){a.state="NOTE";break}if(!C)continue;if(a.cue=new P.default(0,0,""),a.state="CUE",C.indexOf("-->")===-1){a.cue.id=C;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{n(C,a.cue,a.regionList)}catch(O){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var L=C.indexOf("-->")!==-1;if(!C||L&&(s=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
`),a.cue.text+=C}continue;case"BADCUE":C||(a.state="ID")}}}catch(O){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.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(a){E.onparsingerror&&E.onparsingerror(a)}return E.onflush&&E.onflush(),this},h}()},"./src/utils/webvtt-parser.ts":function(D,m,S){"use strict";S.r(m),S.d(m,"generateCueId",function(){return p}),S.d(m,"parseWebVTT",function(){return v});var P=S("./src/polyfills/number.ts"),d=S("./src/utils/vttparser.ts"),f=S("./src/demux/id3.ts"),_=S("./src/utils/timescale-conversion.ts"),c=S("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,i=function(E,a,l){return l===void 0&&(l=0),E.substr(l,a.length)===a},n=function(E){var a=parseInt(E.substr(-3)),l=parseInt(E.substr(-6,2)),t=parseInt(E.substr(-9,2)),C=E.length>9?parseInt(E.substr(0,E.indexOf(":"))):0;if(!Object(P.isFiniteNumber)(a)||!Object(P.isFiniteNumber)(l)||!Object(P.isFiniteNumber)(t)||!Object(P.isFiniteNumber)(C))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+E);return a+=1e3*l,a+=60*1e3*t,a+=60*60*1e3*C,a},u=function(E){for(var a=5381,l=E.length;l;)a=a*33^E.charCodeAt(--l);return(a>>>0).toString()};function p(g,E,a){return u(g.toString())+u(E.toString())+u(a)}var h=function(E,a,l){var t=E[a],C=E[t.prevCC];if(!C||!C.new&&t.new){E.ccOffset=E.presentationOffset=t.start,t.new=!1;return}for(;(w=C)!==null&&w!==void 0&&w.new;){var w;E.ccOffset+=t.start-C.start,t.new=!1,t=C,C=E[t.prevCC]}E.presentationOffset=l};function v(g,E,a,l,t,C,w,s){var L=new d.VTTParser,O=Object(f.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(o,`
`).split(`
`),x=[],b=Object(_.toMpegTsClockFromTimescale)(E,a),y="00:00.000",T=0,k=0,N,I=!0,W=!1;L.oncue=function(K){var U=l[t],z=l.ccOffset,B=(T-b)/9e4;if(U!=null&&U.new&&(k!==void 0?z=l.ccOffset=U.start:h(l,t,B)),B&&(z=B-l.presentationOffset),W){var H=K.endTime-K.startTime,G=Object(c.normalizePts)((K.startTime+z-k)*9e4,C*9e4)/9e4;K.startTime=G,K.endTime=G+H}var ee=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(ee)),K.id||(K.id=p(K.startTime,K.endTime,ee)),K.endTime>0&&x.push(K)},L.onparsingerror=function(K){N=K},L.onflush=function(){if(N){s(N);return}w(x)},O.forEach(function(K){if(I)if(i(K,"X-TIMESTAMP-MAP=")){I=!1,W=!0,K.substr(16).split(",").forEach(function(U){i(U,"LOCAL:")?y=U.substr(6):i(U,"MPEGTS:")&&(T=parseInt(U.substr(7)))});try{k=n(y)/1e3}catch(U){W=!1,N=U}return}else K===""&&(I=!1);L.parse(K+`
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(D,m,S){"use strict";S.r(m);var P=S("./src/utils/logger.ts"),d=S("./src/loader/load-stats.ts"),f=/^age:\s*[\d.]+\s*$/m,_=function(){function c(i){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=i?i.xhrSetup:null,this.stats=new d.LoadStats,this.retryDelay=0}var o=c.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},o.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(n,u,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=u,this.callbacks=p,this.retryDelay=u.retryDelay,this.loadInternal()},o.loadInternal=function(){var n=this.config,u=this.context;if(!n)return;var p=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0;var v=this.xhrSetup;try{if(v)try{v(p,u.url)}catch(a){p.open("GET",u.url,!0),v(p,u.url)}p.readyState||p.open("GET",u.url,!0);var g=this.context.headers;if(g)for(var E in g)p.setRequestHeader(E,g[E])}catch(a){this.callbacks.onError({code:p.status,text:a.message},u,p);return}u.rangeEnd&&p.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),p.send()},o.readystatechange=function(){var n=this.context,u=this.loader,p=this.stats;if(!n||!u)return;var h=u.readyState,v=this.config;if(p.aborted)return;if(h>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),h===4){u.onreadystatechange=null,u.onprogress=null;var g=u.status;if(g>=200&&g<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var E,a;if(n.responseType==="arraybuffer"?(E=u.response,a=E.byteLength):(E=u.responseText,a=E.length),p.loaded=p.total=a,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(p,n,E,u),!this.callbacks)return;var t={url:u.responseURL,data:E};this.callbacks.onSuccess(t,p,n,u)}else p.retry>=v.maxRetry||g>=400&&g<499?(P.logger.error(g+" while loading "+n.url),this.callbacks.onError({code:g,text:u.statusText},n,u)):(P.logger.warn(g+" while loading "+n.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),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout)},o.loadtimeout=function(){P.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(n){var u=this.stats;u.loaded=n.loaded,n.lengthComputable&&(u.total=n.total)},o.getCacheAge=function(){var n=null;if(this.loader&&f.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");n=u?parseFloat(u):null}return n},c}();m.default=_}}).default})},vHTk:function(j,Y,M){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.StreamCipher,d=m.algo,f=d.RC4=P.extend({_doReset:function(){for(var o=this._key,i=o.words,n=o.sigBytes,u=this._S=[],p=0;p<256;p++)u[p]=p;for(var p=0,h=0;p<256;p++){var v=p%n,g=i[v>>>2]>>>24-v%4*8&255;h=(h+u[p]+g)%256;var E=u[p];u[p]=u[h],u[h]=E}this._i=this._j=0},_doProcessBlock:function(o,i){o[i]^=_.call(this)},keySize:256/32,ivSize:0});function _(){for(var o=this._S,i=this._i,n=this._j,u=0,p=0;p<4;p++){i=(i+1)%256,n=(n+o[i])%256;var h=o[i];o[i]=o[n],o[n]=h,u|=o[(o[i]+o[n])%256]<<24-p*8}return this._i=i,this._j=n,u}m.RC4=P._createHelper(f);var c=d.RC4Drop=f.extend({cfg:f.cfg.extend({drop:192}),_doReset:function(){f._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)_.call(this)}});m.RC4Drop=P._createHelper(c)}(),D.RC4})},wCXF:function(j,Y,M){"use strict";M.d(Y,"a",function(){return Ve});var D=M("rePB"),m=M("VTBJ"),S=M("KQm4"),P=M("U8pU"),d=M("ODXe"),f=M("cDcd"),_=M("TSYQ"),c=M.n(_),o=M("Gytx"),i=M.n(o),n=M("Kwbf"),u=M("t23M"),p=M("qx4F"),h=M("6eGT"),v=M("IBYe"),g=M("Ff2n"),E=M("c+Xe"),a=M("fyJ8"),l=M("biw7");function t(Me,Se,Ye,it,Ke){var qe=Ye[Me]||{},ke=Ye[Se]||{},Oe,Re;qe.fixed==="left"?Oe=it.left[Me]:ke.fixed==="right"&&(Re=it.right[Se]);var pe=!1,Ee=!1,we=!1,De=!1,Ge=Ye[Se+1],nt=Ye[Me-1];if(Ke==="rtl"){if(Oe!==void 0){var lt=nt&&nt.fixed==="left";De=!lt}else if(Re!==void 0){var ut=Ge&&Ge.fixed==="right";we=!ut}}else if(Oe!==void 0){var Rt=Ge&&Ge.fixed==="left";pe=!Rt}else if(Re!==void 0){var tt=nt&&nt.fixed==="right";Ee=!tt}return{fixLeft:Oe,fixRight:Re,lastFixLeft:pe,firstFixRight:Ee,lastFixRight:we,firstFixLeft:De,isSticky:it.isSticky}}var C=M("sR1s");function w(Me){var Se=Me.cells,Ye=Me.stickyOffsets,it=Me.flattenColumns,Ke=Me.rowComponent,qe=Me.cellComponent,ke=Me.onHeaderRow,Oe=Me.index,Re=f.useContext(l.a),pe=Re.prefixCls,Ee=Re.direction,we;ke&&(we=ke(Se.map(function(Ge){return Ge.column}),Oe));var De=Object(C.a)(Se.map(function(Ge){return Ge.column}));return f.createElement(Ke,Object.assign({},we),Se.map(function(Ge,nt){var lt=Ge.column,ut=t(Ge.colStart,Ge.colEnd,it,Ye,Ee),Rt;return lt&&lt.onHeaderCell&&(Rt=Ge.column.onHeaderCell(lt)),f.createElement(a.a,Object.assign({},Ge,{ellipsis:lt.ellipsis,align:lt.align,component:qe,prefixCls:pe,key:De[nt]},ut,{additionalProps:Rt,rowType:"header"}))}))}w.displayName="HeaderRow";var s=w;function L(Me){var Se=[];function Ye(ke,Oe){var Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Se[Re]=Se[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},Ge=1,nt=we.children;return nt&&nt.length>0&&(Ge=Ye(nt,pe,Re+1).reduce(function(lt,ut){return lt+ut},0),De.hasSubColumns=!0),"colSpan"in we&&(Ge=we.colSpan),"rowSpan"in we&&(De.rowSpan=we.rowSpan),De.colSpan=Ge,De.colEnd=De.colStart+Ge-1,Se[Re].push(De),pe+=Ge,Ge});return Ee}Ye(Me,0);for(var it=Se.length,Ke=function(Oe){Se[Oe].forEach(function(Re){!("rowSpan"in Re)&&!Re.hasSubColumns&&(Re.rowSpan=it-Oe)})},qe=0;qe<it;qe+=1)Ke(qe);return Se}function O(Me){var Se=Me.stickyOffsets,Ye=Me.columns,it=Me.flattenColumns,Ke=Me.onHeaderRow,qe=f.useContext(l.a),ke=qe.prefixCls,Oe=qe.getComponent,Re=f.useMemo(function(){return L(Ye)},[Ye]),pe=Oe(["header","wrapper"],"thead"),Ee=Oe(["header","row"],"tr"),we=Oe(["header","cell"],"th");return f.createElement(pe,{className:"".concat(ke,"-thead")},Re.map(function(De,Ge){var nt=f.createElement(s,{key:Ge,flattenColumns:it,cells:De,stickyOffsets:Se,rowComponent:Ee,cellComponent:we,onHeaderRow:Ke,index:Ge});return nt}))}var x=O,b=M("hW8S");function y(Me){for(var Se=Me.colWidths,Ye=Me.columns,it=Me.columCount,Ke=[],qe=it||Ye.length,ke=!1,Oe=qe-1;Oe>=0;Oe-=1){var Re=Se[Oe],pe=Ye&&Ye[Oe],Ee=pe&&pe[b.a];(Re||Ee||ke)&&(Ke.unshift(f.createElement("col",Object.assign({key:Oe,style:{width:Re,minWidth:Re}},Ee))),ke=!0)}return f.createElement("colgroup",null,Ke)}var T=y;function k(Me,Se){return Object(f.useMemo)(function(){for(var Ye=[],it=0;it<Se;it+=1){var Ke=Me[it];if(Ke!==void 0)Ye[it]=Ke;else return null}return Ye},[Me.join("_"),Se])}var N=f.forwardRef(function(Me,Se){var Ye=Me.noData,it=Me.columns,Ke=Me.flattenColumns,qe=Me.colWidths,ke=Me.columCount,Oe=Me.stickyOffsets,Re=Me.direction,pe=Me.fixHeader,Ee=Me.offsetHeader,we=Me.stickyClassName,De=Me.onScroll,Ge=Object(g.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),nt=f.useContext(l.a),lt=nt.prefixCls,ut=nt.scrollbarSize,Rt=nt.isSticky,tt=Rt&&!pe?0:ut,nr=f.useRef(null),Wt=f.useCallback(function(Qr){Object(E.b)(Se,Qr),Object(E.b)(nr,Qr)},[]);f.useEffect(function(){var Qr;function Br(Cr){var cn=Cr.currentTarget,wn=Cr.deltaX;wn&&(De({currentTarget:cn,scrollLeft:cn.scrollLeft+wn}),Cr.preventDefault())}return(Qr=nr.current)===null||Qr===void 0||Qr.addEventListener("wheel",Br),function(){var Cr;(Cr=nr.current)===null||Cr===void 0||Cr.removeEventListener("wheel",Br)}},[]);var pt=Ke[Ke.length-1],Rr={fixed:pt?pt.fixed:null,onHeaderCell:function(){return{className:"".concat(lt,"-cell-scrollbar")}}},Ir=Object(f.useMemo)(function(){return tt?[].concat(Object(S.a)(it),[Rr]):it},[tt,it]),Lr=Object(f.useMemo)(function(){return tt?[].concat(Object(S.a)(Ke),[Rr]):Ke},[tt,Ke]),Jr=Object(f.useMemo)(function(){var Qr=Oe.right,Br=Oe.left;return Object(m.a)(Object(m.a)({},Oe),{},{left:Re==="rtl"?[].concat(Object(S.a)(Br.map(function(Cr){return Cr+tt})),[0]):Br,right:Re==="rtl"?Qr:[].concat(Object(S.a)(Qr.map(function(Cr){return Cr+tt})),[0]),isSticky:Rt})},[tt,Oe,Rt]),pr=k(qe,ke);return f.createElement("div",{style:Object(m.a)({overflow:"hidden"},Rt?{top:Ee}:{}),ref:Wt,className:c()("".concat(lt,"-header"),Object(D.a)({},we,!!we))},f.createElement("table",{style:{tableLayout:"fixed",visibility:Ye||pr?null:"hidden"}},f.createElement(T,{colWidths:pr?[].concat(Object(S.a)(pr),[tt]):[],columCount:ke+1,columns:Lr}),f.createElement(x,Object.assign({},Ge,{stickyOffsets:Jr,columns:Ir,flattenColumns:Lr}))))});N.displayName="FixedHeader";var I=N,W=f.createContext(null),K=W;function U(Me){var Se=Me.prefixCls,Ye=Me.children,it=Me.component,Ke=Me.cellComponent,qe=Me.fixHeader,ke=Me.fixColumn,Oe=Me.horizonScroll,Re=Me.className,pe=Me.expanded,Ee=Me.componentWidth,we=Me.colSpan,De=f.useContext(l.a),Ge=De.scrollbarSize;return f.useMemo(function(){var nt=Ye;return ke&&(nt=f.createElement("div",{style:{width:Ee-(qe?Ge:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Se,"-expanded-row-fixed")},nt)),f.createElement(it,{className:Re,style:{display:pe?null:"none"}},f.createElement(a.a,{component:Ke,prefixCls:Se,colSpan:we},nt))},[Ye,it,qe,Oe,Re,pe,Ee,we,Ge])}var z=U;function B(Me){var Se=Me.className,Ye=Me.style,it=Me.record,Ke=Me.index,qe=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,Ge=Me.cellComponent,nt=Me.childrenColumnName,lt=f.useContext(l.a),ut=lt.prefixCls,Rt=lt.fixedInfoList,tt=f.useContext(K),nr=tt.fixHeader,Wt=tt.fixColumn,pt=tt.horizonScroll,Rr=tt.componentWidth,Ir=tt.flattenColumns,Lr=tt.expandableType,Jr=tt.expandRowByClick,pr=tt.onTriggerExpand,Qr=tt.rowClassName,Br=tt.expandedRowClassName,Cr=tt.indentSize,cn=tt.expandIcon,wn=tt.expandedRowRender,Hn=tt.expandIconColumnIndex,sn=f.useState(!1),_a=Object(d.a)(sn,2),wa=_a[0],mn=_a[1],sr=Re&&Re.has(Me.recordKey);f.useEffect(function(){sr&&mn(!0)},[sr]);var Kn=Lr==="row"&&(!Oe||Oe(it)),Ta=Lr==="nest",jn=nt&&it&&it[nt],Zr=Kn||Ta,Ln;pe&&(Ln=pe(it,Ke));var ga=function(_r){if(Jr&&Zr&&pr(it,_r),Ln&&Ln.onClick){for(var aa,Yn=arguments.length,zn=new Array(Yn>1?Yn-1:0),On=1;On<Yn;On++)zn[On-1]=arguments[On];(aa=Ln).onClick.apply(aa,[_r].concat(zn))}},fa;typeof Qr=="string"?fa=Qr:typeof Qr=="function"&&(fa=Qr(it,Ke,we));var Tt=Object(C.a)(Ir),fr=f.createElement(De,Object.assign({},Ln,{"data-row-key":qe,className:c()(Se,"".concat(ut,"-row"),"".concat(ut,"-row-level-").concat(we),fa,Ln&&Ln.className),style:Object(m.a)(Object(m.a)({},Ye),Ln?Ln.style:null),onClick:ga}),Ir.map(function(In,_r){var aa=In.render,Yn=In.dataIndex,zn=In.className,On=Tt[_r],Va=Rt[_r],Ma;_r===(Hn||0)&&Ta&&(Ma=f.createElement(f.Fragment,null,f.createElement("span",{style:{paddingLeft:"".concat(Cr*we,"px")},className:"".concat(ut,"-row-indent indent-level-").concat(we)}),cn({prefixCls:ut,expanded:sr,expandable:jn,record:it,onExpand:pr})));var Dt;return In.onCell&&(Dt=In.onCell(it,Ke)),f.createElement(a.a,Object.assign({className:zn,ellipsis:In.ellipsis,align:In.align,component:Ge,prefixCls:ut,key:On,record:it,index:Ke,dataIndex:Yn,render:aa,shouldCellUpdate:In.shouldCellUpdate},Va,{appendNode:Ma,additionalProps:Dt}))})),na;if(Kn&&(wa||sr)){var ha=wn(it,Ke,we+1,sr),Sa=Br&&Br(it,Ke,we);na=f.createElement(z,{expanded:sr,className:c()("".concat(ut,"-expanded-row"),"".concat(ut,"-expanded-row-level-").concat(we+1),Sa),prefixCls:ut,fixHeader:nr,fixColumn:Wt,horizonScroll:pt,component:De,componentWidth:Rr,cellComponent:Ge,colSpan:Ir.length},ha)}var ya;return jn&&sr&&(ya=(it[nt]||[]).map(function(In,_r){var aa=ke(In,_r);return f.createElement(B,Object.assign({},Me,{key:aa,rowKey:aa,record:In,recordKey:aa,index:_r,indent:we+1}))})),f.createElement(f.Fragment,null,fr,na,ya)}B.displayName="BodyRow";var H=B,G=f.createContext(null),ee=G;function ie(Me){var Se=Me.columnKey,Ye=Me.onColumnResize,it=f.useRef();return f.useEffect(function(){it.current&&Ye(Se,it.current.offsetWidth)},[]),f.createElement(u.a,{onResize:function(qe){var ke=qe.offsetWidth;Ye(Se,ke)}},f.createElement("td",{ref:it,style:{padding:0,border:0,height:0}},f.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ue(Me){var Se=Me.data,Ye=Me.getRowKey,it=Me.measureColumnWidth,Ke=Me.expandedKeys,qe=Me.onRow,ke=Me.rowExpandable,Oe=Me.emptyNode,Re=Me.childrenColumnName,pe=f.useContext(ee),Ee=pe.onColumnResize,we=f.useContext(l.a),De=we.prefixCls,Ge=we.getComponent,nt=f.useContext(K),lt=nt.fixHeader,ut=nt.horizonScroll,Rt=nt.flattenColumns,tt=nt.componentWidth;return f.useMemo(function(){var nr=Ge(["body","wrapper"],"tbody"),Wt=Ge(["body","row"],"tr"),pt=Ge(["body","cell"],"td"),Rr;Se.length?Rr=Se.map(function(Lr,Jr){var pr=Ye(Lr,Jr);return f.createElement(H,{key:pr,rowKey:pr,record:Lr,recordKey:pr,index:Jr,rowComponent:Wt,cellComponent:pt,expandedKeys:Ke,onRow:qe,getRowKey:Ye,rowExpandable:ke,childrenColumnName:Re})}):Rr=f.createElement(z,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:lt,fixColumn:ut,horizonScroll:ut,component:Wt,componentWidth:tt,cellComponent:pt,colSpan:Rt.length},Oe);var Ir=Object(C.a)(Rt);return f.createElement(nr,{className:"".concat(De,"-tbody")},it&&f.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},Ir.map(function(Lr){return f.createElement(ie,{key:Lr,columnKey:Lr,onColumnResize:Ee})})),Rr)},[Se,De,qe,it,Ke,Ye,Ge,tt,Oe,Rt])}var xe=f.memo(ue);xe.displayName="Body";var Te=xe,se=M("wRmb"),ve=M("xEkU"),de=M.n(ve);function ne(Me){var Se=Object(f.useRef)(Me),Ye=Object(f.useState)({}),it=Object(d.a)(Ye,2),Ke=it[1],qe=Object(f.useRef)(null),ke=Object(f.useRef)([]);function Oe(Re){qe.current===null&&(ke.current=[],qe.current=de()(function(){ke.current.forEach(function(pe){Se.current=pe(Se.current)}),qe.current=null,Ke({})})),ke.current.push(Re)}return Object(f.useEffect)(function(){return function(){de.a.cancel(qe.current)}},[]),[Se.current,Oe]}function ae(Me){var Se=Object(f.useRef)(Me),Ye=Object(f.useRef)(null);function it(){window.clearTimeout(Ye.current)}function Ke(ke){Se.current=ke,it(),Ye.current=window.setTimeout(function(){Se.current=null,Ye.current=null},100)}function qe(){return Se.current}return Object(f.useEffect)(function(){return it},[]),[Ke,qe]}function Z(Me,Se,Ye){var it=Object(f.useMemo)(function(){for(var Ke=[],qe=[],ke=0,Oe=0,Re=0;Re<Se;Re+=1)if(Ye==="rtl"){qe[Re]=Oe,Oe+=Me[Re]||0;var pe=Se-Re-1;Ke[pe]=ke,ke+=Me[pe]||0}else{Ke[Re]=ke,ke+=Me[Re]||0;var Ee=Se-Re-1;qe[Ee]=Oe,Oe+=Me[Ee]||0}return{left:Ke,right:qe}},[Me,Se,Ye]);return it}var le=Z;function Q(Me){var Se=Me.className,Ye=Me.children;return f.createElement("div",{className:Se},Ye)}var q=Q,be=M("n6Qo");function te(Me){var Se,Ye=Me.prefixCls,it=Me.record,Ke=Me.onExpand,qe=Me.expanded,ke=Me.expandable,Oe="".concat(Ye,"-row-expand-icon");if(!ke)return f.createElement("span",{className:c()(Oe,"".concat(Ye,"-row-spaced"))});var Re=function(Ee){Ke(it,Ee),Ee.stopPropagation()};return f.createElement("span",{className:c()(Oe,(Se={},Object(D.a)(Se,"".concat(Ye,"-row-expanded"),qe),Object(D.a)(Se,"".concat(Ye,"-row-collapsed"),!qe),Se)),onClick:Re})}function J(Me,Se,Ye){var it=[];function Ke(qe){(qe||[]).forEach(function(ke,Oe){it.push(Se(ke,Oe)),Ke(ke[Ye])})}return Ke(Me),it}var X=M("zT1h"),$=M("y0+3"),ge=function(Se,Ye){var it,Ke,qe=Se.scrollBodyRef,ke=Se.onScroll,Oe=Se.offsetScroll,Re=f.useContext(l.a),pe=Re.prefixCls,Ee=((it=qe.current)===null||it===void 0?void 0:it.scrollWidth)||0,we=((Ke=qe.current)===null||Ke===void 0?void 0:Ke.clientWidth)||0,De=Ee&&we*(we/Ee),Ge=f.useRef(),nt=ne({scrollLeft:0,isHiddenScrollBar:!1}),lt=Object(d.a)(nt,2),ut=lt[0],Rt=lt[1],tt=f.useRef({delta:0,x:0}),nr=f.useState(!1),Wt=Object(d.a)(nr,2),pt=Wt[0],Rr=Wt[1],Ir=function(){Rr(!1)},Lr=function(Cr){Cr.persist(),tt.current.delta=Cr.pageX-ut.scrollLeft,tt.current.x=0,Rr(!0),Cr.preventDefault()},Jr=function(Cr){var cn,wn=Cr||((cn=window)===null||cn===void 0?void 0:cn.event),Hn=wn.buttons;if(!pt||Hn===0){pt&&Rr(!1);return}var sn=tt.current.x+Cr.pageX-tt.current.x-tt.current.delta;sn<=0&&(sn=0),sn+De>=we&&(sn=we-De),ke({scrollLeft:sn/we*(Ee+2)}),tt.current.x=Cr.pageX},pr=function(){var Cr=Object($.b)(qe.current).top,cn=Cr+qe.current.offsetHeight,wn=document.documentElement.scrollTop+window.innerHeight;cn-Object(p.a)()<=wn||Cr>=wn-Oe?Rt(function(Hn){return Object(m.a)(Object(m.a)({},Hn),{},{isHiddenScrollBar:!0})}):Rt(function(Hn){return Object(m.a)(Object(m.a)({},Hn),{},{isHiddenScrollBar:!1})})},Qr=function(Cr){Rt(function(cn){return Object(m.a)(Object(m.a)({},cn),{},{scrollLeft:Cr/Ee*we||0})})};return f.useImperativeHandle(Ye,function(){return{setScrollLeft:Qr}}),f.useEffect(function(){var Br=Object(X.a)(document.body,"mouseup",Ir,!1),Cr=Object(X.a)(document.body,"mousemove",Jr,!1);return pr(),function(){Br.remove(),Cr.remove()}},[De,pt]),f.useEffect(function(){var Br=Object(X.a)(window,"scroll",pr,!1),Cr=Object(X.a)(window,"resize",pr,!1);return function(){Br.remove(),Cr.remove()}},[]),f.useEffect(function(){ut.isHiddenScrollBar||Rt(function(Br){var Cr,cn;return Object(m.a)(Object(m.a)({},Br),{},{scrollLeft:qe.current.scrollLeft/((Cr=qe.current)===null||Cr===void 0?void 0:Cr.scrollWidth)*((cn=qe.current)===null||cn===void 0?void 0:cn.clientWidth)})})},[ut.isHiddenScrollBar]),Ee<=we||!De||ut.isHiddenScrollBar?null:f.createElement("div",{style:{height:Object(p.a)(),width:we,bottom:Oe},className:"".concat(pe,"-sticky-scroll")},f.createElement("div",{onMouseDown:Lr,ref:Ge,className:c()("".concat(pe,"-sticky-scroll-bar"),Object(D.a)({},"".concat(pe,"-sticky-scroll-bar-active"),pt)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(ut.scrollLeft,"px, 0, 0)")}}))},fe=f.forwardRef(ge);function _e(Me,Se){return f.useMemo(function(){var Ye=!!Me;return{isSticky:Ye,stickyClassName:Ye?"".concat(Se,"-sticky-header"):"",offsetHeader:Object(P.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(P.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Se])}var He=[],$e={},Ve="rc-table-internal-hook",et=f.memo(function(Me){var Se=Me.children;return Se},function(Me,Se){return i()(Me.props,Se.props)?Me.pingLeft!==Se.pingLeft||Me.pingRight!==Se.pingRight:!1});function at(Me){var Se,Ye=Me.prefixCls,it=Me.className,Ke=Me.rowClassName,qe=Me.style,ke=Me.data,Oe=Me.rowKey,Re=Me.scroll,pe=Me.tableLayout,Ee=Me.direction,we=Me.title,De=Me.footer,Ge=Me.summary,nt=Me.id,lt=Me.showHeader,ut=Me.components,Rt=Me.emptyText,tt=Me.onRow,nr=Me.onHeaderRow,Wt=Me.internalHooks,pt=Me.transformColumns,Rr=Me.internalRefs,Ir=Me.sticky,Lr=ke||He,Jr=!!Lr.length,pr=f.useState(0),Qr=Object(d.a)(pr,2),Br=Qr[0],Cr=Qr[1];f.useEffect(function(){Cr(Object(p.a)())});var cn=f.useMemo(function(){return Object(C.c)(ut,{})},[ut]),wn=f.useCallback(function(Bt,Et){return Object(C.b)(cn,Bt)||Et},[cn]),Hn=f.useMemo(function(){return typeof Oe=="function"?Oe:function(Bt){var Et=Bt&&Bt[Oe];return Et}},[Oe]),sn=Object(b.c)(Me),_a=sn.expandIcon,wa=sn.expandedRowKeys,mn=sn.defaultExpandedRowKeys,sr=sn.defaultExpandAllRows,Kn=sn.expandedRowRender,Ta=sn.onExpand,jn=sn.onExpandedRowsChange,Zr=sn.expandRowByClick,Ln=sn.rowExpandable,ga=sn.expandIconColumnIndex,fa=sn.expandedRowClassName,Tt=sn.childrenColumnName,fr=sn.indentSize,na=_a||te,ha=Tt||"children",Sa=f.useMemo(function(){return Kn?"row":Me.expandable&&Wt===Ve&&Me.expandable.__PARENT_RENDER_ICON__||Lr.some(function(Bt){return Bt&&Object(P.a)(Bt)==="object"&&Bt[ha]})?"nest":!1},[!!Kn,Lr]),ya=f.useState(function(){return mn||(sr?J(Lr,Hn,ha):[])}),In=Object(d.a)(ya,2),_r=In[0],aa=In[1],Yn=f.useMemo(function(){return new Set(wa||_r||[])},[wa,_r]),zn=f.useCallback(function(Bt){var Et=Hn(Bt,Lr.indexOf(Bt)),Mt,Zt=Yn.has(Et);Zt?(Yn.delete(Et),Mt=Object(S.a)(Yn)):Mt=[].concat(Object(S.a)(Yn),[Et]),aa(Mt),Ta&&Ta(!Zt,Bt),jn&&jn(Mt)},[Hn,Yn,Lr,Ta,jn]),On=f.useState(0),Va=Object(d.a)(On,2),Ma=Va[0],Dt=Va[1],Za=Object(se.b)(Object(m.a)(Object(m.a)(Object(m.a)({},Me),sn),{},{expandable:!!Kn,expandedKeys:Yn,getRowKey:Hn,onTriggerExpand:zn,expandIcon:na,expandIconColumnIndex:ga,direction:Ee}),Wt===Ve?pt:null),oi=Object(d.a)(Za,2),Ia=oi[0],bn=oi[1],Fn=f.useMemo(function(){return{columns:Ia,flattenColumns:bn}},[Ia,bn]),Ka=f.useRef(),qa=f.useRef(),Gn=f.useRef(),_i=f.useState(!1),ei=Object(d.a)(_i,2),qn=ei[0],Ca=ei[1],mi=f.useState(!1),za=Object(d.a)(mi,2),ba=za[0],Ga=za[1],ka=ne(new Map),vi=Object(d.a)(ka,2),gi=vi[0],Na=vi[1],la=Object(C.a)(bn),si=la.map(function(Bt){return gi.get(Bt)}),li=f.useMemo(function(){return si},[si.join("_")]),mt=le(li,bn.length,Ee),Ze=Re&&Object(C.d)(Re.y),ht=Re&&Object(C.d)(Re.x),bt=ht&&bn.some(function(Bt){var Et=Bt.fixed;return Et}),Ht=f.useRef(),Ot=_e(Ir,Ye),tr=Ot.isSticky,Pt=Ot.offsetHeader,ct=Ot.offsetScroll,vt=Ot.stickyClassName,yt,or,Xt;Ze&&(or={overflowY:"scroll",maxHeight:Re.y}),ht&&(yt={overflowX:"auto"},Ze||(or={overflowY:"hidden"}),Xt={width:Re.x===!0?"auto":Re.x,minWidth:"100%"});var zt=f.useCallback(function(Bt,Et){Na(function(Mt){var Zt=new Map(Mt);return Zt.set(Bt,Et),Zt})},[]),jt=ae(null),Vt=Object(d.a)(jt,2),Yt=Vt[0],Qe=Vt[1];function hr(Bt,Et){if(!Et)return;typeof Et=="function"?Et(Bt):Et.scrollLeft!==Bt&&(Et.scrollLeft=Bt)}var wr=function(Et){var Mt=Et.currentTarget,Zt=Et.scrollLeft,Gt=typeof Zt=="number"?Zt:Mt.scrollLeft,dt=Mt||$e;if(!Qe()||Qe()===dt){var ft;Yt(dt),hr(Gt,qa.current),hr(Gt,Gn.current),hr(Gt,(ft=Ht.current)===null||ft===void 0?void 0:ft.setScrollLeft)}if(Mt){var It=Mt.scrollWidth,_t=Mt.clientWidth;Ca(Gt>0),Ga(Gt<It-_t)}},lr=function(){Gn.current&&wr({currentTarget:Gn.current})},$t=function(Et){var Mt=Et.width;lr(),Dt(Ka.current?Ka.current.offsetWidth:Mt)};f.useEffect(function(){return lr},[]),f.useEffect(function(){ht&&lr()},[ht]),f.useEffect(function(){Wt===Ve&&Rr&&(Rr.body.current=Gn.current)});var ar=wn(["table"],"table"),Kt=f.useMemo(function(){return pe||(bt?Re.x==="max-content"?"auto":"fixed":Ze||bn.some(function(Bt){var Et=Bt.ellipsis;return Et})?"fixed":"auto")},[Ze,bt,bn,pe]),Jt,Ar={colWidths:li,columCount:bn.length,stickyOffsets:mt,onHeaderRow:nr,fixHeader:Ze},At=f.useMemo(function(){return Jr?null:typeof Rt=="function"?Rt():Rt},[Jr,Rt]),kt=f.createElement(Te,{data:Lr,measureColumnWidth:Ze||ht||tr,expandedKeys:Yn,rowExpandable:Ln,getRowKey:Hn,onRow:tt,emptyNode:At,childrenColumnName:ha}),Lt=f.createElement(T,{colWidths:bn.map(function(Bt){var Et=Bt.width;return Et}),columns:bn}),Qt=Ge&&f.createElement(be.b,null,Ge(Lr)),gr=wn(["body"]);if(Ze||tr){var Xe;typeof gr=="function"?(Xe=gr(Lr,{scrollbarSize:Br,ref:Gn,onScroll:wr}),Ar.colWidths=bn.map(function(Bt,Et){var Mt=Bt.width,Zt=Et===Ia.length-1?Mt-Br:Mt;return typeof Zt=="number"&&!Number.isNaN(Zt)?Zt:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Xe=f.createElement("div",{style:Object(m.a)(Object(m.a)({},yt),or),onScroll:wr,ref:Gn,className:c()("".concat(Ye,"-body"))},f.createElement(ar,{style:Object(m.a)(Object(m.a)({},Xt),{},{tableLayout:Kt})},Lt,kt,Qt),tr&&f.createElement(fe,{ref:Ht,offsetScroll:ct,scrollBodyRef:Gn,onScroll:wr})),Jt=f.createElement(f.Fragment,null,lt!==!1&&f.createElement(I,Object.assign({noData:!Lr.length},Ar,Fn,{direction:Ee,offsetHeader:Pt,stickyClassName:vt,ref:qa,onScroll:wr})),Xe)}else Jt=f.createElement("div",{style:Object(m.a)(Object(m.a)({},yt),or),className:c()("".concat(Ye,"-content")),onScroll:wr,ref:Gn},f.createElement(ar,{style:Object(m.a)(Object(m.a)({},Xt),{},{tableLayout:Kt})},Lt,lt!==!1&&f.createElement(x,Object.assign({},Ar,Fn)),kt,Qt));var Ct=Object(b.b)(Me),kr=f.createElement("div",Object.assign({className:c()(Ye,it,(Se={},Object(D.a)(Se,"".concat(Ye,"-rtl"),Ee==="rtl"),Object(D.a)(Se,"".concat(Ye,"-ping-left"),qn),Object(D.a)(Se,"".concat(Ye,"-ping-right"),ba),Object(D.a)(Se,"".concat(Ye,"-layout-fixed"),pe==="fixed"),Object(D.a)(Se,"".concat(Ye,"-fixed-header"),Ze),Object(D.a)(Se,"".concat(Ye,"-fixed-column"),bt),Object(D.a)(Se,"".concat(Ye,"-scroll-horizontal"),ht),Object(D.a)(Se,"".concat(Ye,"-has-fix-left"),bn[0]&&bn[0].fixed),Object(D.a)(Se,"".concat(Ye,"-has-fix-right"),bn[bn.length-1]&&bn[bn.length-1].fixed==="right"),Se)),style:qe,id:nt,ref:Ka},Ct),f.createElement(et,{pingLeft:qn,pingRight:ba,props:Object(m.a)(Object(m.a)({},Me),{},{stickyOffsets:mt,mergedExpandedKeys:Yn})},we&&f.createElement(q,{className:"".concat(Ye,"-title")},we(Lr)),f.createElement("div",{className:"".concat(Ye,"-container")},Jt),De&&f.createElement(q,{className:"".concat(Ye,"-footer")},De(Lr))));ht&&(kr=f.createElement(u.a,{onResize:$t},kr));var Ur=f.useMemo(function(){return{prefixCls:Ye,getComponent:wn,scrollbarSize:Br,direction:Ee,fixedInfoList:bn.map(function(Bt,Et){return t(Et,Et,bn,mt,Ee)}),isSticky:tr}},[Ye,wn,Br,Ee,bn,mt,Ee,tr]),Nt=f.useMemo(function(){return Object(m.a)(Object(m.a)({},Fn),{},{tableLayout:Kt,rowClassName:Ke,expandedRowClassName:fa,componentWidth:Ma,fixHeader:Ze,fixColumn:bt,horizonScroll:ht,expandIcon:na,expandableType:Sa,expandRowByClick:Zr,expandedRowRender:Kn,onTriggerExpand:zn,expandIconColumnIndex:ga,indentSize:fr})},[Fn,Kt,Ke,fa,Ma,Ze,bt,ht,na,Sa,Zr,Kn,zn,ga,fr]),ur=f.useMemo(function(){return{onColumnResize:zt}},[zt]);return f.createElement(l.a.Provider,{value:Ur},f.createElement(K.Provider,{value:Nt},f.createElement(ee.Provider,{value:ur},kr)))}at.Column=v.a,at.ColumnGroup=h.a,at.Summary=be.a,at.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var st=Y.b=at},wRmb:function(j,Y,M){"use strict";M.d(Y,"a",function(){return i});var D=M("rePB"),m=M("KQm4"),S=M("VTBJ"),P=M("Ff2n"),d=M("cDcd"),f=M.n(d),_=M("Kwbf"),c=M("Zm9Q"),o=M("hW8S");function i(v){return Object(c.a)(v).filter(function(g){return d.isValidElement(g)}).map(function(g){var E=g.key,a=g.props,l=a.children,t=Object(P.a)(a,["children"]),C=Object(S.a)({key:E},t);return l&&(C.children=i(l)),C})}function n(v){return v.reduce(function(g,E){var a=E.fixed,l=a===!0?"left":a,t=E.children;return t&&t.length>0?[].concat(Object(m.a)(g),Object(m.a)(n(t).map(function(C){return Object(S.a)({fixed:l},C)}))):[].concat(Object(m.a)(g),[Object(S.a)(Object(S.a)({},E),{},{fixed:l})])},[])}function u(v){for(var g=!0,E=0;E<v.length;E+=1){var a=v[E];if(g&&a.fixed!=="left")g=!1;else if(!g&&a.fixed==="left"){Object(_.a)(!1,"Index ".concat(E-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,t=v.length-1;t>=0;t-=1){var C=v[t];if(l&&C.fixed!=="right")l=!1;else if(!l&&C.fixed==="right"){Object(_.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function p(v){return v.map(function(g){var E=g.fixed,a=Object(P.a)(g,["fixed"]),l=E;return E==="left"?l="right":E==="right"&&(l="left"),Object(S.a)({fixed:l},a)})}function h(v,g){var E=v.prefixCls,a=v.columns,l=v.children,t=v.expandable,C=v.expandedKeys,w=v.getRowKey,s=v.onTriggerExpand,L=v.expandIcon,O=v.rowExpandable,x=v.expandIconColumnIndex,b=v.direction,y=v.expandRowByClick,T=d.useMemo(function(){return a||i(l)},[a,l]),k=d.useMemo(function(){if(t){var W,K=x||0,U=T[K],z=(W={},Object(D.a)(W,o.a,{className:"".concat(E,"-expand-icon-col")}),Object(D.a)(W,"title",""),Object(D.a)(W,"fixed",U?U.fixed:null),Object(D.a)(W,"className","".concat(E,"-row-expand-icon-cell")),Object(D.a)(W,"render",function(G,ee,ie){var ue=w(ee,ie),xe=C.has(ue),Te=O?O(ee):!0,se=L({prefixCls:E,expanded:xe,expandable:Te,record:ee,onExpand:s});return y?d.createElement("span",{onClick:function(de){return de.stopPropagation()}},se):se}),W),B=T.slice();return K>=0&&B.splice(K,0,z),B}return T},[t,T,w,C,L,b]),N=d.useMemo(function(){var W=k;return g&&(W=g(W)),W.length||(W=[{render:function(){return null}}]),W},[g,k,b]),I=d.useMemo(function(){return b==="rtl"?p(n(N)):n(N)},[N,b]);return[N,I]}Y.b=h},wU8J:function(j,Y){function M(){this.buffer=new Array,this.length=0}M.prototype={get:function(D){var m=Math.floor(D/8);return(this.buffer[m]>>>7-D%8&1)==1},put:function(D,m){for(var S=0;S<m;S++)this.putBit((D>>>m-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(D){var m=Math.floor(this.length/8);this.buffer.length<=m&&this.buffer.push(0),D&&(this.buffer[m]|=128>>>this.length%8),this.length++}},j.exports=M},wZgz:function(j,Y,M){(function(D,m,S){j.exports=Y=m(M("Ib8C"),M("ETIr"),M("cv67"),M("K3mO"),M("OLod"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.BlockCipher,d=m.algo,f=[],_=[],c=[],o=[],i=[],n=[],u=[],p=[],h=[],v=[];(function(){for(var a=[],l=0;l<256;l++)l<128?a[l]=l<<1:a[l]=l<<1^283;for(var t=0,C=0,l=0;l<256;l++){var w=C^C<<1^C<<2^C<<3^C<<4;w=w>>>8^w&255^99,f[t]=w,_[w]=t;var s=a[t],L=a[s],O=a[L],x=a[w]*257^w*16843008;c[t]=x<<24|x>>>8,o[t]=x<<16|x>>>16,i[t]=x<<8|x>>>24,n[t]=x;var x=O*16843009^L*65537^s*257^t*16843008;u[w]=x<<24|x>>>8,p[w]=x<<16|x>>>16,h[w]=x<<8|x>>>24,v[w]=x,t?(t=s^a[a[a[O^s]]],C^=a[a[C]]):t=C=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],E=d.AES=P.extend({_doReset:function(){var a;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,t=l.words,C=l.sigBytes/4,w=this._nRounds=C+6,s=(w+1)*4,L=this._keySchedule=[],O=0;O<s;O++)O<C?L[O]=t[O]:(a=L[O-1],O%C?C>6&&O%C==4&&(a=f[a>>>24]<<24|f[a>>>16&255]<<16|f[a>>>8&255]<<8|f[a&255]):(a=a<<8|a>>>24,a=f[a>>>24]<<24|f[a>>>16&255]<<16|f[a>>>8&255]<<8|f[a&255],a^=g[O/C|0]<<24),L[O]=L[O-C]^a);for(var x=this._invKeySchedule=[],b=0;b<s;b++){var O=s-b;if(b%4)var a=L[O];else var a=L[O-4];b<4||O<=4?x[b]=a:x[b]=u[f[a>>>24]]^p[f[a>>>16&255]]^h[f[a>>>8&255]]^v[f[a&255]]}},encryptBlock:function(a,l){this._doCryptBlock(a,l,this._keySchedule,c,o,i,n,f)},decryptBlock:function(a,l){var t=a[l+1];a[l+1]=a[l+3],a[l+3]=t,this._doCryptBlock(a,l,this._invKeySchedule,u,p,h,v,_);var t=a[l+1];a[l+1]=a[l+3],a[l+3]=t},_doCryptBlock:function(a,l,t,C,w,s,L,O){for(var x=this._nRounds,b=a[l]^t[0],y=a[l+1]^t[1],T=a[l+2]^t[2],k=a[l+3]^t[3],N=4,I=1;I<x;I++){var W=C[b>>>24]^w[y>>>16&255]^s[T>>>8&255]^L[k&255]^t[N++],K=C[y>>>24]^w[T>>>16&255]^s[k>>>8&255]^L[b&255]^t[N++],U=C[T>>>24]^w[k>>>16&255]^s[b>>>8&255]^L[y&255]^t[N++],z=C[k>>>24]^w[b>>>16&255]^s[y>>>8&255]^L[T&255]^t[N++];b=W,y=K,T=U,k=z}var W=(O[b>>>24]<<24|O[y>>>16&255]<<16|O[T>>>8&255]<<8|O[k&255])^t[N++],K=(O[y>>>24]<<24|O[T>>>16&255]<<16|O[k>>>8&255]<<8|O[b&255])^t[N++],U=(O[T>>>24]<<24|O[k>>>16&255]<<16|O[b>>>8&255]<<8|O[y&255])^t[N++],z=(O[k>>>24]<<24|O[b>>>16&255]<<16|O[y>>>8&255]<<8|O[T&255])^t[N++];a[l]=W,a[l+1]=K,a[l+2]=U,a[l+3]=z},keySize:256/32});m.AES=P._createHelper(E)}(),D.AES})},wbyO:function(j,Y,M){(function(D,m){j.exports=Y=m(M("Ib8C"))})(this,function(D){return function(){var m=D,S=m.lib,P=S.WordArray,d=m.enc,f=d.Base64url={stringify:function(c,o=!0){var i=c.words,n=c.sigBytes,u=o?this._safe_map:this._map;c.clamp();for(var p=[],h=0;h<n;h+=3)for(var v=i[h>>>2]>>>24-h%4*8&255,g=i[h+1>>>2]>>>24-(h+1)%4*8&255,E=i[h+2>>>2]>>>24-(h+2)%4*8&255,a=v<<16|g<<8|E,l=0;l<4&&h+l*.75<n;l++)p.push(u.charAt(a>>>6*(3-l)&63));var t=u.charAt(64);if(t)for(;p.length%4;)p.push(t);return p.join("")},parse:function(c,o=!0){var i=c.length,n=o?this._safe_map:this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var p=0;p<n.length;p++)u[n.charCodeAt(p)]=p}var h=n.charAt(64);if(h){var v=c.indexOf(h);v!==-1&&(i=v)}return _(c,i,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function _(c,o,i){for(var n=[],u=0,p=0;p<o;p++)if(p%4){var h=i[c.charCodeAt(p-1)]<<p%4*2,v=i[c.charCodeAt(p)]>>>6-p%4*2,g=h|v;n[u>>>2]|=g<<24-u%4*8,u++}return P.create(n,u)}}(),D.enc.Base64url})},"y0+3":function(j,Y,M){"use strict";M.d(Y,"a",function(){return n}),M.d(Y,"b",function(){return p});var D=/margin|padding|width|height|max|min|offset/,m={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function P(h){return h.nodeType===1?h.ownerDocument.defaultView.getComputedStyle(h,null):{}}function d(h,v,g){if(v=v.toLowerCase(),g==="auto"){if(v==="height")return h.offsetHeight;if(v==="width")return h.offsetWidth}return v in m||(m[v]=D.test(v)),m[v]?parseFloat(g)||0:g}function f(h,v){var g=arguments.length,E=P(h);return v=S[v]?"cssFloat"in h.style?"cssFloat":"styleFloat":v,g===1?E:d(h,v,E[v]||h.style[v])}function _(h,v,g){var E=arguments.length;if(v=S[v]?"cssFloat"in h.style?"cssFloat":"styleFloat":v,E===3)return typeof g=="number"&&D.test(v)&&(g="".concat(g,"px")),h.style[v]=g,g;for(var a in v)v.hasOwnProperty(a)&&_(h,a,v[a]);return P(h)}function c(h){return h===document.body?document.documentElement.clientWidth:h.offsetWidth}function o(h){return h===document.body?window.innerHeight||document.documentElement.clientHeight:h.offsetHeight}function i(){var h=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),v=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:h,height:v}}function n(){var h=document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight;return{width:h,height:v}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(h){var v=h.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,Y,M){"use strict";var D=M("2qtc"),m=M("kLXV"),S=M("PpiC"),P=M("cDcd"),d=M.n(P),f=M("9kvl"),_=function(o){var i=o.shixunsDetail,n=o.globalSetting,u=o.loading,p=o.dispatch,h=Object(S.a)(o,["shixunsDetail","globalSetting","loading","dispatch"]);return d.a.createElement(m.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:i.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){p({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){p({type:"shixunsDetail/setActionTabs",payload:{}})}},d.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",d.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Y.a=Object(f.a)(function(c){var o=c.shixunsDetail,i=c.loading,n=c.globalSetting;return{shixunsDetail:o,globalSetting:n,loading:i.models.index}})(_)}}]);