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.da1...

457 lines
1.7 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([[118,5,6,7,8,10,16],{"+NIl":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(d,T){"use strict";function D(c,m){c.cmdState.push(m)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function p(c){var m=c.cmdState.pop();m&&m.closeBracket()}function C(c){for(var m=c.cmdState,_=m.length-1;_>=0;_--){var y=m[_];if(y.name=="DEFAULT")continue;return y}return{styleIdentifier:function(){return null}}}function E(c,m,_){return function(){this.name=c,this.bracketNo=0,this.style=m,this.styles=_,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=E("importmodule","tag",["string","builtin"]),l.documentclass=E("documentclass","tag",["","atom"]),l.usepackage=E("usepackage","tag",["atom"]),l.begin=E("begin","tag",["atom"]),l.end=E("end","tag",["atom"]),l.label=E("label","tag",["atom"]),l.ref=E("ref","tag",["atom"]),l.eqref=E("eqref","tag",["atom"]),l.cite=E("cite","tag",["atom"]),l.bibitem=E("bibitem","tag",["atom"]),l.Bibitem=E("Bibitem","tag",["atom"]),l.RBibitem=E("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function s(c,m){c.f=m}function n(c,m){var _;if(c.match(/^\\[a-zA-Z@]+/)){var y=c.current().slice(1);return _=l.hasOwnProperty(y)?l[y]:l.DEFAULT,_=new _,D(m,_),s(m,f),_.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return s(m,function(a,t){return h(a,t,"\\]")}),"keyword";if(c.match("\\("))return s(m,function(a,t){return h(a,t,"\\)")}),"keyword";if(c.match("$$"))return s(m,function(a,t){return h(a,t,"$$")}),"keyword";if(c.match("$"))return s(m,function(a,t){return h(a,t,"$")}),"keyword";var i=c.next();if(i=="%")return c.skipToEnd(),"comment";if(i=="}"||i=="]"){if(_=u(m),_)_.closeBracket(i),s(m,f);else return"error";return"bracket"}else return i=="{"||i=="["?(_=l.DEFAULT,_=new _,D(m,_),"bracket"):/\d/.test(i)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),_=C(m),_.name=="begin"&&(_.argument=c.current()),_.styleIdentifier())}function h(c,m,_){if(c.eatSpace())return null;if(_&&c.match(_))return s(m,n),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var y=c.next();return y=="{"||y=="}"||y=="["||y=="]"||y=="("||y==")"?"bracket":y=="%"?(c.skipToEnd(),"comment"):"error"}function f(c,m){var _=c.peek(),y;return _=="{"||_=="["?(y=u(m),y.openBracket(_),c.eat(_),s(m,n),"bracket"):/[ \t\r]/.test(_)?(c.eat(_),null):(s(m,n),p(m),n(c,m))}return{startState:function(){var c=T.inMathMode?function(m,_){return h(m,_)}:n;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,m){return m.f(c,m)},blankLine:function(c){c.f=n,c.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){P.defineOption("placeholder","",function(E,l,s){var n=s&&s!=P.Init;if(l&&!n)E.on("blur",u),E.on("change",p),E.on("swapDoc",p),P.on(E.getInputField(),"compositionupdate",E.state.placeholderCompose=function(){D(E)}),p(E);else if(!l&&n){E.off("blur",u),E.off("change",p),E.off("swapDoc",p),P.off(E.getInputField(),"compositionupdate",E.state.placeholderCompose),d(E);var h=E.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}l&&!E.hasFocus()&&u(E)});function d(E){E.state.placeholder&&(E.state.placeholder.parentNode.removeChild(E.state.placeholder),E.state.placeholder=null)}function T(E){d(E);var l=E.state.placeholder=document.createElement("pre");l.style.cssText="height: 0; overflow: visible",l.style.direction=E.getOption("direction"),l.className="CodeMirror-placeholder CodeMirror-line-like";var s=E.getOption("placeholder");typeof s=="string"&&(s=document.createTextNode(s)),l.appendChild(s),E.display.lineSpace.insertBefore(l,E.display.lineSpace.firstChild)}function D(E){setTimeout(function(){var l=!1,s=E.getInputField();s.nodeName=="TEXTAREA"?l=!s.value:E.lineCount()==1&&(l=!/[^\u200b]/.test(s.querySelector(".CodeMirror-line").textContent)),l?T(E):d(E)},20)}function u(E){C(E)&&T(E)}function p(E){var l=E.getWrapperElement(),s=C(E);l.className=l.className.replace(" CodeMirror-empty","")+(s?" CodeMirror-empty":""),s?T(E):d(E)}function C(E){return E.lineCount()===1&&E.getLine(0)===""}})},"1ZF9":function(j,Z,L){j.exports=L.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var d={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(D,u){var p=D.indentUnit,C={},E=u.htmlMode?d:T;for(var l in E)C[l]=E[l];for(var l in u)C[l]=u[l];var s,n;function h(w,M){function N(z){return M.tokenize=z,z(w,M)}var I=w.next();if(I=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?N(m("atom","]]>")):null:w.match("--")?N(m("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),N(_(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),M.tokenize=m("meta","?>"),"meta"):(s=w.eat("/")?"closeTag":"openTag",M.tokenize=f,"tag bracket");if(I=="&"){var G;return w.eat("#")?w.eat("x")?G=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):G=w.eatWhile(/[\d]/)&&w.eat(";"):G=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),G?"atom":"error"}else return w.eatWhile(/[^&<]/),null}h.isInText=!0;function f(w,M){var N=w.next();if(N==">"||N=="/"&&w.eat(">"))return M.tokenize=h,s=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return s="equals",null;if(N=="<"){M.tokenize=h,M.state=t,M.tagName=M.tagStart=null;var I=M.tokenize(w,M);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=c(N),M.stringStartCol=w.column(),M.tokenize(w,M)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(w){var M=function(N,I){for(;!N.eol();)if(N.next()==w){I.tokenize=f;break}return"string"};return M.isInAttribute=!0,M}function m(w,M){return function(N,I){for(;!N.eol();){if(N.match(M)){I.tokenize=h;break}N.next()}return w}}function _(w){return function(M,N){for(var I;(I=M.next())!=null;){if(I=="<")return N.tokenize=_(w+1),N.tokenize(M,N);if(I==">")if(w==1){N.tokenize=h;break}else return N.tokenize=_(w-1),N.tokenize(M,N)}return"meta"}}function y(w,M,N){this.prev=w.context,this.tagName=M,this.indent=w.indented,this.startOfLine=N,(C.doNotIndent.hasOwnProperty(M)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function i(w){w.context&&(w.context=w.context.prev)}function a(w,M){for(var N;;){if(!w.context)return;if(N=w.context.tagName,!C.contextGrabbers.hasOwnProperty(N)||!C.contextGrabbers[N].hasOwnProperty(M))return;i(w)}}function t(w,M,N){return w=="openTag"?(N.tagStart=M.column(),S):w=="closeTag"?x:t}function S(w,M,N){return w=="word"?(N.tagName=M.current(),n="tag",O):C.allowMissingTagName&&w=="endTag"?(n="tag bracket",O(w,M,N)):(n="error",S)}function x(w,M,N){if(w=="word"){var I=M.current();return N.context&&N.context.tagName!=I&&C.implicitlyClosed.hasOwnProperty(N.context.tagName)&&i(N),N.context&&N.context.tagName==I||C.matchClosing===!1?(n="tag",o):(n="tag error",k)}else return C.allowMissingTagName&&w=="endTag"?(n="tag bracket",o(w,M,N)):(n="error",k)}function o(w,M,N){return w!="endTag"?(n="error",o):(i(N),t)}function k(w,M,N){return n="error",o(w,M,N)}function O(w,M,N){if(w=="word")return n="attribute",b;if(w=="endTag"||w=="selfcloseTag"){var I=N.tagName,G=N.tagStart;return N.tagName=N.tagStart=null,w=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(I)?a(N,I):(a(N,I),N.context=new y(N,I,G==N.indented)),t}return n="error",O}function b(w,M,N){return w=="equals"?v:(C.allowMissing||(n="error"),O(w,M,N))}function v(w,M,N){return w=="string"?g:w=="word"&&C.allowUnquoted?(n="string",O):(n="error",O(w,M,N))}function g(w,M,N){return w=="string"?g:O(w,M,N)}return{startState:function(w){var M={tokenize:h,state:t,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(M.baseIndent=w),M},token:function(w,M){if(!M.tagName&&w.sol()&&(M.indented=w.indentation()),w.eatSpace())return null;s=null;var N=M.tokenize(w,M);return(N||s)&&N!="comment"&&(n=null,M.state=M.state(s||N,w,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(w,M,N){var I=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+p;if(I&&I.noIndent)return P.Pass;if(w.tokenize!=f&&w.tokenize!=h)return N?N.match(/^(\s*)/)[0].length:0;if(w.tagName)return C.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+p*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var G=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(G&&G[1])for(;I;)if(I.tagName==G[2]){I=I.prev;break}else if(C.implicitlyClosed.hasOwnProperty(I.tagName))I=I.prev;else break;else if(G)for(;I;){var z=C.contextGrabbers[I.tagName];if(z&&z.hasOwnProperty(G[2]))I=I.prev;else break}for(;I&&I.prev&&!I.startOfLine;)I=I.prev;return I?I.indent+p:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(w){w.state==v&&(w.state=O)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var M=[],N=w.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Hasher,u=d.x64,p=u.Word,C=u.WordArray,E=d.algo;function l(){return p.create.apply(p,arguments)}var s=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],n=[];(function(){for(var f=0;f<80;f++)n[f]=l()})();var h=E.SHA512=D.extend({_doReset:function(){this._hash=new C.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(f,c){for(var m=this._hash.words,_=m[0],y=m[1],i=m[2],a=m[3],t=m[4],S=m[5],x=m[6],o=m[7],k=_.high,O=_.low,b=y.high,v=y.low,g=i.high,w=i.low,M=a.high,N=a.low,I=t.high,G=t.low,z=S.high,H=S.low,K=x.high,U=x.low,B=o.high,V=o.low,ae=k,he=O,pe=b,Re=v,ke=g,ve=w,Te=M,be=N,ue=I,le=G,re=z,fe=H,q=K,ee=U,Ce=B,te=V,J=0;J<80;J++){var X,Q,Ee=n[J];if(J<16)Q=Ee.high=f[c+J*2]|0,X=Ee.low=f[c+J*2+1]|0;else{var ge=n[J-15],Oe=ge.high,Qe=ge.low,rt=(Oe>>>1|Qe<<31)^(Oe>>>8|Qe<<24)^Oe>>>7,nt=(Qe>>>1|Oe<<31)^(Qe>>>8|Oe<<24)^(Qe>>>7|Oe<<25),ut=n[J-2],dt=ut.high,mt=ut.low,He=(dt>>>19|mt<<13)^(dt<<3|mt>>>29)^dt>>>6,De=(mt>>>19|dt<<13)^(mt<<3|dt>>>29)^(mt>>>6|dt<<26),at=n[J-7],ht=at.high,Ze=at.low,st=n[J-16],Ue=st.high,Me=st.low;X=nt+Ze,Q=rt+ht+(X>>>0<nt>>>0?1:0),X=X+De,Q=Q+He+(X>>>0<De>>>0?1:0),X=X+Me,Q=Q+Ue+(X>>>0<Me>>>0?1:0),Ee.high=Q,Ee.low=X}var Ne=ue&re^~ue&q,xe=le&fe^~le&ee,Se=ae&pe^ae&ke^pe&ke,Ae=he&Re^he&ve^Re&ve,Le=(ae>>>28|he<<4)^(ae<<30|he>>>2)^(ae<<25|he>>>7),Je=(he>>>28|ae<<4)^(he<<30|ae>>>2)^(he<<25|ae>>>7),Ve=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),gt=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),yt=s[J],Bt=yt.high,Nt=yt.low,mr=te+gt,hr=Ce+Ve+(mr>>>0<te>>>0?1:0),mr=mr+xe,hr=hr+Ne+(mr>>>0<xe>>>0?1:0),mr=mr+Nt,hr=hr+Bt+(mr>>>0<Nt>>>0?1:0),mr=mr+X,hr=hr+Q+(mr>>>0<X>>>0?1:0),St=Je+Ae,$r=Le+Se+(St>>>0<Je>>>0?1:0);Ce=q,te=ee,q=re,ee=fe,re=ue,fe=le,le=be+mr|0,ue=Te+hr+(le>>>0<be>>>0?1:0)|0,Te=ke,be=ve,ke=pe,ve=Re,pe=ae,Re=he,he=mr+St|0,ae=hr+$r+(he>>>0<mr>>>0?1:0)|0}O=_.low=O+he,_.high=k+ae+(O>>>0<he>>>0?1:0),v=y.low=v+Re,y.high=b+pe+(v>>>0<Re>>>0?1:0),w=i.low=w+ve,i.high=g+ke+(w>>>0<ve>>>0?1:0),N=a.low=N+be,a.high=M+Te+(N>>>0<be>>>0?1:0),G=t.low=G+le,t.high=I+ue+(G>>>0<le>>>0?1:0),H=S.low=H+fe,S.high=z+re+(H>>>0<fe>>>0?1:0),U=x.low=U+ee,x.high=K+q+(U>>>0<ee>>>0?1:0),V=o.low=V+te,o.high=B+Ce+(V>>>0<te>>>0?1:0)},_doFinalize:function(){var f=this._data,c=f.words,m=this._nDataBytes*8,_=f.sigBytes*8;c[_>>>5]|=128<<24-_%32,c[(_+128>>>10<<5)+30]=Math.floor(m/4294967296),c[(_+128>>>10<<5)+31]=m,f.sigBytes=c.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=D.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});d.SHA512=D._createHelper(h),d.HmacSHA512=D._createHmacHelper(h)}(),P.SHA512})},"3y9D":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=T.Hasher,p=d.algo,C=[],E=p.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,s){for(var n=this._hash.words,h=n[0],f=n[1],c=n[2],m=n[3],_=n[4],y=0;y<80;y++){if(y<16)C[y]=l[s+y]|0;else{var i=C[y-3]^C[y-8]^C[y-14]^C[y-16];C[y]=i<<1|i>>>31}var a=(h<<5|h>>>27)+_+C[y];y<20?a+=(f&c|~f&m)+1518500249:y<40?a+=(f^c^m)+1859775393:y<60?a+=(f&c|f&m|c&m)-1894007588:a+=(f^c^m)-899497514,_=m,m=c,c=f<<30|f>>>2,f=h,h=a}n[0]=n[0]+h|0,n[1]=n[1]+f|0,n[2]=n[2]+c|0,n[3]=n[3]+m|0,n[4]=n[4]+_|0},_doFinalize:function(){var l=this._data,s=l.words,n=this._nDataBytes*8,h=l.sigBytes*8;return s[h>>>5]|=128<<24-h%32,s[(h+64>>>9<<4)+14]=Math.floor(n/4294967296),s[(h+64>>>9<<4)+15]=n,l.sigBytes=s.length*4,this._process(),this._hash},clone:function(){var l=u.clone.call(this);return l._hash=this._hash.clone(),l}});d.SHA1=u._createHelper(E),d.HmacSHA1=u._createHmacHelper(E)}(),P.SHA1})},4:function(j,Z){},"55Ip":function(j,Z,L){"use strict";L.d(Z,"a",function(){return a}),L.d(Z,"b",function(){return O});var P=L("Ty5D"),d=L("dI71"),T=L("q1tI"),D=L.n(T),u=L("YS25"),p=L("17x9"),C=L.n(p),E=L("wx14"),l=L("zLVn"),s=L("9R94"),n=function(v){Object(d.a)(g,v);function g(){for(var M,N=arguments.length,I=new Array(N),G=0;G<N;G++)I[G]=arguments[G];return M=v.call.apply(v,[this].concat(I))||this,M.history=Object(u.a)(M.props),M}var w=g.prototype;return w.render=function(){return D.a.createElement(P.c,{history:this.history,children:this.props.children})},g}(D.a.Component),h=function(v){Object(d.a)(g,v);function g(){for(var M,N=arguments.length,I=new Array(N),G=0;G<N;G++)I[G]=arguments[G];return M=v.call.apply(v,[this].concat(I))||this,M.history=Object(u.b)(M.props),M}var w=g.prototype;return w.render=function(){return D.a.createElement(P.c,{history:this.history,children:this.props.children})},g}(D.a.Component),f=function(g,w){return typeof g=="function"?g(w):g},c=function(g,w){return typeof g=="string"?Object(u.c)(g,null,null,w):g},m=function(g){return g},_=D.a.forwardRef;typeof _=="undefined"&&(_=m);function y(v){return!!(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey)}var i=_(function(v,g){var w=v.innerRef,M=v.navigate,N=v.onClick,I=Object(l.a)(v,["innerRef","navigate","onClick"]),G=I.target,z=Object(E.a)({},I,{onClick:function(K){try{N&&N(K)}catch(U){throw K.preventDefault(),U}!K.defaultPrevented&&K.button===0&&(!G||G==="_self")&&!y(K)&&(K.preventDefault(),M())}});return m!==_?z.ref=g||w:z.ref=w,D.a.createElement("a",z)}),a=_(function(v,g){var w=v.component,M=w===void 0?i:w,N=v.replace,I=v.to,G=v.innerRef,z=Object(l.a)(v,["component","replace","to","innerRef"]);return D.a.createElement(P.e.Consumer,null,function(H){H||Object(s.a)(!1);var K=H.history,U=c(f(I,H.location),H.location),B=U?K.createHref(U):"",V=Object(E.a)({},z,{href:B,navigate:function(){var he=f(I,H.location),pe=N?K.replace:K.push;pe(he)}});return m!==_?V.ref=g||G:V.innerRef=G,D.a.createElement(M,V)})});if(!1)var t,S;var x=function(g){return g},o=D.a.forwardRef;typeof o=="undefined"&&(o=x);function k(){for(var v=arguments.length,g=new Array(v),w=0;w<v;w++)g[w]=arguments[w];return g.filter(function(M){return M}).join(" ")}var O=o(function(v,g){var w=v["aria-current"],M=w===void 0?"page":w,N=v.activeClassName,I=N===void 0?"active":N,G=v.activeStyle,z=v.className,H=v.exact,K=v.isActive,U=v.location,B=v.sensitive,V=v.strict,ae=v.style,he=v.to,pe=v.innerRef,Re=Object(l.a)(v,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return D.a.createElement(P.e.Consumer,null,function(ke){ke||Object(s.a)(!1);var ve=U||ke.location,Te=c(f(he,ve),ve),be=Te.pathname,ue=be&&be.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),le=ue?Object(P.f)(ve.pathname,{path:ue,exact:H,sensitive:B,strict:V}):null,re=!!(K?K(le,ve):le),fe=re?k(z,I):z,q=re?Object(E.a)({},ae,{},G):ae,ee=Object(E.a)({"aria-current":re&&M||null,className:fe,style:q,to:Te},Re);return x!==o?ee.ref=g||pe:ee.innerRef=pe,D.a.createElement(a,ee)})});if(!1)var b},"5hvy":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.WordArray,p=D.Hasher,C=T.x64,E=C.Word,l=T.algo,s=[],n=[],h=[];(function(){for(var m=1,_=0,y=0;y<24;y++){s[m+5*_]=(y+1)*(y+2)/2%64;var i=_%5,a=(2*m+3*_)%5;m=i,_=a}for(var m=0;m<5;m++)for(var _=0;_<5;_++)n[m+5*_]=_+(2*m+3*_)%5*5;for(var t=1,S=0;S<24;S++){for(var x=0,o=0,k=0;k<7;k++){if(t&1){var O=(1<<k)-1;O<32?o^=1<<O:x^=1<<O-32}t&128?t=t<<1^113:t<<=1}h[S]=E.create(x,o)}})();var f=[];(function(){for(var m=0;m<25;m++)f[m]=E.create()})();var c=l.SHA3=p.extend({cfg:p.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],_=0;_<25;_++)m[_]=new E.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,_){for(var y=this._state,i=this.blockSize/2,a=0;a<i;a++){var t=m[_+2*a],S=m[_+2*a+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=y[a];x.high^=S,x.low^=t}for(var o=0;o<24;o++){for(var k=0;k<5;k++){for(var O=0,b=0,v=0;v<5;v++){var x=y[k+5*v];O^=x.high,b^=x.low}var g=f[k];g.high=O,g.low=b}for(var k=0;k<5;k++)for(var w=f[(k+4)%5],M=f[(k+1)%5],N=M.high,I=M.low,O=w.high^(N<<1|I>>>31),b=w.low^(I<<1|N>>>31),v=0;v<5;v++){var x=y[k+5*v];x.high^=O,x.low^=b}for(var G=1;G<25;G++){var O,b,x=y[G],z=x.high,H=x.low,K=s[G];K<32?(O=z<<K|H>>>32-K,b=H<<K|z>>>32-K):(O=H<<K-32|z>>>64-K,b=z<<K-32|H>>>64-K);var U=f[n[G]];U.high=O,U.low=b}var B=f[0],V=y[0];B.high=V.high,B.low=V.low;for(var k=0;k<5;k++)for(var v=0;v<5;v++){var G=k+5*v,x=y[G],ae=f[G],he=f[(k+1)%5+5*v],pe=f[(k+2)%5+5*v];x.high=ae.high^~he.high&pe.high,x.low=ae.low^~he.low&pe.low}var x=y[0],Re=h[o];x.high^=Re.high,x.low^=Re.low}},_doFinalize:function(){var m=this._data,_=m.words,y=this._nDataBytes*8,i=m.sigBytes*8,a=this.blockSize*32;_[i>>>5]|=1<<24-i%32,_[(d.ceil((i+1)/a)*a>>>5)-1]|=128,m.sigBytes=_.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,o=[],k=0;k<x;k++){var O=t[k],b=O.high,v=O.low;b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,o.push(v),o.push(b)}return new u.init(o,S)},clone:function(){for(var m=p.clone.call(this),_=m._state=this._state.slice(0),y=0;y<25;y++)_[y]=_[y].clone();return m}});T.SHA3=p._createHelper(c),T.HmacSHA3=p._createHmacHelper(c)}(Math),P.SHA3})},"6+eU":function(j,Z,L){"use strict";L.d(Z,"a",function(){return o});var P=L("wx14"),d=L("rePB"),T=L("VTBJ"),D=L("1OyB"),u=L("vuIU"),p=L("Ji7U"),C=L("LK+K"),E=L("q1tI"),l=L.n(E),s=L("TSYQ"),n=L.n(s),h=function(O){var b,v="".concat(O.rootPrefixCls,"-item"),g=n()(v,"".concat(v,"-").concat(O.page),(b={},Object(d.a)(b,"".concat(v,"-active"),O.active),Object(d.a)(b,O.className,!!O.className),Object(d.a)(b,"".concat(v,"-disabled"),!O.page),b)),w=function(){O.onClick(O.page)},M=function(I){O.onKeyPress(I,O.onClick,O.page)};return l.a.createElement("li",{title:O.showTitle?O.page:null,className:g,onClick:w,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",l.a.createElement("a",{rel:"nofollow"},O.page)))},f=h,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},m=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(){var v;Object(D.a)(this,b);for(var g=arguments.length,w=new Array(g),M=0;M<g;M++)w[M]=arguments[M];return v=O.call.apply(O,[this].concat(w)),v.state={goInputText:""},v.buildOptionText=function(N){return"".concat(N," ").concat(v.props.locale.items_per_page)},v.changeSize=function(N){v.props.changeSize(Number(N))},v.handleChange=function(N){v.setState({goInputText:N.target.value})},v.handleBlur=function(N){var I=v.props,G=I.goButton,z=I.quickGo,H=I.rootPrefixCls,K=v.state.goInputText;if(G||K==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(H,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;v.setState({goInputText:""}),z(v.getValidValue())},v.go=function(N){var I=v.state.goInputText;if(I==="")return;(N.keyCode===c.ENTER||N.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(u.a)(b,[{key:"getValidValue",value:function(){var g=this.state,w=g.goInputText,M=g.current;return!w||isNaN(w)?M:Number(w)}},{key:"getPageSizeOptions",value:function(){var g=this.props,w=g.pageSize,M=g.pageSizeOptions;return M.some(function(N){return N.toString()===w.toString()})?M:M.concat([w.toString()]).sort(function(N,I){var G=isNaN(Number(N))?0:Number(N),z=isNaN(Number(I))?0:Number(I);return G-z})}},{key:"render",value:function(){var g=this,w=this.props,M=w.pageSize,N=w.locale,I=w.rootPrefixCls,G=w.changeSize,z=w.quickGo,H=w.goButton,K=w.selectComponentClass,U=w.buildOptionText,B=w.selectPrefixCls,V=w.disabled,ae=this.state.goInputText,he="".concat(I,"-options"),pe=K,Re=null,ke=null,ve=null;if(!G&&!z)return null;var Te=this.getPageSizeOptions();if(G&&pe){var be=Te.map(function(ue,le){return l.a.createElement(pe.Option,{key:le,value:ue.toString()},(U||g.buildOptionText)(ue))});Re=l.a.createElement(pe,{disabled:V,prefixCls:B,showSearch:!1,className:"".concat(he,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},be)}return z&&(H&&(ve=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(he,"-quick-jumper-button")},N.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),ke=l.a.createElement("div",{className:"".concat(he,"-quick-jumper")},N.jump_to,l.a.createElement("input",{disabled:V,type:"text",value:ae,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,ve)),l.a.createElement("li",{className:"".concat(he)},Re,ke)}}]),b}(l.a.Component);m.defaultProps={pageSizeOptions:["10","20","50","100"]};var _=m,y=L("N2Kk");function i(){}function a(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,b){return b}function S(k,O,b){var v=typeof k=="undefined"?O.pageSize:k;return Math.floor((b.total-1)/v)+1}var x=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(v){var g;Object(D.a)(this,b),g=O.call(this,v),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(G,z){var H=g.props.prefixCls,K=G||l.a.createElement("button",{type:"button","aria-label":z,className:"".concat(H,"-item-link")});return typeof G=="function"&&(K=l.a.createElement(G,Object(T.a)({},g.props))),K},g.savePaginationNode=function(G){g.paginationNode=G},g.isValid=function(G){return a(G)&&G!==g.state.current},g.shouldDisplayQuickJumper=function(){var G=g.props,z=G.showQuickJumper,H=G.pageSize,K=G.total;return K<=H?!1:z},g.handleKeyDown=function(G){(G.keyCode===c.ARROW_UP||G.keyCode===c.ARROW_DOWN)&&G.preventDefault()},g.handleKeyUp=function(G){var z=g.getValidValue(G),H=g.state.currentInputValue;z!==H&&g.setState({currentInputValue:z}),G.keyCode===c.ENTER?g.handleChange(z):G.keyCode===c.ARROW_UP?g.handleChange(z-1):G.keyCode===c.ARROW_DOWN&&g.handleChange(z+1)},g.changePageSize=function(G){var z=g.state.current,H=S(G,g.state,g.props);z=z>H?H:z,H===0&&(z=g.state.current),typeof G=="number"&&("pageSize"in g.props||g.setState({pageSize:G}),"current"in g.props||g.setState({current:z,currentInputValue:z})),g.props.onShowSizeChange(z,G),"onChange"in g.props&&g.props.onChange&&g.props.onChange(z,G)},g.handleChange=function(G){var z=g.props.disabled,H=G;if(g.isValid(H)&&!z){var K=S(void 0,g.state,g.props);H>K?H=K:H<1&&(H=1),"current"in g.props||g.setState({current:H,currentInputValue:H});var U=g.state.pageSize;return g.props.onChange(H,U),H}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current<S(void 0,g.state,g.props)},g.runIfEnter=function(G,z){if(G.key==="Enter"||G.charCode===13){for(var H=arguments.length,K=new Array(H>2?H-2:0),U=2;U<H;U++)K[U-2]=arguments[U];z.apply(void 0,K)}},g.runIfEnterPrev=function(G){g.runIfEnter(G,g.prev)},g.runIfEnterNext=function(G){g.runIfEnter(G,g.next)},g.runIfEnterJumpPrev=function(G){g.runIfEnter(G,g.jumpPrev)},g.runIfEnterJumpNext=function(G){g.runIfEnter(G,g.jumpNext)},g.handleGoTO=function(G){(G.keyCode===c.ENTER||G.type==="click")&&g.handleChange(g.state.currentInputValue)};var w=v.onChange!==i,M="current"in v;M&&!w&&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=v.defaultCurrent;"current"in v&&(N=v.current);var I=v.defaultPageSize;return"pageSize"in v&&(I=v.pageSize),N=Math.min(N,S(I,void 0,v)),g.state={current:N,currentInputValue:N,pageSize:I},g}return Object(u.a)(b,[{key:"componentDidUpdate",value:function(g,w){var M=this.props.prefixCls;if(w.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(M,"-item-").concat(w.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(g){var w=g.target.value,M=S(void 0,this.state,this.props),N=this.state.currentInputValue,I;return w===""?I=w:isNaN(Number(w))?I=N:w>=M?I=M:I=Number(w),I}},{key:"getShowSizeChanger",value:function(){var g=this.props,w=g.showSizeChanger,M=g.total,N=g.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:M>N}},{key:"renderPrev",value:function(g){var w=this.props,M=w.prevIcon,N=w.itemRender,I=N(g,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"renderNext",value:function(g){var w=this.props,M=w.nextIcon,N=w.itemRender,I=N(g,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"render",value:function(){var g=this,w=this.props,M=w.prefixCls,N=w.className,I=w.style,G=w.disabled,z=w.hideOnSinglePage,H=w.total,K=w.locale,U=w.showQuickJumper,B=w.showLessItems,V=w.showTitle,ae=w.showTotal,he=w.simple,pe=w.itemRender,Re=w.showPrevNextJumpers,ke=w.jumpPrevIcon,ve=w.jumpNextIcon,Te=w.selectComponentClass,be=w.selectPrefixCls,ue=w.pageSizeOptions,le=this.state,re=le.current,fe=le.pageSize,q=le.currentInputValue;if(z===!0&&H<=fe)return null;var ee=S(void 0,this.state,this.props),Ce=[],te=null,J=null,X=null,Q=null,Ee=null,ge=U&&U.goButton,Oe=B?1:2,Qe=re-1>0?re-1:0,rt=re+1<ee?re+1:ee,nt=Object.keys(this.props).reduce(function(xe,Se){return(Se.substr(0,5)==="data-"||Se.substr(0,5)==="aria-"||Se==="role")&&(xe[Se]=g.props[Se]),xe},{});if(he)return ge&&(typeof ge=="boolean"?Ee=l.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},K.jump_to_confirm):Ee=l.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ge),Ee=l.a.createElement("li",{title:V?"".concat(K.jump_to).concat(re,"/").concat(ee):null,className:"".concat(M,"-simple-pager")},Ee)),l.a.createElement("ul",Object(P.a)({className:n()(M,"".concat(M,"-simple"),Object(d.a)({},"".concat(M,"-disabled"),G),N),style:I,ref:this.savePaginationNode},nt),l.a.createElement("li",{title:V?K.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(d.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Qe)),l.a.createElement("li",{title:V?"".concat(re,"/").concat(ee):null,className:"".concat(M,"-simple-pager")},l.a.createElement("input",{type:"text",value:q,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),l.a.createElement("span",{className:"".concat(M,"-slash")},"/"),ee),l.a.createElement("li",{title:V?K.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(d.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(rt)),Ee);if(ee<=3+Oe*2){var ut={locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:V,itemRender:pe};ee||Ce.push(l.a.createElement(f,Object(P.a)({},ut,{key:"noPager",page:ee,className:"".concat(M,"-disabled")})));for(var dt=1;dt<=ee;dt+=1){var mt=re===dt;Ce.push(l.a.createElement(f,Object(P.a)({},ut,{key:dt,page:dt,active:mt})))}}else{var He=B?K.prev_3:K.prev_5,De=B?K.next_3:K.next_5;Re&&(te=l.a.createElement("li",{title:V?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(M,"-jump-prev"),Object(d.a)({},"".concat(M,"-jump-prev-custom-icon"),!!ke))},pe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ke,"prev page"))),J=l.a.createElement("li",{title:V?De:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(M,"-jump-next"),Object(d.a)({},"".concat(M,"-jump-next-custom-icon"),!!ve))},pe(this.getJumpNextPage(),"jump-next",this.getItemIcon(ve,"next page")))),Q=l.a.createElement(f,{locale:K,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ee,page:ee,active:!1,showTitle:V,itemRender:pe}),X=l.a.createElement(f,{locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:V,itemRender:pe});var at=Math.max(1,re-Oe),ht=Math.min(re+Oe,ee);re-1<=Oe&&(ht=1+Oe*2),ee-re<=Oe&&(at=ee-Oe*2);for(var Ze=at;Ze<=ht;Ze+=1){var st=re===Ze;Ce.push(l.a.createElement(f,{locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:st,showTitle:V,itemRender:pe}))}re-1>=Oe*2&&re!==1+2&&(Ce[0]=Object(E.cloneElement)(Ce[0],{className:"".concat(M,"-item-after-jump-prev")}),Ce.unshift(te)),ee-re>=Oe*2&&re!==ee-2&&(Ce[Ce.length-1]=Object(E.cloneElement)(Ce[Ce.length-1],{className:"".concat(M,"-item-before-jump-next")}),Ce.push(J)),at!==1&&Ce.unshift(X),ht!==ee&&Ce.push(Q)}var Ue=null;ae&&(Ue=l.a.createElement("li",{className:"".concat(M,"-total-text")},ae(H,[H===0?0:(re-1)*fe+1,re*fe>H?H:re*fe])));var Me=!this.hasPrev()||!ee,Ne=!this.hasNext()||!ee;return l.a.createElement("ul",Object(P.a)({className:n()(M,N,Object(d.a)({},"".concat(M,"-disabled"),G)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,l.a.createElement("li",{title:V?K.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(d.a)({},"".concat(M,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Qe)),Ce,l.a.createElement("li",{title:V?K.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(d.a)({},"".concat(M,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(rt)),l.a.createElement(_,{disabled:G,locale:K,rootPrefixCls:M,selectComponentClass:Te,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:fe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(g,w){var M={};if("current"in g&&(M.current=g.current,g.current!==w.current&&(M.currentInputValue=M.current)),"pageSize"in g&&g.pageSize!==w.pageSize){var N=w.current,I=S(g.pageSize,w,g);N=N>I?I:N,"current"in g||(M.current=N,M.currentInputValue=N),M.pageSize=g.pageSize}return M}}]),b}(l.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:y.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var o=x},"6RRn":function(j,Z,L){"use strict";var P=L("wCXF"),d=L("n6Qo");L.d(Z,"b",function(){return d.a});var T=L("IBYe"),D=L("6eGT"),u=L("hW8S");L.d(Z,"a",function(){return u.a}),Z.c=P.b},"6eGT":function(j,Z,L){"use strict";function P(d){return null}Z.a=P},"7Cbv":function(j,Z,L){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),d=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(d)}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(f){return typeof f=="string"&&D.test(f)}for(var p=u,C=[],E=0;E<256;++E)C.push((E+256).toString(16).substr(1));function l(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(C[f[c+0]]+C[f[c+1]]+C[f[c+2]]+C[f[c+3]]+"-"+C[f[c+4]]+C[f[c+5]]+"-"+C[f[c+6]]+C[f[c+7]]+"-"+C[f[c+8]]+C[f[c+9]]+"-"+C[f[c+10]]+C[f[c+11]]+C[f[c+12]]+C[f[c+13]]+C[f[c+14]]+C[f[c+15]]).toLowerCase();if(!p(m))throw TypeError("Stringified UUID is invalid");return m}var s=l;function n(f,c,m){f=f||{};var _=f.random||(f.rng||T)();if(_[6]=_[6]&15|64,_[8]=_[8]&63|128,c){m=m||0;for(var y=0;y<16;++y)c[m+y]=_[y];return c}return s(_)}var h=Z.a=n},"7ahc":function(j,Z,L){"use strict";L.d(Z,"a",function(){return S});var P=L("k1fw"),d=L("0Owb"),T=L("+L6B"),D=L("2/Rp"),u=L("y8nQ"),p=L("Vl3Y"),C=L("tJVT"),E=L("OaEy"),l=L("2fM7"),s=L("q1tI"),n=L.n(s),h=L("VrN/"),f=L.n(h),c=L("p77/"),m=L.n(c),_=L("c5Ni"),y=L.n(_),i=l.a.Option,a={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"]};Z.b=function(x){var o=x.callback,k=x.onCancel,O=Object(s.useState)("python"),b=Object(C.a)(O,2),v=b[0],g=b[1];function w(N){g(t[N][1])}function M(N){o(N)}return n.a.createElement(p.a,Object(d.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(l.a,{onChange:w},Object.keys(t).map(function(N){return n.a.createElement(i,{key:N,value:N},t[N][0])}))),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(S,{mode:v})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(D.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function S(x){var o=x.value,k=x.onChange,O=x.mode,b=x.options,v=b===void 0?{}:b,g=Object(s.useRef)(),w=Object(s.useState)(),M=Object(C.a)(w,2),N=M[0],I=M[1];return Object(s.useEffect)(function(){if(N){function G(z){var H=z.getValue();k&&k(H)}return N.on("change",G),function(){N.off("change",G)}}},[N,k]),Object(s.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(s.useEffect)(function(){N&&((o!==N.getValue()||o==="")&&setTimeout(function(){N.setValue(o||" ")},300))},[N,o]),Object(s.useEffect)(function(){if(g.current&&!N){var G=f.a.fromTextArea(g.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));I(G)}},[g.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:g}))}},"815F":function(j,Z,L){"use strict";L.d(Z,"e",function(){return C}),L.d(Z,"c",function(){return l}),L.d(Z,"d",function(){return s}),L.d(Z,"a",function(){return h}),L.d(Z,"f",function(){return f}),L.d(Z,"b",function(){return c});var P=L("KQm4"),d=L("VTBJ"),T=L("Ff2n"),D=L("Zm9Q"),u=L("Kwbf"),p=L("OZM5");function C(m,_){return m!=null?m:_}function E(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=new Map;function y(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var S=t.key,x=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(a).concat(S,"]"));var o=String(S);Object(u.a)(!_.has(o)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(o)),_.set(o,!0),y(x,"".concat(a).concat(o," > "))})}y(m)}function l(m){function _(y){var i=Object(D.a)(y);return i.map(function(a){if(!Object(p.i)(a))return Object(u.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var t=a.key,S=a.props,x=S.children,o=Object(T.a)(S,["children"]),k=Object(d.a)({key:t},o),O=_(x);return O.length&&(k.children=O),k}).filter(function(a){return a})}return _(m)}function s(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],y=new Set(_===!0?[]:_),i=[];function a(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,o){var k=Object(p.h)(S?S.pos:"0",o),O=C(x.key,k),b=Object(d.a)(Object(d.a)({},x),{},{parent:S,pos:k,children:null,data:x,isStart:[].concat(Object(P.a)(S?S.isStart:[]),[o===0]),isEnd:[].concat(Object(P.a)(S?S.isEnd:[]),[o===t.length-1])});return i.push(b),_===!0||y.has(O)?b.children=a(x.children||[],b):b.children=[],b})}return a(m),i}function n(m,_,y){var i;y?typeof y=="string"?i=function(S){return S[y]}:typeof y=="function"&&(i=function(S){return y(S)}):i=function(S,x){return C(S.key,x)};function a(t,S,x){var o=t?t.children:m,k=t?Object(p.h)(x.pos,S):"0";if(t){var O=i(t,k),b={node:t,index:S,pos:k,key:O,parentPos:x.node?x.pos:null,level:x.level+1};_(b)}o&&o.forEach(function(v,g){a(v,g,{node:t,pos:k,level:x?x.level+1:-1})})}a(null)}function h(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=_.initWrapper,i=_.processEntity,a=_.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},o={posEntities:S,keyEntities:x};return y&&(o=y(o)||o),n(m,function(k){var O=k.node,b=k.index,v=k.pos,g=k.key,w=k.parentPos,M=k.level,N={node:O,index:b,key:g,pos:v,level:M},I=C(g,v);S[v]=N,x[I]=N,N.parent=S[w],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),i&&i(N,o)},t),a&&a(o),o}function f(m,_){var y=_.expandedKeys,i=_.selectedKeys,a=_.loadedKeys,t=_.loadingKeys,S=_.checkedKeys,x=_.halfCheckedKeys,o=_.dragOverNodeKey,k=_.dropPosition,O=_.keyEntities,b=O[m],v={eventKey:m,expanded:y.indexOf(m)!==-1,selected:i.indexOf(m)!==-1,loaded:a.indexOf(m)!==-1,loading:t.indexOf(m)!==-1,checked:S.indexOf(m)!==-1,halfChecked:x.indexOf(m)!==-1,pos:String(b?b.pos:""),dragOver:o===m&&k===0,dragOverGapTop:o===m&&k===-1,dragOverGapBottom:o===m&&k===1};return v}function c(m){var _=m.data,y=m.expanded,i=m.selected,a=m.checked,t=m.loaded,S=m.loading,x=m.halfChecked,o=m.dragOver,k=m.dragOverGapTop,O=m.dragOverGapBottom,b=m.pos,v=m.active,g=Object(d.a)(Object(d.a)({},_),{},{expanded:y,selected:i,checked:a,loaded:t,loading:S,halfChecked:x,dragOver:o,dragOverGapTop:k,dragOverGapBottom:O,pos:b,active:v});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(u.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),g}},"8EBN":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.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 d=0;d<P.modeInfo.length;d++){var T=P.modeInfo[d];T.mimes&&(T.mime=T.mimes[0])}P.findModeByMIME=function(D){D=D.toLowerCase();for(var u=0;u<P.modeInfo.length;u++){var p=P.modeInfo[u];if(p.mime==D)return p;if(p.mimes){for(var C=0;C<p.mimes.length;C++)if(p.mimes[C]==D)return p}}if(/\+xml$/.test(D))return P.findModeByMIME("application/xml");if(/\+json$/.test(D))return P.findModeByMIME("application/json")},P.findModeByExtension=function(D){D=D.toLowerCase();for(var u=0;u<P.modeInfo.length;u++){var p=P.modeInfo[u];if(p.ext){for(var C=0;C<p.ext.length;C++)if(p.ext[C]==D)return p}}},P.findModeByFileName=function(D){for(var u=0;u<P.modeInfo.length;u++){var p=P.modeInfo[u];if(p.file&&p.file.test(D))return p}var C=D.lastIndexOf("."),E=C>-1&&D.substring(C+1,D.length);if(E)return P.findModeByExtension(E)},P.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u<P.modeInfo.length;u++){var p=P.modeInfo[u];if(p.name.toLowerCase()==D)return p;if(p.alias){for(var C=0;C<p.alias.length;C++)if(p.alias[C].toLowerCase()==D)return p}}}})},"8hTe":function(j,Z,L){j.exports={button:"button___1wy9m"}},"9Bee":function(j,Z,L){"use strict";var P=L("DYRE"),d=L("zeV3"),T=L("+L6B"),D=L("2/Rp"),u=L("k1fw"),p=L("9og8"),C=L("tJVT"),E=L("WmNS"),l=L.n(E),s=L("q1tI"),n=L.n(s),h=L("vg9a"),f=L("DlQD"),c=L.n(f),m=L("rUJ1");function _(se,W){var $=se.match(/^(\s+)(?:```)/);if($===null)return W;var ne=$[1];return W.split(`
`).map(function(ce){var oe=ce.match(/^\s+/);if(oe===null)return ce;var Ke=Object(C.a)(oe,1),At=Ke[0];return At.length>=ne.length?ce.slice(ne.length):ce}).join(`
`)}var y=[],i=["<ul>"],a=new c.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){y.length=0,i=["<ul>"]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function o(se,W,$,ne){if(W>=se.length||se[W].level<=$)return W;var ce=se[W];ne.push("<li><a href='#"+ce.anchor+"'>"+ce.text+"</a>"),W++;var oe=[];return W=o(se,W,ce.level,oe),oe.length>0&&(ne.push("<ul>"),oe.forEach(function(Ke){ne.push(Ke)}),ne.push("</ul>")),ne.push("</li>"),W=o(se,W,$,ne),W}function k(){return o(y,0,0,i),i.push("</ul>"),i.join("")}var O={heading:function(W){var $=t.exec(W);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(W){var $=this.rules.block.fences.exec(W);if($){var ne=$[0],ce=_(ne,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ke=g(),At=ce;ce=Ke,w[Ke]={type:"block",expression:At}}return{type:"code",raw:ne,lang:oe,text:ce}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,v=0,g=function(){return"__special_katext_id_".concat(v++,"__")},w={};function M(){return w}function N(){v=0,w={}}function I(se){return se=se.replace(b,function(W,$){var ne=g();return w[ne]={type:"inline",expression:$},ne}),se}var G=a.listitem;a.listitem=function(se){return G(I(se))};var z=a.paragraph;a.paragraph=function(se){return z(I(se))};var H=a.tablecell;a.tablecell=function(se,W){return H(I(se),W)},a.code=function(se,W,$){var ne=(W||"").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(W,'">').concat($?se:Object(m.escape)(se,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+($?se:Object(m.escape)(se,!0))+"</code></pre>"},a.heading=function(se,W,$){var ne=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return y.push({anchor:ne,level:W,text:se}),"<h"+W+' id="'+ne+'">'+se+"</h"+W+">"},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:a});var K=c.a,U=L("SJMd"),B=L("ulZh"),V=L.n(B),ae=L("m3rI"),he=L("Oy/b"),pe=L("p5ED"),Re=L("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ke=function(se,W){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function ve(se,W){function $(){this.constructor=se}ke(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Te(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function be(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]<ce[3])){Ke.label=Pt[1];break}if(Pt[0]===6&&Ke.label<ce[1]){Ke.label=ce[1],ce=Pt;break}if(ce&&Ke.label<ce[2]){Ke.label=ce[2],Ke.ops.push(Pt);break}ce[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Pt=W.call(se,Ke)}catch(Br){Pt=[6,Br],ne=0}finally{$=ce=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Vt,vr])}}}function ue(){for(var se=0,W=0,$=arguments.length;W<$;W++)se+=arguments[W].length;var ne=Array(se),ce=0;for(W=0;W<$;W++)for(var oe=arguments[W],Ke=0,At=oe.length;Ke<At;Ke++,ce++)ne[ce]=oe[Ke];return ne}var le=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(W,$){for(var ne=0,ce=$;ne<ce.length;ne++){var oe=ce[ne],Ke=oe[0],At=oe[1];W.setAttribute(Ke,At)}},se.createRect=function(W,$,ne){var ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return ce.setAttribute("width",W.toString()),ce.setAttribute("height",$.toString()),ne&&se.setAttributes(ce,ne),ce},se.createLine=function(W,$,ne,ce,oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",W.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ne.toString()),Ke.setAttribute("y2",ce.toString()),oe&&se.setAttributes(Ke,oe),Ke},se.createPolygon=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ne.setAttribute("points",W),$&&se.setAttributes(ne,$),ne},se.createCircle=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return ne.setAttribute("cx",(W/2).toString()),ne.setAttribute("cy",(W/2).toString()),ne.setAttribute("r",W.toString()),$&&se.setAttributes(ne,$),ne},se.createEllipse=function(W,$,ne){var ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ce.setAttribute("cx",(W/2).toString()),ce.setAttribute("cy",($/2).toString()),ce.setAttribute("rx",(W/2).toString()),ce.setAttribute("ry",($/2).toString()),ne&&se.setAttributes(ce,ne),ce},se.createGroup=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&se.setAttributes($,W),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(W,$,ne,ce,oe,Ke,At){var Vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(Vt,[["id",W],["orient",$],["markerWidth",ne.toString()],["markerHeight",ce.toString()],["refX",oe.toString()],["refY",Ke.toString()]]),Vt.appendChild(At),Vt},se.createText=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),W&&se.setAttributes($,W),$},se.createTSpan=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ne.textContent=W,$&&se.setAttributes(ne,$),ne},se.createImage=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&se.setAttributes($,W),$},se.createPoint=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ne.x=W,ne.y=$,ne},se.createPath=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","path");return ne.setAttribute("d",W),$&&se.setAttributes(ne,$),ne},se}(),re=function(){function se(){}return se.addKey=function(W){se.key=W},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),fe=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(W,$,ne){var ce=this;return new Promise(function(oe){var Ke=ne!==void 0?ne:document.createElement("canvas");W===null&&(ce.markersOnly=!0,ce.naturalSize=!1);var At=document.createElementNS("http://www.w3.org/2000/svg","svg");At.setAttribute("xmlns","http://www.w3.org/2000/svg"),At.setAttribute("width",$.width.baseVal.valueAsString),At.setAttribute("height",$.height.baseVal.valueAsString),At.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),At.innerHTML=$.innerHTML,ce.naturalSize===!0?(At.width.baseVal.value=W.naturalWidth,At.height.baseVal.value=W.naturalHeight):ce.width!==void 0&&ce.height!==void 0&&(At.width.baseVal.value=ce.width,At.height.baseVal.value=ce.height),Ke.width=At.width.baseVal.value,Ke.height=At.height.baseVal.value;var Vt=At.outerHTML,vr=Ke.getContext("2d");ce.markersOnly!==!0&&vr.drawImage(W,0,0,Ke.width,Ke.height);var Pt=window.URL,Br=new Image(Ke.width,Ke.height);Br.setAttribute("crossOrigin","anonymous");var jr=new Blob([Vt],{type:"image/svg+xml"}),fn=Pt.createObjectURL(jr);Br.onload=function(){vr.drawImage(Br,0,0),Pt.revokeObjectURL(fn);var ti=Ke.toDataURL(ce.imageType,ce.imageQuality);oe(ti)},Br.src=fn})},se}(),q=function(){},ee=function(){function se(W){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},se.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).appendChild(this.styleSheet),this.addRule(new Ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new te("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new te("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Ce=function(se,W){this.selector=se,this.style=W},te=function(se,W){this.localName=se,this.style=W},J=function(){function se(W,$,ne,ce,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=W,this.displayMode=$,this.markerItems=ne,this.uiStyleSettings=ce,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(W){var $=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(ne),this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ne,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Ke=document.createElement("div");Ke.className=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",oe.typeName),Ke.innerHTML=oe.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,oe)}),$.buttons.push(Ke),$.markerButtons.push(Ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ce,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},se.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$<this.markerButtons.length;$++)$<W||$===W&&this.markerButtons.length-1===W?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===W&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},se.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},se.prototype.resetButtonStyles=function(){var W=this;this.buttons.forEach(function($){$.className=$.className.replace(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:W.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(W,$,ne){var ce=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=$,oe.setAttribute("data-action",ne),oe.addEventListener("click",function(){ce.actionToolbarButtonClicked(oe,ne)}),ne){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}W.appendChild(oe),this.buttons.push(oe)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new te("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new te("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new te("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new te("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new te("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var W=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new te("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
padding: `+W+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new te("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new te("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},se.prototype.markerToolbarButtonClicked=function(W,$){this.setActiveButton(W),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(W,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(W){var $=this.markerButtons.find(function(ne){return ne.getAttribute("data-type-name")===W});$&&this.setActiveButton($)},se.prototype.setCurrentMarker=function(W){var $=this;this.currentMarker=W,this.buttons.filter(function(ne){return/delete|notes/.test(ne.getAttribute("data-action"))}).forEach(function(ne){$.currentMarker===void 0?(ne.style.fillOpacity="0.4",ne.style.pointerEvents="none"):(ne.style.fillOpacity="1",ne.style.pointerEvents="all")})},se}(),X=function(){function se(W,$,ne,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=$,this.uiStyleSettings=ne,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var W;this.toolboxStyleClass=this.styles.addClass(new te("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new te("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new te("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new te("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new te("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new te("toolbox-panel-row_colors",`
background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new te("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
padding: `+$+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new te("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new te("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(W){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(W){var $,ne,ce=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ne!==void 0?ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ke;oe.uiStyleSettings=ce.uiStyleSettings;var At=document.createElement("div");At.className=ce.toolboxButtonStyleClass.name+" "+((Ke=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ce.toolboxButtonStyleColorsClass.name),At.innerHTML=oe.icon,At.title=oe.title,At.addEventListener("click",function(){ce.panelButtonClick(oe)}),ce.panelButtons.push(At),ce.buttonRow.appendChild(At)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(W){var $=this,ne=-1;if(W!==this.activePanel){ne=this.panels.indexOf(W),this.panelRow.innerHTML="";var ce=W.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ke){var At,Vt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ke===ne?""+((At=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&At!==void 0?At:$.toolboxActiveButtonStyleColorsClass.name):""+((Vt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:$.toolboxButtonStyleColorsClass.name))})},se}(),Q=function(se,W){this.title=se,this.icon=W},Ee=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ne,Ke.currentColor=ce,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var oe=$.getColorBox(ce);ne.appendChild(oe),$.colorBoxes.push(oe)}),ne},W.prototype.getColorBox=function($){var ne=this,ce=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ce,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=oe-2+"px",Ke.style.height=oe-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(oe+2)/2+"px",Ke.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ne.setCurrentColor($,Ke)});var At=document.createElement("div");return At.style.display="inline-block",At.style.width=oe-2+"px",At.style.height=oe-2+"px",At.style.backgroundColor=$,At.style.borderRadius=oe/2+"px",$==="transparent"&&(At.style.fill=this.uiStyleSettings.toolboxAccentColor,At.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Ke.appendChild(At),Ke},W.prototype.setCurrentColor=function($,ne){var ce=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},W}(Q),ge=function(){function se(W,$,ne){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=$,this.globalSettings=ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(W){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(W,$){},se.prototype.dblClick=function(W,$){},se.prototype.manipulate=function(W){},se.prototype.pointerUp=function(W){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},se.prototype.scale=function(W,$){},se.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},se.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),Oe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},se}(),Qe=function(){function se(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se}(),rt=function(){function se(){}return se.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},se.toSVGMatrix=function(W,$){return W.a=$.a,W.b=$.b,W.c=$.c,W.d=$.d,W.e=$.e,W.f=$.f,W},se}(),nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(le.createTransform()),oe.setupControlBox(),oe}return ve(W,se),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ne=le.createTransform();this._visual.transform.baseVal.appendItem(ne)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint($);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ne)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},W.prototype.manipulate=function($){var ne=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ne):this.state==="rotate"&&this.rotate($)},W.prototype.resize=function($){var ne=this.manipulationStartLeft,ce=this.manipulationStartWidth,oe=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ne=this.manipulationStartLeft+$.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+$.y-this.manipulationStartY}ce>=0?(this.left=ne,this.width=ce):(this.left=ne+ce,this.width=-ce),Ke>=0?(this.top=oe,this.height=Ke):(this.top=oe+Ke,this.height=-Ke),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ne=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ne,this.applyRotation()}},W.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},W.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM(),ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM();ne=ne.inverse();var ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Oe,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},W.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ne=-$/2,ce=ne,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,At=this.height+this.CB_DISTANCE-$/2,Vt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ne,ce),this.positionGrip(this.controlGrips.topCenter.visual,oe,ce),this.positionGrip(this.controlGrips.topRight.visual,Vt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ne,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Vt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ne,At),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,At),this.positionGrip(this.controlGrips.bottomRight.visual,Vt,At),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ce-3*this.CB_DISTANCE)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.left=ne.left,this.top=ne.top,this.width=ne.width,this.height=ne.height,this.rotationAngle=ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ne.containerTransformMatrix))},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne);var ce=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ce.x*$,y:ce.y*ne});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*ne,this.adjustControlBox()},W}(ge),ut=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},W.prototype.createVisual=function(){this.visual=le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},W.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},W.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},W.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},W.title="Rectangle marker",W}(nt),dt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ne,Ke.currentWidth=ce,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.widths.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=ce.toString(),Ke.style.marginRight="5px",oe.appendChild(Ke);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.display="flex",At.style.alignItems="center";var Vt=document.createElement("hr");Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop=ce+"px solid "+$.uiStyleSettings.toolboxColor,Vt.style.flexGrow="2",At.appendChild(Vt),oe.appendChild(At),$.widthBoxes.push(oe)}),ne},W.prototype.setCurrentWidth=function($,ne){var ce=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(Q),mt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ne,Ke.currentStyle=ce,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.styles.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ce===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var At=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ce!==""?'stroke-dasharray="'+ce+'"':"")+` />
</svg>`;Ke.innerHTML=At,oe.appendChild(Ke),$.styleBoxes.push(oe)}),ne},W.prototype.setCurrentStyle=function($,ne){var ce=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(Q),He=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="FrameMarker",W.title="Frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',W}(ut),De=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},at=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},W.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.x1=ne.x1,this.y1=ne.y1,this.x2=ne.x2,this.y2=ne.y2},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.x1=this.x1*$,this.y1=this.y1*ne,this.x2=this.x2*$,this.y2=this.y2*ne,this.adjustVisual(),this.adjustControlBox()},W}(ge),ht=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',W}(at),Ze=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ne,Ke.currentFont=ce,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.flexGrow="2",this.fonts.forEach(function(ce){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ce===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ce,Ke.style.overflow="hidden";var At=document.createElement("div");At.style.whiteSpace="nowrap",At.style.overflow="hidden",At.style.textOverflow="ellipsis",At.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(At),oe.appendChild(Ke),$.fontBoxes.push(oe)}),ne},W.prototype.setCurrentFont=function($,ne){var ce=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(Q),st=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ce.defaultColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return ve(W,se),W.prototype.ownsTarget=function($){if(se.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ne=!1;return this.textElement.childNodes.forEach(function(ce){ce===$&&(ne=!0)}),ne},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.renderText=function(){var $=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ne){$.textElement.appendChild(le.createTSpan(ne.trim()===""?" ":ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ne=1;if($.width>0&&$.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;ne=Math.min(ce,oe)}return ne},W.prototype.getTextPosition=function($){var ne=this.textElement.getBBox(),ce=0,oe=0;return ne.width>0&&ne.height>0&&(ce=(this.width-ne.width*$)/2,oe=this.height/2-ne.height*$/2),{x:ce,y:oe}},W.prototype.sizeText=function(){var $=this.textElement.getBBox(),ne=this.getTextScale(),ce=this.getTextPosition(ne);ce.y-=$.y*ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+ne+", "+ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(ne,ne))},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function($){var ne=this.state;ne==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,$),this.setSize(),(ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var $=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ne){ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ne=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ne>.9;)ne-=.1,$.textEditor.style.fontSize=Math.max(ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ne){ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ne){if(ne.clipboardData){var ce=ne.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ce)),ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),oe={x:ce.width*$,y:ce.height*$};ne.x-=oe.x/2,ne.y-=oe.y/2,this.textEditor.style.top=ne.y+"px",this.textEditor.style.left=ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ne.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},W.prototype.dblClick=function($,ne){se.prototype.dblClick.call(this,$,ne),this.showTextEditor()},W.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},W.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.color=ne.color,this.fontFamily=ne.fontFamily,this.padding=ne.padding,this.text=ne.text,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',W}(nt),Ue=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ce.defaultColor,oe.lineWidth=ce.defaultStrokeWidth,oe.pixelRatio=ce.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,$)},W.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=ne[0],oe=ne[1],Ke=ne[2],At=ne[3],Vt=!1,vr=0;vr<this.canvasElement.height;vr++)for(var Pt=0;Pt<this.canvasElement.width;Pt++)$.data[vr*this.canvasElement.width*4+4*Pt+3]>0&&(Vt=!0,vr<oe&&(oe=vr),Pt<ce&&(ce=Pt),vr>At&&(At=vr),Pt>Ke&&(Ke=Pt));if(Vt){this.left=ce/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ke-ce)/this.pixelRatio,this.height=(At-oe)/this.pixelRatio;var Br=document.createElement("canvas");Br.width=Ke-ce,Br.height=At-oe,Br.getContext("2d").putImageData(this.canvasContext.getImageData(ce,oe,Ke-ce,At-oe),0,0),this.drawingImgUrl=Br.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function($){this.color=$,this.colorChanged($)},W.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){this.createVisual(),se.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',W}(nt),Me=function(se){function W($,ne,ce){var oe=se.call(this,$,ce||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=ne,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2";for(var ce=function(At){var Vt="both";switch(At){case 0:Vt="both";break;case 1:Vt="start";break;case 2:Vt="end";break;case 3:Vt="none"}var vr=document.createElement("div");if(vr.style.display="flex",vr.style.flexGrow="2",vr.style.alignItems="center",vr.style.justifyContent="space-between",vr.style.padding="5px",vr.style.borderWidth="2px",vr.style.borderStyle="solid",vr.style.borderColor=Vt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",vr.addEventListener("click",function(){$.setCurrentType(Vt,vr)}),ne.appendChild(vr),Vt==="both"||Vt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pt.style.marginLeft="5px",vr.appendChild(Pt)}var Br=document.createElement("div");Br.style.display="flex",Br.style.alignItems="center",Br.style.minHeight="20px",Br.style.flexGrow="2";var jr=document.createElement("hr");if(jr.style.minWidth="20px",jr.style.border="0px",jr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),jr.style.flexGrow="2",Br.appendChild(jr),vr.appendChild(Br),Vt==="both"||Vt==="end"){var fn=document.createElement("div");fn.style.display="flex",fn.style.alignItems="center",fn.style.minHeight="20px",fn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,fn.style.marginRight="5px",vr.appendChild(fn)}oe.typeBoxes.push(vr)},oe=this,Ke=0;Ke<4;Ke++)ce(Ke);return ne},W.prototype.setCurrentType=function($,ne){var ce=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(Q),Ne=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Me("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},W.prototype.getArrowPoints=function($,ne){var ce=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ce/2+","+(ne+oe/2)+" "+$+","+(ne-oe/2)+" "+($+ce/2)+","+(ne+oe/2)},W.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.arrow1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ne,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},W.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.arrowType=ne.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',W}(ht),xe=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor=ce.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Ee("Color",ce.defaultColorSet,ce.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="CoverMarker",W.title="Cover marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',W}(ut),Se=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ne,Ke.currentOpacity=ce,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",ne.style.justifyContent="space-between",this.opacities.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=100*ce+"%",oe.appendChild(Ke),$.opacityBoxes.push(oe)}),ne},W.prototype.setCurrentOpacity=function($,ne){var ce=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(Q),Ae=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ce.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ce.defaultHighlightOpacity,oe.fillPanel=new Ee("Color",ce.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Se("Opacity",ce.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ve(W,se),W.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',W}(xe),Le='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Je=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ce.defaultStrokeColor,oe.bgColor=ce.defaultFillColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Ee("Text color",ce.defaultColorSet,oe.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Ee("Fill color",ce.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Qe,oe.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return ve(W,se),W.prototype.ownsTarget=function($){return se.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},W.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function($,ne){this.state==="new"&&se.prototype.pointerDown.call(this,$,ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,$);else{var ne=this.state==="creating";se.prototype.pointerUp.call(this,$),this.setTipPoints(ne),this.positionTip()}},W.prototype.manipulate=function($){if(this.tipMoving){var ne=this.unrotatePoint($);this.tipPosition={x:ne.x-this.manipulationStartLeft,y:ne.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,$)},W.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},W.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},W.prototype.setTipPoints=function($){$===void 0&&($=!1);var ne=Math.min(this.height/2,15),ce=this.height/5;$&&(this.tipPosition={x:ne+ce/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:ne,y:0},this.tipBase2Position={x:ne+ce,y:0}):(this.tipBase1Position={x:0,y:ne},this.tipBase2Position={x:0,y:ne+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ne-ce,y:0},this.tipBase2Position={x:this.width-ne,y:0}):(this.tipBase1Position={x:this.width,y:ne},this.tipBase2Position={x:this.width,y:ne+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ne-ce,y:this.height},this.tipBase2Position={x:this.width-ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ne-ce},this.tipBase2Position={x:this.width,y:this.height-ne}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ne=Math.min(this.width/2,15),this.tipBase1Position={x:ne,y:this.height},this.tipBase2Position={x:ne+ce,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ne},this.tipBase2Position={x:0,y:this.height-ne-ce})},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.positionTip()},W.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,0)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},W.prototype.getState=function(){var $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.bgColor=ne.bgColor,this.tipPosition=ne.tipPosition,se.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.tipPosition={x:this.tipPosition.x*$,y:this.tipPosition.y*ne},this.positionTip()},W.typeName="CalloutMarker",W.title="Callout marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',W}(st),Ve=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.fillColor=ce.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new Ee("Line color",ue(ce.defaultColorSet,["transparent"]),ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Ee("Fill color",ue(ce.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Se("Opacity",ce.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},W.prototype.createVisual=function(){this.visual=le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},W.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},W.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},W.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},W.typeName="EllipseMarker",W.title="Ellipse marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(nt),gt=function(se){function W($,ne,ce){return se.call(this,$,ne,ce)||this}return ve(W,se),Object.defineProperty(W.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},W.prototype.createTips=function(){this.tip1=le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip2)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.tip1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ne,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',W}(ht),yt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokePanel.colors=ce.defaultColorSet,oe.fillColor="transparent",oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(Ve),Bt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},W.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),se.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},W.prototype.scale=function($,ne){this.curveX=this.curveX*$,this.curveY=this.curveY*ne,se.prototype.scale.call(this,$,ne)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.curveX=ne.curveX,this.curveY=ne.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',W}(at),mr=function(){function se(W,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=$}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),hr=function(se){function W($,ne,ce){var oe=se.call(this,$,!1)||this;return oe.dataUrl=ne,oe.state=ce,oe}return ve(W,se),W}(mr),St=function(se){function W($,ne,ce){ce===void 0&&(ce=!1);var oe=se.call(this,$,ce)||this;return oe.marker=ne,oe}return ve(W,se),W}(mr),$r=function(){function se(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return se.prototype.addEventListener=function(W,$){this[W].push($)},se.prototype.removeEventListener=function(W,$){var ne=this[W].indexOf($);ne>-1&&this[W].splice(ne,1)},se}(),Xr=function(){function se(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new Bt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new $r,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new ee(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,yt,Ve,Ae,Je,gt,xe,ht,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ve,Ae,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var $=this;this._availableMarkerTypes.splice(0),W.forEach(function(ne){if(typeof ne=="string"){var ce=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ne});ce!==void 0&&$._availableMarkerTypes.push(ce)}else $._availableMarkerTypes.push(ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var W=this;this.styles.styleSheetRoot===void 0&&q.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new mr(W))})},se.prototype.render=function(){return Te(this,void 0,void 0,function(){var W;return be(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(W=new fe).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},se.prototype.close=function(W){var $=this;if(W===void 0&&(W=!1),this.isOpen){var ne=!1;W||this.eventListeners.beforeclose.forEach(function(ce){var oe=new mr($,!0);ce(oe),oe.defaultPrevented&&(ne=!0)}),ne||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ce){return ce(new mr($))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var W,$=[],ne=0;ne<arguments.length;ne++)$[ne]=arguments[ne];(W=this._availableMarkerTypes).push.apply(W,$)},se.prototype.addRenderEventListener=function(W){this.addEventListener("render",function($){W($.dataUrl,$.state)})},se.prototype.removeRenderEventListener=function(W){},se.prototype.addCloseEventListener=function(W){this.addEventListener("close",function(){W()})},se.prototype.removeCloseEventListener=function(W){},se.prototype.setupResizeObserver=function(){var W=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return W.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupTargetResize=function(){var W=1*this.target.clientWidth/this.target.clientHeight,$=this.editorCanvas.clientWidth/W>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,ne=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/W;this.resize($,ne)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(W,$){this._isResizing=!0;var ne=W/this.imageWidth,ce=$/this.imageHeight;this.imageWidth=Math.round(W),this.imageHeight=Math.round($),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ne,ce),this._isResizing=!1},se.prototype.scaleMarkers=function(W,$){var ne,ce=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(W,$):(ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==ce._currentMarker&&oe.scale(W,$)}),ne!==void 0&&this.setCurrentMarker(ne)},se.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},se.prototype.setTopLeft=function(){var W=this.editingTarget.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=W.left-$.left,this.top=W.top-$.top},se.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},se.prototype.addDefs=function(){for(var W,$=[],ne=0;ne<arguments.length;ne++)$[ne]=arguments[ne];this.defs=le.createDefs(),this.addDefsToImage(),(W=this.defs).append.apply(W,$)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},se.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var W=document.createElement("a");W.href="https://markerjs.com/",W.target="_blank",W.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new X(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(W){this.markerImage.removeChild(W.container),this.markers.indexOf(W)>-1&&this.markers.splice(this.markers.indexOf(W),1),W.dispose()},se.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},se.prototype.toolbarButtonClicked=function(W,$){if(W==="marker"&&$!==void 0)this.createNewMarker($);else if(W==="action")switch($){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var oe=new St(W,W._currentMarker,!0);ce(oe),oe.defaultPrevented&&($=!0)}),!$){var ne=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ce){return ce(new St(W,ne))})}}},se.prototype.clear=function(){var W=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var At=new St(W,void 0,!0);Ke(At),At.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ne=function(Ke){var At=ce.markers[Ke];ce.setCurrentMarker(ce.markers[Ke]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(Vt){return Vt(new St(W,At))})},ce=this,oe=this.markers.length-1;oe>=0;oe--)ne(oe);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var W;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},se.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ne=this.undoRedoManager.getLastUndoStep();if(!ne||ne.width===$.width&&ne.height===$.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ce<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new mr(W))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(oe){return oe(new mr(W))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var W=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ne){return ne(new mr(W))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var W=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ne){return ne(new mr(W))}))},se.prototype.stepZoom=function(){var W=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=W<this.zoomSteps.length-1?this.zoomSteps[W+1]:this.zoomSteps[0]},se.prototype.panTo=function(W){this.contentDiv.scrollBy({left:this.prevPanPoint.x-W.x,top:this.prevPanPoint.y-W.y}),this.prevPanPoint=W},se.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var W,$,ne=this;return be(this,function(ce){switch(ce.label){case 0:return[4,this.render()];case 1:return W=ce.sent(),$=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new hr(ne,W,$))}),this.close(!0),[2]}})})},se.prototype.getState=function(W){W===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ne){return $.markers.push(ne.getState())}),$},se.prototype.restoreState=function(W){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);W.markers.forEach(function(ne){var ce=$._availableMarkerTypes.find(function(Ke){return Ke.typeName===ne.typeName});if(ce!==void 0){var oe=$.addNewMarker(ce);oe.restoreState(ne),$.markers.push(oe)}}),W.width&&W.height&&(W.width!==this.imageWidth||W.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/W.width,this.imageHeight/W.height),this.eventListeners.restorestate.forEach(function(ne){return ne(new mr($))})},se.prototype.addNewMarker=function(W){var $=le.createGroup();return this.markerImage.appendChild($),new W($,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(W){var $,ne=this;($=typeof W=="string"?this._availableMarkerTypes.find(function(ce){return ce.typeName===W}):W)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ce){return ce(new St(ne,ne._currentMarker))}))},se.prototype.markerCreated=function(W){var $=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(W),this.setCurrentMarker(W),W instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ne){return ne(new St($,$._currentMarker))})},se.prototype.colorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=W,this.settings.defaultStrokeColor=W)},se.prototype.fillColorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=W)},se.prototype.markerStateChanged=function(W){var $=this;this.eventListeners.markerchange.forEach(function(ne){return ne(new St($,W))})},se.prototype.setCurrentMarker=function(W){var $=this;this._currentMarker!==W&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ne){return ne(new St($,$._currentMarker))})),this._currentMarker=W,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ne){return ne(new St($,$._currentMarker))}))},se.prototype.onPointerDown=function(W){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||W.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var $=this.markers.find(function(ne){return ne.ownsTarget(W.target)});$!==void 0?(this.setCurrentMarker($),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:W.clientX,y:W.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY))},se.prototype.onDblClick=function(W){if(this._isFocused||this.focus(),this.mode==="select"){var $=this.markers.find(function(ne){return ne.ownsTarget(W.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target):this.setCurrentMarker()}},se.prototype.onPointerMove=function(W){this.touchPoints!==1&&W.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||W.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(W.clientX,W.clientY)):this.zoomLevel>1&&this.panTo({x:W.clientX,y:W.clientY}))},se.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.markerImage.getBoundingClientRect();return{x:(W-ne.left)/this.zoomLevel,y:($-ne.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},se.prototype.addLicenseKey=function(W){re.addKey(W)},se.prototype.addEventListener=function(W,$){this.eventListeners.addEventListener(W,$)},se.prototype.removeEventListener=function(W,$){this.eventListeners.removeEventListener(W,$)},se.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new mr(W))}))},se.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new mr(W))}))},se.instanceCounter=0,se}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ur=function(se,W){return(Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function sn(se,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function $(){this.constructor=se}Ur(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Rr(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function mn(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]<ce[3])){Ke.label=Pt[1];break}if(Pt[0]===6&&Ke.label<ce[1]){Ke.label=ce[1],ce=Pt;break}if(ce&&Ke.label<ce[2]){Ke.label=ce[2],Ke.ops.push(Pt);break}ce[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Pt=W.call(se,Ke)}catch(Br){Pt=[6,Br],ne=0}finally{$=ce=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Vt,vr])}}}var vn=function(){function se(){}return se.addKey=function(W){se.key=W},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),Gt=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(W,$){for(var ne=0,ce=$;ne<ce.length;ne++){var oe=ce[ne],Ke=oe[0],At=oe[1];W.setAttribute(Ke,At)}},se.createRect=function(W,$,ne){var ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return ce.setAttribute("width",W.toString()),ce.setAttribute("height",$.toString()),ne&&se.setAttributes(ce,ne),ce},se.createLine=function(W,$,ne,ce,oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",W.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ne.toString()),Ke.setAttribute("y2",ce.toString()),oe&&se.setAttributes(Ke,oe),Ke},se.createPolygon=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ne.setAttribute("points",W),$&&se.setAttributes(ne,$),ne},se.createCircle=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return ne.setAttribute("cx",(W/2).toString()),ne.setAttribute("cy",(W/2).toString()),ne.setAttribute("r",W.toString()),$&&se.setAttributes(ne,$),ne},se.createEllipse=function(W,$,ne){var ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ce.setAttribute("cx",(W/2).toString()),ce.setAttribute("cy",($/2).toString()),ce.setAttribute("rx",(W/2).toString()),ce.setAttribute("ry",($/2).toString()),ne&&se.setAttributes(ce,ne),ce},se.createGroup=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&se.setAttributes($,W),$},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(W,$,ne,ce,oe,Ke,At){var Vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(Vt,[["id",W],["orient",$],["markerWidth",ne.toString()],["markerHeight",ce.toString()],["refX",oe.toString()],["refY",Ke.toString()]]),Vt.appendChild(At),Vt},se.createText=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),W&&se.setAttributes($,W),$},se.createTSpan=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ne.textContent=W,$&&se.setAttributes(ne,$),ne},se.createImage=function(W){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&se.setAttributes($,W),$},se.createPoint=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ne.x=W,ne.y=$,ne},se.createPath=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","path");return ne.setAttribute("d",W),$&&se.setAttributes(ne,$),ne},se.createElement=function(W,$){var ne=document.createElementNS("http://www.w3.org/2000/svg",W);return $&&se.setAttributes(ne,$),ne},se.getHollowRectanglePath=function(W,$,ne,ce,oe,Ke,At,Vt){return"M"+W+","+$+"V"+($+ce)+"H"+(W+ne)+"V"+$+"H"+oe+"V"+Ke+"H"+(oe+At)+"V"+(Ke+Vt)+"H"+oe+"V"+$+"Z"},se}(),Cn=function(){function se(W){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},se.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).appendChild(this.styleSheet),this.addRule(new yn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new yn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new yn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Sn("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Sn("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),yn=function(se,W){this.selector=se,this.style=W},Sn=function(se,W){this.localName=se,this.style=W},xn=function(){function se(){this.blocks=[],this.display=""}return se.prototype.addButtonBlock=function(W){W.className=this.blockClassName,W.buttonClassName=this.buttonClassName,W.buttonColorsClassName=this.buttonColorsClassName,W.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(W)},se.prototype.addElementBlock=function(W){W.className===void 0&&(W.className=this.blockClassName),this.blocks.push(W)},se.prototype.getUI=function(){var W=document.createElement("div");return W.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,W.style.display=this.display,this.blocks.forEach(function($){return W.appendChild($.getUI())}),W},se}(),xi=function(){function se(){}return se.prototype.getUI=function(){var W=document.createElement("div");if(W.className=this.className,this.minWidth!==void 0&&(W.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":W.style.justifyContent="flex-start";break;case"center":W.style.justifyContent="center";break;case"end":W.style.justifyContent="flex-end"}return W.style.whiteSpace="nowrap",W},se}(),Ti=function(se){function W(){var $=se!==null&&se.apply(this,arguments)||this;return $.buttons=[],$}return sn(W,se),W.prototype.addButton=function($){$.className=this.buttonClassName,$.colorsClassName=this.buttonColorsClassName,$.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push($)},W.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.buttons.forEach(function(ne){return $.appendChild(ne.getUI())}),$},W}(xi),hn=function(){function se(W,$){this._isActive=!1,this._isHidden=!1,this._icon=W,this.title=$,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(se.prototype,"icon",{get:function(){return this._icon},set:function(W){this._icon=W,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isActive",{get:function(){return this._isActive},set:function(W){this._isActive=W,this.adjustClassName()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){var W=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return W.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},se.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},se.prototype.hide=function(){this._isHidden=!0},se}(),cr=function(se){function W(){var $=se!==null&&se.apply(this,arguments)||this;return $.elements=[],$}return sn(W,se),W.prototype.addElement=function($){this.elements.push($)},W.prototype.getUI=function(){var $=se.prototype.getUI.call(this);return this.elements.forEach(function(ne){return $.appendChild(ne)}),$},W}(xi),Gn=function(){function se(W,$){this.horizontal=W,this.vertical=$}return Object.defineProperty(se.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),se.prototype.getVerticalLength=function(W){return W/this.ratio},se.prototype.getHorizontalLength=function(W){return W*this.ratio},se}(),pi=function(){function se(){}return se.getIcon=function(W,$){if(W>0&&$>0){var ne=new Gn(W,$),ce=ne.ratio>=1?20:ne.getHorizontalLength(20),oe=ne.ratio<1?20:ne.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var At=Gt.createDefs();Ke.appendChild(At);var Vt=Gt.createElement("clipPath",[["id","text-bg-clip"]]);At.appendChild(Vt);var vr=Gt.createPath(Gt.getHollowRectanglePath((24-ce)/2,(24-oe)/2,ce,oe,(24-ce)/2+2,(24-oe)/2+2,ce-4,oe-4));Ke.appendChild(vr);var Pt=Gt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Gt.createTSpan(W+":"+$)),Ke.appendChild(Pt);var Br=Pt.getBBox();Gt.setAttributes(Pt,[["x",((24-Br.width)/2).toString()],["y",((24-Br.height)/2-Br.y).toString()]]);var jr=Gt.createPath(Gt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Br.width))/2,(24-Math.ceil(Br.height))/2,Math.ceil(Br.width),Math.ceil(Br.height)));return Vt.appendChild(jr),Gt.setAttributes(vr,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},se}(),Vn=function(se){function W($,ne,ce){var oe=se.call(this,$,ne)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ce,oe}return sn(W,se),W.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=$.className,ne.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},W.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},W.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},W.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},W.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},W.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},W}(hn),Yr=function(){function se(W,$){this.GRIP_SIZE=10,this.color=W,this.fillColor=$,this.visual=Gt.createGroup(),this.visual.appendChild(Gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Gt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se.prototype.setCenter=function(W,$){this.visual.childNodes.forEach(function(ne){return Gt.setAttributes(ne,[["cx",W.toString()],["cy",$.toString()]])})},se}(),Un=function(){function se(W,$,ne,ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=W,this.canvasHeight=$,this.margin=ne,this.container=ce,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(W){this._aspectRatio=W,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.gridContainer&&Gt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(W){this._zoomFactor=W,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var W=this;this.cropShadeElement=Gt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Gt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$<this.numberOfGridLines;$++)this.horizontalGridLines.push(Gt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Gt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ne){return W.gridContainer.appendChild(ne)}),this.verticalGridLines.forEach(function(ne){return W.gridContainer.appendChild(ne)}),this.cropRectElement=Gt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Yr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Yr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Yr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Yr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},se.prototype.setCropRectangle=function(W){this.cropRect=W;var $=Object.assign({},this.cropRect);this.zoomFactor!==1&&($.width=this.cropRect.width*this.zoomFactor,$.height=this.cropRect.height*this.zoomFactor,$.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-$.width/2,$.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Gt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ne=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ke){var At=$.y+ne*(Ke+1);Gt.setAttributes(oe,[["x1",""+$.x],["y1",""+At],["x2",""+($.x+$.width)],["y2",""+At]])});var ce=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ke){var At=$.x+ce*(Ke+1);Gt.setAttributes(oe,[["x1",""+At],["y1",""+$.y],["x2",""+At],["y2",""+($.y+$.height)]])}),Gt.setAttributes(this.cropShadeElement,[["d",Gt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.container.getBoundingClientRect();return{x:W-ne.left+this.margin,y:$-ne.top+this.margin}},se.prototype.onPointerDown=function(W){this.container.setPointerCapture(W.pointerId),this.previousPoint=this.clientToLocalCoordinates(W.clientX,W.clientY),this.cropRectElement===W.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(W.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(W.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(W.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(W.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(W){if(this.isMoving)this.move(this.clientToLocalCoordinates(W.clientX,W.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(W.clientX,W.clientY);this.resize($)}W.preventDefault()},se.prototype.onPointerUp=function(W){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(W.pointerId)},se.prototype.move=function(W){var $=W.x-this.previousPoint.x,ne=W.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=W},se.prototype.resize=function(W){var $=Object.assign({},this.cropRect),ne=W.x-this.previousPoint.x,ce=W.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+ne<this.margin&&(ne=this.margin-$.x),$.x+=ne,$.width=this.cropRect.x+this.cropRect.width-$.x;break;case this.bottomRightGrip:case this.topRightGrip:$.width+ne>this.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-$.width),$.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ce,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ce}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=W,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var W=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),ce=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidth<ce/this.canvasHeight?this.cropRect.width=ne:this.cropRect.height=ce,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=W-this.cropRect.width/2,this.cropRect.y=$-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(W,$,ne,ce,oe,Ke){var At=ne/W,Vt=ce/$;return{x:(oe.x-Ke)*At+Ke,y:(oe.y-Ke)*Vt+Ke,width:oe.width*At,height:oe.height*Vt}},se.prototype.scaleCanvas=function(W,$){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,W,$,this.cropRect,this.margin);this.canvasWidth=W,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),ui=function(){function se(W){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=W,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(se.prototype,"angle",{get:function(){return this._angle},set:function(W){this._angle=W,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},se.prototype.onPointerDown=function(W){this.controlContainer.setPointerCapture(W.pointerId),this.isDragging=!0,this.previousPoint={x:W.clientX,y:W.clientY}},se.prototype.onPointerMove=function(W){this.isDragging&&(this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.previousPoint.x=W.clientX)},se.prototype.onPointerUp=function(W){this.isDragging&&this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(W.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var W=this.angleLabelText.getBBox();Gt.setAttributes(this.angleLabelElement,[["x",((this.width-W.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var W=this.scaleShape.transform.baseVal.getItem(0);W.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(W,0)}},se.prototype.getVisual=function(){var W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("xmlns","http://www.w3.org/2000/svg"),W.setAttribute("width",this.width+"px"),W.setAttribute("height",this.height+"px"),W.setAttribute("viewBox","0 0 "+this.width+" "+this.height),W.style.flexShrink="0",document.body.appendChild(W);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var ce=ne%5==0?this.height/3:this.height/6;$+="h4v"+-ce+"h1v"+ce}$+="v1H0Z",this.scaleShape=Gt.createPath($);var oe=Gt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),W.appendChild(this.scaleShape),this.angleLabelElement=Gt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Gt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Gt.createTSpan("");return Ke.innerHTML="&deg;",this.angleLabelElement.appendChild(Ke),W.appendChild(this.angleLabelElement),document.body.removeChild(W),W},se}(),ci=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(W,$,ne,ce,oe,Ke,At){var Vt=this;return new Promise(function(vr){var Pt=document.createElement("canvas");Pt.width=W.width.baseVal.value-2*ce,Pt.height=W.height.baseVal.value-2*ce;var Br=1,jr=1;Vt.naturalSize===!0?(Br=$.naturalWidth/(W.width.baseVal.value-2*ce)/Ke,jr=$.naturalHeight/(W.height.baseVal.value-2*ce)/At,Pt.width=$.naturalWidth/Ke,Pt.height=$.naturalHeight/At):Vt.width!==void 0&&Vt.height!==void 0&&(Br=Vt.width/ne.width,jr=Vt.height/ne.height,Pt.width*=Br,Pt.height*=jr);var fn=Pt.getContext("2d");fn.translate(Pt.width/2,Pt.height/2),fn.rotate(oe*Math.PI/180),fn.scale(Ke,At),fn.translate(-Pt.width/2,-Pt.height/2),fn.drawImage($,0,0,Pt.width,Pt.height);var ti=document.createElement("canvas");ti.width=ne.width*Br,ti.height=ne.height*jr,ti.getContext("2d").putImageData(fn.getImageData((ne.x-ce)*Br,(ne.y-ce)*jr,ne.width*Br,ne.height*jr),0,0),vr(ti.toDataURL(Vt.imageType,Vt.imageQuality))})},se}(),jt=function(){function se(W){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=se.instanceCounter++,this.styles=new Cn(this.instanceNo),this.target=W,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(W){this._zoomToCropEnabled=W,W?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(W){this._gridLines=W,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(W){this._rotationAngle=W,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var W;return(W=this._aspectRatio)!==null&&W!==void 0?W:this.aspectRatios[0]},set:function(W){this._aspectRatio=W},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(W){W===void 0&&(W=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),W||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(W){this.renderEventListeners.push(W)},se.prototype.removeRenderEventListener=function(W){this.renderEventListeners.indexOf(W)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(W),1)},se.prototype.addCloseEventListener=function(W){this.closeEventListeners.push(W)},se.prototype.removeCloseEventListener=function(W){this.closeEventListeners.indexOf(W)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(W),1)},se.prototype.setupResizeObserver=function(){var W=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var W=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/W>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*W:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=$+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/W;this.resize($,ne)}},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Gt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},se.prototype.resize=function(W,$){this.imageWidth=Math.round(W),this.imageHeight=Math.round($),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},se.prototype.setEditingTarget=function(){var W=document.createElement("canvas");W.width=this.target.naturalWidth,W.height=this.target.naturalHeight,W.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var $=W.toDataURL();Gt.setAttributes(this.editingTarget,[["href",$]]),this.setEditingTargetSize()},se.prototype.setTopLeft=function(){var W=this.target.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=W.left-$.left-this.CANVAS_MARGIN,this.top=W.top-$.top-this.CANVAS_MARGIN},se.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Gt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Gt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Gt.createGroup(),this.editingTargetRotationScaleContainer=Gt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var W=Gt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(W);var $=Gt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem($),this.editingTargetContainer=Gt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},se.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},se.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Gt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Un(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},se.prototype.zoomToCrop=function(){if(this.cropRect){var W=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,$=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=W+"px "+$+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-W+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-$+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},se.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},se.prototype.cropRectChanged=function(W){this.cropRect=W,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},se.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,$=this.target.offsetTop>W+this.CANVAS_MARGIN?this.target.offsetTop-(W+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var W=this;this.topToolbar=new xn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Ti;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ne=[];this.aspectRatios.forEach(function(jr){var fn=new hn(pi.getIcon(jr.horizontal,jr.vertical),jr.horizontal===0&&jr.vertical===0?"FREE":jr.horizontal+":"+jr.vertical);fn.onClick=function(){return W.ratioButtonClicked(jr)},ne.push(fn)}),this.aspectRatioButton=new Vn(pi.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ce=new hn('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ce.isActive=this.isGridVisible,ce.onClick=function(){W.isGridVisible=!W.isGridVisible,ce.isActive=W.isGridVisible},$.addButton(ce);var oe=new hn('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){W.zoomToCropEnabled=!W.zoomToCropEnabled,oe.isActive=W.zoomToCropEnabled},$.addButton(oe),!vn.isLicensed){var Ke=new cr;this.topToolbar.addElementBlock(Ke);var At=document.createElement("div");At.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Vt=document.createElement("a");Vt.style.color="currentColor",Vt.href="https://markerjs.com/products/cropro",Vt.target="_blank",Vt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',At.appendChild(Vt),Ke.addElement(At)}var vr=new Ti;vr.minWidth=3*this.toolbarHeight+"px",vr.contentAlign="end",this.topToolbar.addButtonBlock(vr);var Pt=new hn('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Pt.onClick=this.startRenderAndClose,vr.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Br=new hn('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Br.onClick=this.close,vr.addButton(Br),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Br.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var W=this;this.bottomToolbar=new xn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Ti;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ne=new hn('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,$.addButton(ne);var ce=new hn('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ce.onClick=this.rotateRightButtonClicked,$.addButton(ce);var oe=new cr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new ui("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(vr){W.rotateBy(vr),W.straightener.angle=W.rotationAngle},oe.addElement(this.straightener.getUI());var Ke=new Ti;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var At=new hn('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");At.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(At);var Vt=new hn('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Vt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Vt)},se.prototype.ratioButtonClicked=function(W){this.aspectRatio=W,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=pi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Gn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(W){if(W){var $=this.cropLayer.getRescaledRect(W.width,W.height,this.imageWidth,this.imageHeight,W.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=W.flippedHorizontally,this.flippedVertically=W.flippedVertically,this.applyFlip(),this.rotationAngle=W.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.cropImage.getBoundingClientRect();return{x:W-ne.left,y:$-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var W=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},se.prototype.rotateLeftButtonClicked=function(){var W=this.rotationAngle-90;this.rotationAngle%90!=0&&(W+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateRightButtonClicked=function(){var W=this.rotationAngle+90;this.rotationAngle%90!=0&&(W-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateTo=function(W){W=(W=W>180?W-360:W)<=-180?W+360:W,this.rotationAngle=W,this.applyRotation()},se.prototype.rotateBy=function(W){this.rotateTo((this.rotationAngle+W)%360)},se.prototype.applyRotation=function(){var W=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=W},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Rr(this,void 0,void 0,function(){var W,$;return mn(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return W=ne.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ce){return ce(W,$)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Rr(this,void 0,void 0,function(){var W;return mn(this,function($){switch($.label){case 0:return(W=new ci).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.width=this.renderWidth,W.height=this.renderHeight,this.unzoomFromCrop(),Gt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,W.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return $.sent(),[4,W.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,$.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Sn("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Sn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Sn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var W=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Sn("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*W)+`px;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new yn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new yn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Sn("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Sn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Sn("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Sn("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Sn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),_r=L("8hTe"),ai=L.n(_r),Oi=/<pre[^>]*>/g;function Ai(se){var W=document.createElement("div");return W.innerHTML=se,W.childNodes.length===0?"":W.childNodes[0].nodeValue}var Ri=Z.a=function(se){var W=se.value,$=W===void 0?"":W,ne=se.edit,ce=ne===void 0?!1:ne,oe=se.className,Ke=se.showTextOnly,At=se.showLines,Vt=se.replaces,vr=se.zoomImg,Pt=se.hasMask,Br=se.style,jr=Br===void 0?{}:Br,fn=se.stylesPrev,ti=fn===void 0?{}:fn,mi=String($),Rn=Object(s.useRef)(),Li=Object(s.useRef)(),qi=Object(s.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(s.useState)("office"),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=function(){var pt=new jt(Li.current);pt.displayMode="popup",pt.addRenderEventListener(function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return Rn.current.style.display="none",ct.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show()},sa=function(){var pt=new Xr(Li.current);pt.settings.displayMode="popup",pt.addEventListener("render",function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Rn.current.style.display="none",!Li.current){ct.next=6;break}return ct.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show(),window.markerArea=pt},Ii=Object(s.useMemo)(function(){try{var tt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;mi=mi.replace(tt,"("+ae.a.API_SERVER+"/api/attachments/").replace(pt,'"'+ae.a.API_SERVER+"/api/attachments/").replace(_t,'"'+ae.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,`
`),mi=mi.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Wt){}var Mt=K(mi),Dt=M();if(mi.match(/\[TOC\]/)&&(Mt=Mt.replace("<p>[TOC]</p>",k()),S()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(Wt,ct){var Ot=Dt[ct],Rt=Ot.type,fr=Ot.expression;return Object(he.renderToString)(Ai(fr)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),N(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=Mt,Ht.innerText}return setTimeout(function(){return ta()},500),Mt},[mi]),Xn=Object(s.useRef)();x.WebkitLineClamp=At,At&&(jr=Object(u.a)(Object(u.a)({},jr),x));function Vi(tt){var pt=tt.target;if(pt.tagName.toUpperCase()==="IMG"){if(vr){var _t=pt.getAttribute("src");vi(_t),Mi("image")}}else if(pt.tagName.toUpperCase()==="A"){var Mt=pt.getAttribute("href");if(Mt.indexOf("office")>-1)tt.preventDefault(),vi(Mt),Mi("office");else if(Mt.indexOf("application/pdf")>-1)tt.preventDefault(),vi(Mt),Mi("pdf");else if(Mt.indexOf("type=text")>-1)tt.preventDefault(),vi(Mt),Mi("html");else if(Mt.startsWith("#")){tt.preventDefault();var Dt=document.getElementById(Mt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var ta=function(){var pt,_t=(pt=Xn.current)===null||pt===void 0?void 0:pt.querySelectorAll("video");_t==null||_t.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Dt=new V.a;Dt.loadSource(Mt.src),Dt.attachMedia(Mt)}}})};Object(s.useEffect)(function(){if(Xn.current&&Ii&&(Ii.match(Oi)&&window.PR.prettyPrint()),Xn.current)return Xn.current.addEventListener("click",Vi),function(){Xn.current.removeEventListener("click",Vi),N(),S()}},[Ii,Xn.current,Vi]);var Ct=function(pt){if(!ce)return;pt.target.nodeName==="IMG"?(Rn.current.style.display="flex",Rn.current.style.width=pt.target.clientWidth+"px",Rn.current.style.height=pt.target.clientHeight+"px",Rn.current.style.top=pt.target.offsetTop+"px",Rn.current.style.left=pt.target.offsetLeft+"px",Li.current.src=pt.target.getAttribute("src")):Rn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Xn,style:Object(u.a)({},jr),className:"".concat(oe||""," markdown-body ").concat(ai.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Ii}}),n.a.createElement("div",{ref:Rn,className:ai.a.button},n.a.createElement(d.a,null,n.a.createElement(D.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(D.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Li,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(pe.a,{close:!0,data:_i,hasMask:Pt,type:_i!=null&&_i.length?Gi:"",style:Object(u.a)({},ti),onClose:function(){return vi("")}}))}},"9OqN":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CTR=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._counter;E&&(l=this._counter=E.slice(0),this._iv=void 0);var s=l.slice(0);p.encryptBlock(s,0),l[C-1]=l[C-1]+1|0;for(var n=0;n<C;n++)D[u+n]^=s[n]}});return d.Decryptor=T,d}(),P.mode.CTR})},"9VGf":function(j,Z,L){"use strict";L.d(Z,"a",function(){return T});var P=L("q1tI"),d=L.n(P);function T(D,u){var p=Object(P.useRef)();Object(P.useEffect)(function(){p.current=D}),Object(P.useEffect)(function(){function C(){p.current()}if(u!==null){var E=setInterval(C,u);return function(){return clearInterval(E)}}},[u])}},ALsQ:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CFB=function(){var d=P.lib.BlockCipherMode.extend();d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize;T.call(this,D,u,C,p),this._prevBlock=D.slice(u,u+C)}}),d.Decryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=D.slice(u,u+C);T.call(this,D,u,C,p),this._prevBlock=E}});function T(D,u,p,C){var E,l=this._iv;l?(E=l.slice(0),this._iv=void 0):E=this._prevBlock,C.encryptBlock(E,0);for(var s=0;s<p;s++)D[u+s]^=E[s]}return d}(),P.mode.CFB})},BJfS:function(j,Z){var L=function(P){return P.replace(/[A-Z]/g,function(d){return"-"+d.toLowerCase()}).toLowerCase()};j.exports=L},BU3w:function(j,Z,L){"use strict";L.d(Z,"a",function(){return p});var P=L("MNnm"),d="rc-util-key";function T(C){if(C.attachTo)return C.attachTo;var E=document.querySelector("head");return E||document.body}function D(C){var E,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var s=document.createElement("style");if((E=l.csp)===null||E===void 0?void 0:E.nonce){var n;s.nonce=(n=l.csp)===null||n===void 0?void 0:n.nonce}s.innerHTML=C;var h=T(l),f=h.firstChild;return l.prepend&&h.prepend?h.prepend(s):l.prepend&&f?h.insertBefore(s,f):h.appendChild(s),s}var u=new Map;function p(C,E){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=T(l);if(!u.has(s)){var n=D("",l),h=n.parentNode;u.set(s,h),h.removeChild(n)}var f=Array.from(u.get(s).children).find(function(i){return i.tagName==="STYLE"&&i[d]===E});if(f){var c,m;if(((c=l.csp)===null||c===void 0?void 0:c.nonce)&&f.nonce!==((m=l.csp)===null||m===void 0?void 0:m.nonce)){var _;f.nonce=(_=l.csp)===null||_===void 0?void 0:_.nonce}return f.innerHTML!==C&&(f.innerHTML=C),f}var y=D(C,l);return y[d]=E,y}},Bd2K:function(j,Z,L){(function(P){P(L("VrN/"),L("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(l,s,n){if(n!=P.Init&&n&&l.removeKeyMap("autoCloseTags"),!s)return;var h={name:"autoCloseTags"};(typeof s!="object"||s.whenClosing!==!1)&&(h["'/'"]=function(f){return p(f)}),(typeof s!="object"||s.whenOpening!==!1)&&(h["'>'"]=function(f){return D(f)}),l.addKeyMap(h)});var d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function D(l){if(l.getOption("disableInput"))return P.Pass;for(var s=l.listSelections(),n=[],h=l.getOption("autoCloseTags"),f=0;f<s.length;f++){if(!s[f].empty())return P.Pass;var c=s[f].head,m=l.getTokenAt(c),_=P.innerMode(l.getMode(),m.state),y=_.state,i=_.mode.xmlCurrentTag&&_.mode.xmlCurrentTag(y),a=i&&i.name;if(!a)return P.Pass;var t=_.mode.configuration=="html",S=typeof h=="object"&&h.dontCloseTags||t&&d,x=typeof h=="object"&&h.indentTags||t&&T;m.end>c.ch&&(a=a.slice(0,a.length-m.end+c.ch));var o=a.toLowerCase();if(!a||m.type=="string"&&(m.end!=c.ch||!/[\"\']/.test(m.string.charAt(m.string.length-1))||m.string.length==1)||m.type=="tag"&&i.close||m.string.indexOf("/")==c.ch-m.start-1||S&&C(S,o)>-1||E(l,_.mode.xmlCurrentContext&&_.mode.xmlCurrentContext(y)||[],a,c,!0))return P.Pass;var k=typeof h=="object"&&h.emptyTags;if(k&&C(k,a)>-1){n[f]={text:"/>",newPos:P.Pos(c.line,c.ch+2)};continue}var O=x&&C(x,o)>-1;n[f]={indent:O,text:">"+(O?`
`:"")+"</"+a+">",newPos:O?P.Pos(c.line+1,0):P.Pos(c.line,c.ch+1)}}for(var b=typeof h=="object"&&h.dontIndentOnAutoClose,f=s.length-1;f>=0;f--){var v=n[f];l.replaceRange(v.text,s[f].head,s[f].anchor,"+insert");var g=l.listSelections().slice(0);g[f]={head:v.newPos,anchor:v.newPos},l.setSelections(g),!b&&v.indent&&(l.indentLine(v.newPos.line,null,!0),l.indentLine(v.newPos.line+1,null,!0))}}function u(l,s){for(var n=l.listSelections(),h=[],f=s?"/":"</",c=l.getOption("autoCloseTags"),m=typeof c=="object"&&c.dontIndentOnSlash,_=0;_<n.length;_++){if(!n[_].empty())return P.Pass;var y=n[_].head,i=l.getTokenAt(y),a=P.innerMode(l.getMode(),i.state),t=a.state;if(s&&(i.type=="string"||i.string.charAt(0)!="<"||i.start!=y.ch-1))return P.Pass;var S,x=a.mode.name!="xml"&&l.getMode().name=="htmlmixed";if(x&&a.mode.name=="javascript")S=f+"script";else if(x&&a.mode.name=="css")S=f+"style";else{var o=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(t);if(!o||o.length&&E(l,o,o[o.length-1],y))return P.Pass;S=f+o[o.length-1]}l.getLine(y.line).charAt(i.end)!=">"&&(S+=">"),h[_]=S}if(l.replaceSelections(h),n=l.listSelections(),!m)for(var _=0;_<n.length;_++)(_==n.length-1||n[_].head.line<n[_+1].head.line)&&l.indentLine(n[_].head.line)}function p(l){return l.getOption("disableInput")?P.Pass:u(l,!0)}P.commands.closeTag=function(l){return u(l)};function C(l,s){if(l.indexOf)return l.indexOf(s);for(var n=0,h=l.length;n<h;++n)if(l[n]==s)return n;return-1}function E(l,s,n,h,f){if(!P.scanForClosingTag)return!1;var c=Math.min(l.lastLine()+1,h.line+500),m=P.scanForClosingTag(l,h,null,c);if(!m||m.tag!=n)return!1;for(var _=f?1:0,y=s.length-1;y>=0&&s[y]==n;y--)++_;h=m.to;for(var y=1;y<_;y++){var i=P.scanForClosingTag(l,h,null,c);if(!i||i.tag!=n)return!1;h=i.to}return!0}})},BjJ7:function(j,Z,L){"use strict";L.d(Z,"d",function(){return d}),L.d(Z,"c",function(){return T}),L.d(Z,"e",function(){return D}),L.d(Z,"b",function(){return u}),L.d(Z,"a",function(){return C});var P=L("m3rI");function d(E){var l=!0;if(E.length>0){for(var s=0;s<E.length;s++)if(E[s].compile_success==0||!E[s].compile_success){l=!1;break}}else l=!1;return l}function T(E){for(var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=[],n=0;n<E.length;n++){var h=E[n],f=l?"".concat(l,"/").concat(h.name):"".concat(h.name);s.push({title:h.name,isLeaf:!(h.type==="tree"),key:f})}return s}function D(E,l,s){for(var n=0;n<E.length;n++){var h=E[n];if(h.key===l){h.children=s;break}h.children&&D(h.children,l,s)}return E}function u(E,l,s){var n;return function(){var h=this,f=arguments,c=function(){n=null,s||E.apply(h,f)},m=s&&!n;clearTimeout(n),n=setTimeout(c,l),m&&E.apply(h,f)}}var p=!0,C=P.a.API_SERVER},"C+DQ":function(j,Z,L){},Dgm7:function(j,Z,L){j.exports=L.p+"static/auth.ea067b42.png"},DlQD:function(j,Z,L){(function(P,d){j.exports=d()})(this,function(){"use strict";function P(Ue,Me){for(var Ne=0;Ne<Me.length;Ne++){var xe=Me[Ne];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(Ue,xe.key,xe)}}function d(Ue,Me,Ne){return Me&&P(Ue.prototype,Me),Ne&&P(Ue,Ne),Ue}function T(Ue,Me){if(!Ue)return;if(typeof Ue=="string")return D(Ue,Me);var Ne=Object.prototype.toString.call(Ue).slice(8,-1);if(Ne==="Object"&&Ue.constructor&&(Ne=Ue.constructor.name),Ne==="Map"||Ne==="Set")return Array.from(Ue);if(Ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ne))return D(Ue,Me)}function D(Ue,Me){(Me==null||Me>Ue.length)&&(Me=Ue.length);for(var Ne=0,xe=new Array(Me);Ne<Me;Ne++)xe[Ne]=Ue[Ne];return xe}function u(Ue,Me){var Ne;if(typeof Symbol=="undefined"||Ue[Symbol.iterator]==null){if(Array.isArray(Ue)||(Ne=T(Ue))||Me&&Ue&&typeof Ue.length=="number"){Ne&&(Ue=Ne);var xe=0;return function(){return xe>=Ue.length?{done:!0}:{done:!1,value:Ue[xe++]}}}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 Ne=Ue[Symbol.iterator](),Ne.next.bind(Ne)}function p(Ue,Me){return Me={exports:{}},Ue(Me,Me.exports),Me.exports}var C=p(function(Ue){function Me(){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 Ne(xe){Ue.exports.defaults=xe}Ue.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ne}}),E=C.defaults,l=C.getDefaults,s=C.changeDefaults,n=/[&<>"']/,h=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_=function(Me){return m[Me]};function y(Ue,Me){if(Me){if(n.test(Ue))return Ue.replace(h,_)}else if(f.test(Ue))return Ue.replace(c,_);return Ue}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ue){return Ue.replace(i,function(Me,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(Ue,Me){Ue=Ue.source||Ue,Me=Me||"";var Ne={replace:function(Se,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(t,"$1"),Ue=Ue.replace(Se,Ae),Ne},getRegex:function(){return new RegExp(Ue,Me)}};return Ne}var x=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Me,Ne){if(Ue){var xe;try{xe=decodeURIComponent(a(Ne)).replace(x,"").toLowerCase()}catch(Se){return null}if(xe.indexOf("javascript:")===0||xe.indexOf("vbscript:")===0||xe.indexOf("data:")===0)return null}Me&&!o.test(Ne)&&(Ne=w(Me,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Se){return null}return Ne}var O={},b=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(Ue,Me){O[" "+Ue]||(b.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=G(Ue,"/",!0)),Ue=O[" "+Ue];var Ne=Ue.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ne?Me:Ue.replace(v,"$1")+Me:Me.charAt(0)==="/"?Ne?Me:Ue.replace(g,"$1")+Me:Ue+Me}var M={exec:function(){}};function N(Ue){for(var Me=1,Ne,xe;Me<arguments.length;Me++){Ne=arguments[Me];for(xe in Ne)Object.prototype.hasOwnProperty.call(Ne,xe)&&(Ue[xe]=Ne[xe])}return Ue}function I(Ue,Me){var Ne=Ue.replace(/\|/g,function(Ae,Le,Je){for(var Ve=!1,gt=Le;--gt>=0&&Je[gt]==="\\";)Ve=!Ve;return Ve?"|":" |"}),xe=Ne.split(/ \|/),Se=0;if(xe.length>Me)xe.splice(Me);else for(;xe.length<Me;)xe.push("");for(;Se<xe.length;Se++)xe[Se]=xe[Se].trim().replace(/\\\|/g,"|");return xe}function G(Ue,Me,Ne){var xe=Ue.length;if(xe===0)return"";for(var Se=0;Se<xe;){var Ae=Ue.charAt(xe-Se-1);if(Ae===Me&&!Ne)Se++;else if(Ae!==Me&&Ne)Se++;else break}return Ue.substr(0,xe-Se)}function z(Ue,Me){if(Ue.indexOf(Me[1])===-1)return-1;for(var Ne=Ue.length,xe=0,Se=0;Se<Ne;Se++)if(Ue[Se]==="\\")Se++;else if(Ue[Se]===Me[0])xe++;else if(Ue[Se]===Me[1]&&(xe--,xe<0))return Se;return-1}function H(Ue){Ue&&Ue.sanitize&&!Ue.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 K={escape:y,unescape:a,edit:S,cleanUrl:k,resolveUrl:w,noopTest:M,merge:N,splitCells:I,rtrim:G,findClosingBracket:z,checkSanitizeDeprecation:H},U=C.defaults,B=K.rtrim,V=K.splitCells,ae=K.escape,he=K.findClosingBracket;function pe(Ue,Me,Ne){var xe=Me.href,Se=Me.title?ae(Me.title):null,Ae=Ue[1].replace(/\\([\[\]])/g,"$1");return Ue[0].charAt(0)!=="!"?{type:"link",raw:Ne,href:xe,title:Se,text:Ae}:{type:"image",raw:Ne,href:xe,title:Se,text:ae(Ae)}}function Re(Ue,Me){var Ne=Ue.match(/^(\s+)(?:```)/);if(Ne===null)return Me;var xe=Ne[1];return Me.split(`
`).map(function(Se){var Ae=Se.match(/^\s+/);if(Ae===null)return Se;var Le=Ae[0];return Le.length>=xe.length?Se.slice(xe.length):Se}).join(`
`)}var ke=function(){function Ue(Ne){this.options=Ne||U}var Me=Ue.prototype;return Me.space=function(xe){var Se=this.rules.block.newline.exec(xe);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:`
`}},Me.code=function(xe,Se){var Ae=this.rules.block.code.exec(xe);if(Ae){var Le=Se[Se.length-1];if(Le&&Le.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Je=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Je:B(Je,`
`)}}},Me.fences=function(xe){var Se=this.rules.block.fences.exec(xe);if(Se){var Ae=Se[0],Le=Re(Ae,Se[3]||"");return{type:"code",raw:Ae,lang:Se[2]?Se[2].trim():Se[2],text:Le}}},Me.heading=function(xe){var Se=this.rules.block.heading.exec(xe);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Me.nptable=function(xe){var Se=this.rules.block.nptable.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[],raw:Se[0]};if(Ae.header.length===Ae.align.length){var Le=Ae.align.length,Je;for(Je=0;Je<Le;Je++)/^ *-+: *$/.test(Ae.align[Je])?Ae.align[Je]="right":/^ *:-+: *$/.test(Ae.align[Je])?Ae.align[Je]="center":/^ *:-+ *$/.test(Ae.align[Je])?Ae.align[Je]="left":Ae.align[Je]=null;for(Le=Ae.cells.length,Je=0;Je<Le;Je++)Ae.cells[Je]=V(Ae.cells[Je],Ae.header.length);return Ae}}},Me.hr=function(xe){var Se=this.rules.block.hr.exec(xe);if(Se)return{type:"hr",raw:Se[0]}},Me.blockquote=function(xe){var Se=this.rules.block.blockquote.exec(xe);if(Se){var Ae=Se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Se[0],text:Ae}}},Me.list=function(xe){var Se=this.rules.block.list.exec(xe);if(Se){for(var Ae=Se[0],Le=Se[2],Je=Le.length>1,Ve=Le[Le.length-1]===")",gt={type:"list",raw:Ae,ordered:Je,start:Je?+Le.slice(0,-1):"",loose:!1,items:[]},yt=Se[0].match(this.rules.block.item),Bt=!1,Nt,mr,hr,St,$r,Xr,Ur,sn=yt.length,Rr=0;Rr<sn;Rr++)Nt=yt[Rr],Ae=Nt,mr=Nt.length,Nt=Nt.replace(/^ *([*+-]|\d+[.)]) */,""),~Nt.indexOf(`
`)&&(mr-=Nt.length,Nt=this.options.pedantic?Nt.replace(/^ {1,4}/gm,""):Nt.replace(new RegExp("^ {1,"+mr+"}","gm"),"")),Rr!==sn-1&&(hr=this.rules.block.bullet.exec(yt[Rr+1])[0],(Je?hr.length===1||!Ve&&hr[hr.length-1]===")":hr.length>1||this.options.smartLists&&hr!==Le)&&(St=yt.slice(Rr+1).join(`
`),gt.raw=gt.raw.substring(0,gt.raw.length-St.length),Rr=sn-1)),$r=Bt||/\n\n(?!\s*$)/.test(Nt),Rr!==sn-1&&(Bt=Nt.charAt(Nt.length-1)===`
`,$r||($r=Bt)),$r&&(gt.loose=!0),Xr=/^\[[ xX]\] /.test(Nt),Ur=void 0,Xr&&(Ur=Nt[1]!==" ",Nt=Nt.replace(/^\[[ xX]\] +/,"")),gt.items.push({type:"list_item",raw:Ae,task:Xr,checked:Ur,loose:$r,text:Nt});return gt}},Me.html=function(xe){var Se=this.rules.block.html.exec(xe);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):ae(Se[0]):Se[0]}},Me.def=function(xe){var Se=this.rules.block.def.exec(xe);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var Ae=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Se[0],href:Se[2],title:Se[3]}}},Me.table=function(xe){var Se=this.rules.block.table.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Se[0];var Le=Ae.align.length,Je;for(Je=0;Je<Le;Je++)/^ *-+: *$/.test(Ae.align[Je])?Ae.align[Je]="right":/^ *:-+: *$/.test(Ae.align[Je])?Ae.align[Je]="center":/^ *:-+ *$/.test(Ae.align[Je])?Ae.align[Je]="left":Ae.align[Je]=null;for(Le=Ae.cells.length,Je=0;Je<Le;Je++)Ae.cells[Je]=V(Ae.cells[Je].replace(/^ *\| *| *\| *$/g,""),Ae.header.length);return Ae}}},Me.lheading=function(xe){var Se=this.rules.block.lheading.exec(xe);if(Se)return{type:"heading",raw:Se[0],depth:Se[2].charAt(0)==="="?1:2,text:Se[1]}},Me.paragraph=function(xe){var Se=this.rules.block.paragraph.exec(xe);if(Se)return{type:"paragraph",raw:Se[0],text:Se[1].charAt(Se[1].length-1)===`
`?Se[1].slice(0,-1):Se[1]}},Me.text=function(xe,Se){var Ae=this.rules.block.text.exec(xe);if(Ae){var Le=Se[Se.length-1];return Le&&Le.type==="text"?{raw:Ae[0],text:Ae[0]}:{type:"text",raw:Ae[0],text:Ae[0]}}},Me.escape=function(xe){var Se=this.rules.inline.escape.exec(xe);if(Se)return{type:"escape",raw:Se[0],text:ae(Se[1])}},Me.tag=function(xe,Se,Ae){var Le=this.rules.inline.tag.exec(xe);if(Le)return!Se&&/^<a /i.test(Le[0])?Se=!0:Se&&/^<\/a>/i.test(Le[0])&&(Se=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:Se,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]}},Me.link=function(xe){var Se=this.rules.inline.link.exec(xe);if(Se){var Ae=he(Se[2],"()");if(Ae>-1){var Le=Se[0].indexOf("!")===0?5:4,Je=Le+Se[1].length+Ae;Se[2]=Se[2].substring(0,Ae),Se[0]=Se[0].substring(0,Je).trim(),Se[3]=""}var Ve=Se[2],gt="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ve);yt?(Ve=yt[1],gt=yt[3]):gt=""}else gt=Se[3]?Se[3].slice(1,-1):"";Ve=Ve.trim().replace(/^<([\s\S]*)>$/,"$1");var Bt=pe(Se,{href:Ve&&Ve.replace(this.rules.inline._escapes,"$1"),title:gt&&gt.replace(this.rules.inline._escapes,"$1")},Se[0]);return Bt}},Me.reflink=function(xe,Se){var Ae;if((Ae=this.rules.inline.reflink.exec(xe))||(Ae=this.rules.inline.nolink.exec(xe))){var Le=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Le=Se[Le.toLowerCase()],!Le||!Le.href){var Je=Ae[0].charAt(0);return{type:"text",raw:Je,text:Je}}var Ve=pe(Ae,Le,Ae[0]);return Ve}},Me.strong=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.strong.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.strong.middle.exec(Se.slice(0,Le.index+3)),Ve)return{type:"strong",raw:xe.slice(0,Ve[0].length),text:xe.slice(2,Ve[0].length-2)}}},Me.em=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.em.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.em.middle.exec(Se.slice(0,Le.index+2)),Ve)return{type:"em",raw:xe.slice(0,Ve[0].length),text:xe.slice(1,Ve[0].length-1)}}},Me.codespan=function(xe){var Se=this.rules.inline.code.exec(xe);if(Se){var Ae=Se[2].replace(/\n/g," "),Le=/[^ ]/.test(Ae),Je=Ae.startsWith(" ")&&Ae.endsWith(" ");return Le&&Je&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ae(Ae,!0),{type:"codespan",raw:Se[0],text:Ae}}},Me.br=function(xe){var Se=this.rules.inline.br.exec(xe);if(Se)return{type:"br",raw:Se[0]}},Me.del=function(xe){var Se=this.rules.inline.del.exec(xe);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Me.autolink=function(xe,Se){var Ae=this.rules.inline.autolink.exec(xe);if(Ae){var Le,Je;return Ae[2]==="@"?(Le=ae(this.options.mangle?Se(Ae[1]):Ae[1]),Je="mailto:"+Le):(Le=ae(Ae[1]),Je=Le),{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.url=function(xe,Se){var Ae;if(Ae=this.rules.inline.url.exec(xe)){var Le,Je;if(Ae[2]==="@")Le=ae(this.options.mangle?Se(Ae[0]):Ae[0]),Je="mailto:"+Le;else{var Ve;do Ve=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(Ve!==Ae[0]);Le=ae(Ae[0]),Ae[1]==="www."?Je="http://"+Le:Je=Le}return{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.inlineText=function(xe,Se,Ae){var Le=this.rules.inline.text.exec(xe);if(Le){var Je;return Se?Je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]:Je=ae(this.options.smartypants?Ae(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Je}}},Ue}(),ve=K.noopTest,Te=K.edit,be=K.merge,ue={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:ve,table:ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Te(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Te(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Te(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=/<!--(?!-?>)[\s\S]*?-->/,ue.html=Te(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Te(ue._paragraph).replace("hr",ue.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",ue._tag).getRegex(),ue.blockquote=Te(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=be({},ue),ue.gfm=be({},ue.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*|$)"}),ue.gfm.nptable=Te(ue.gfm.nptable).replace("hr",ue.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",ue._tag).getRegex(),ue.gfm.table=Te(ue.gfm.table).replace("hr",ue.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",ue._tag).getRegex(),ue.pedantic=be({},ue.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:ve,paragraph:Te(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,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:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",le.punctuation=Te(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Te(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Te(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Te(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Te(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Te(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Te(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Te(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Te(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Te(le._blockSkip,"g").getRegex(),le.overlapSkip=Te(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._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])?)+(?![-_])/,le.autolink=Te(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Te(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Te(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Te(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Te(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=be({},le),le.pedantic=be({},le.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:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=be({},le.normal,{escape:Te(le.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),le.gfm.url=Te(le.gfm.url,"i").replace("email",le.gfm._extended_email).getRegex(),le.breaks=be({},le.gfm,{br:Te(le.br).replace("{2,}","*").getRegex(),text:Te(le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var re={block:ue,inline:le},fe=C.defaults,q=re.block,ee=re.inline;function Ce(Ue){return Ue.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(Ue){var Me="",Ne,xe,Se=Ue.length;for(Ne=0;Ne<Se;Ne++)xe=Ue.charCodeAt(Ne),Math.random()>.5&&(xe="x"+xe.toString(16)),Me+="&#"+xe+";";return Me}var J=function(){function Ue(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||fe,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var xe={block:q.normal,inline:ee.normal};this.options.pedantic?(xe.block=q.pedantic,xe.inline=ee.pedantic):this.options.gfm&&(xe.block=q.gfm,this.options.breaks?xe.inline=ee.breaks:xe.inline=ee.gfm),this.tokenizer.rules=xe}Ue.lex=function(xe,Se){var Ae=new Ue(Se);return Ae.lex(xe)};var Me=Ue.prototype;return Me.lex=function(xe){return xe=xe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(xe,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(xe,Se,Ae){Se===void 0&&(Se=[]),Ae===void 0&&(Ae=!0),xe=xe.replace(/^ +$/gm,"");for(var Le,Je,Ve,gt;xe;){if(Le=this.tokenizer.space(xe)){xe=xe.substring(Le.raw.length),Le.type&&Se.push(Le);continue}if(Le=this.tokenizer.code(xe,Se)){xe=xe.substring(Le.raw.length),Le.type?Se.push(Le):(gt=Se[Se.length-1],gt.raw+=`
`+Le.raw,gt.text+=`
`+Le.text);continue}if(Le=this.tokenizer.fences(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.heading(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.nptable(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.hr(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.blockquote(xe)){xe=xe.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Ae),Se.push(Le);continue}if(Le=this.tokenizer.list(xe)){for(xe=xe.substring(Le.raw.length),Ve=Le.items.length,Je=0;Je<Ve;Je++)Le.items[Je].tokens=this.blockTokens(Le.items[Je].text,[],!1);Se.push(Le);continue}if(Le=this.tokenizer.html(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Ae&&(Le=this.tokenizer.def(xe))){xe=xe.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.lheading(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Ae&&(Le=this.tokenizer.paragraph(xe))){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.text(xe,Se)){xe=xe.substring(Le.raw.length),Le.type?Se.push(Le):(gt=Se[Se.length-1],gt.raw+=`
`+Le.raw,gt.text+=`
`+Le.text);continue}if(xe){var yt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(yt);break}else throw new Error(yt)}}return Se},Me.inline=function(xe){var Se,Ae,Le,Je,Ve,gt,yt=xe.length;for(Se=0;Se<yt;Se++){gt=xe[Se];switch(gt.type){case"paragraph":case"text":case"heading":{gt.tokens=[],this.inlineTokens(gt.text,gt.tokens);break}case"table":{for(gt.tokens={header:[],cells:[]},Je=gt.header.length,Ae=0;Ae<Je;Ae++)gt.tokens.header[Ae]=[],this.inlineTokens(gt.header[Ae],gt.tokens.header[Ae]);for(Je=gt.cells.length,Ae=0;Ae<Je;Ae++)for(Ve=gt.cells[Ae],gt.tokens.cells[Ae]=[],Le=0;Le<Ve.length;Le++)gt.tokens.cells[Ae][Le]=[],this.inlineTokens(Ve[Le],gt.tokens.cells[Ae][Le]);break}case"blockquote":{this.inline(gt.tokens);break}case"list":{for(Je=gt.items.length,Ae=0;Ae<Je;Ae++)this.inline(gt.items[Ae].tokens);break}}}return xe},Me.inlineTokens=function(xe,Se,Ae,Le,Je){Se===void 0&&(Se=[]),Ae===void 0&&(Ae=!1),Le===void 0&&(Le=!1),Je===void 0&&(Je="");var Ve,gt=xe,yt;if(this.tokens.links){var Bt=Object.keys(this.tokens.links);if(Bt.length>0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(gt))!=null;)Bt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(gt))!=null;)gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;xe;){if(Ve=this.tokenizer.escape(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.tag(xe,Ae,Le)){xe=xe.substring(Ve.raw.length),Ae=Ve.inLink,Le=Ve.inRawBlock,Se.push(Ve);continue}if(Ve=this.tokenizer.link(xe)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.reflink(xe,this.tokens.links)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.strong(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.em(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.codespan(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.br(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.del(xe)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.autolink(xe,te)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(!Ae&&(Ve=this.tokenizer.url(xe,te))){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.inlineText(xe,Le,Ce)){xe=xe.substring(Ve.raw.length),Je=Ve.raw.slice(-1),Se.push(Ve);continue}if(xe){var Nt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(Nt);break}else throw new Error(Nt)}}return Se},d(Ue,null,[{key:"rules",get:function(){return{block:q,inline:ee}}}]),Ue}(),X=C.defaults,Q=K.cleanUrl,Ee=K.escape,ge=function(){function Ue(Ne){this.options=Ne||X}var Me=Ue.prototype;return Me.code=function(xe,Se,Ae){var Le=(Se||"").match(/\S*/)[0];if(this.options.highlight){var Je=this.options.highlight(xe,Le);Je!=null&&Je!==xe&&(Ae=!0,xe=Je)}return Le?'<pre><code class="'+this.options.langPrefix+Ee(Le,!0)+'">'+(Ae?xe:Ee(xe,!0))+`</code></pre>
`:"<pre><code>"+(Ae?xe:Ee(xe,!0))+`</code></pre>
`},Me.blockquote=function(xe){return`<blockquote>
`+xe+`</blockquote>
`},Me.html=function(xe){return xe},Me.heading=function(xe,Se,Ae,Le){return this.options.headerIds?"<h"+Se+' id="'+this.options.headerPrefix+Le.slug(Ae)+'">'+xe+"</h"+Se+`>
`:"<h"+Se+">"+xe+"</h"+Se+`>
`},Me.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Me.list=function(xe,Se,Ae){var Le=Se?"ol":"ul",Je=Se&&Ae!==1?' start="'+Ae+'"':"";return"<"+Le+Je+`>
`+xe+"</"+Le+`>
`},Me.listitem=function(xe){return"<li>"+xe+`</li>
`},Me.checkbox=function(xe){return"<input "+(xe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(xe){return"<p>"+xe+`</p>
`},Me.table=function(xe,Se){return Se&&(Se="<tbody>"+Se+"</tbody>"),`<table>
<thead>
`+xe+`</thead>
`+Se+`</table>
`},Me.tablerow=function(xe){return`<tr>
`+xe+`</tr>
`},Me.tablecell=function(xe,Se){var Ae=Se.header?"th":"td",Le=Se.align?"<"+Ae+' align="'+Se.align+'">':"<"+Ae+">";return Le+xe+"</"+Ae+`>
`},Me.strong=function(xe){return"<strong>"+xe+"</strong>"},Me.em=function(xe){return"<em>"+xe+"</em>"},Me.codespan=function(xe){return"<code>"+xe+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(xe){return"<del>"+xe+"</del>"},Me.link=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le='<a href="'+Ee(xe)+'"';return Se&&(Le+=' title="'+Se+'"'),Le+=">"+Ae+"</a>",Le},Me.image=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le='<img src="'+xe+'" alt="'+Ae+'"';return Se&&(Le+=' title="'+Se+'"'),Le+=this.options.xhtml?"/>":">",Le},Me.text=function(xe){return xe},Ue}(),Oe=function(){function Ue(){}var Me=Ue.prototype;return Me.strong=function(xe){return xe},Me.em=function(xe){return xe},Me.codespan=function(xe){return xe},Me.del=function(xe){return xe},Me.html=function(xe){return xe},Me.text=function(xe){return xe},Me.link=function(xe,Se,Ae){return""+Ae},Me.image=function(xe,Se,Ae){return""+Ae},Me.br=function(){return""},Ue}(),Qe=function(){function Ue(){this.seen={}}var Me=Ue.prototype;return Me.slug=function(xe){var Se=xe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var Ae=Se;do this.seen[Ae]++,Se=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=C.defaults,nt=K.unescape,ut=function(){function Ue(Ne){this.options=Ne||rt,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Qe}Ue.parse=function(xe,Se){var Ae=new Ue(Se);return Ae.parse(xe)};var Me=Ue.prototype;return Me.parse=function(xe,Se){Se===void 0&&(Se=!0);var Ae="",Le,Je,Ve,gt,yt,Bt,Nt,mr,hr,St,$r,Xr,Ur,sn,Rr,mn,vn,Gt,Cn=xe.length;for(Le=0;Le<Cn;Le++){St=xe[Le];switch(St.type){case"space":continue;case"hr":{Ae+=this.renderer.hr();continue}case"heading":{Ae+=this.renderer.heading(this.parseInline(St.tokens),St.depth,nt(this.parseInline(St.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ae+=this.renderer.code(St.text,St.lang,St.escaped);continue}case"table":{for(mr="",Nt="",gt=St.header.length,Je=0;Je<gt;Je++)Nt+=this.renderer.tablecell(this.parseInline(St.tokens.header[Je]),{header:!0,align:St.align[Je]});for(mr+=this.renderer.tablerow(Nt),hr="",gt=St.cells.length,Je=0;Je<gt;Je++){for(Bt=St.tokens.cells[Je],Nt="",yt=Bt.length,Ve=0;Ve<yt;Ve++)Nt+=this.renderer.tablecell(this.parseInline(Bt[Ve]),{header:!1,align:St.align[Ve]});hr+=this.renderer.tablerow(Nt)}Ae+=this.renderer.table(mr,hr);continue}case"blockquote":{hr=this.parse(St.tokens),Ae+=this.renderer.blockquote(hr);continue}case"list":{for($r=St.ordered,Xr=St.start,Ur=St.loose,gt=St.items.length,hr="",Je=0;Je<gt;Je++)Rr=St.items[Je],mn=Rr.checked,vn=Rr.task,sn="",Rr.task&&(Gt=this.renderer.checkbox(mn),Ur?Rr.tokens.length>0&&Rr.tokens[0].type==="text"?(Rr.tokens[0].text=Gt+" "+Rr.tokens[0].text,Rr.tokens[0].tokens&&Rr.tokens[0].tokens.length>0&&Rr.tokens[0].tokens[0].type==="text"&&(Rr.tokens[0].tokens[0].text=Gt+" "+Rr.tokens[0].tokens[0].text)):Rr.tokens.unshift({type:"text",text:Gt}):sn+=Gt),sn+=this.parse(Rr.tokens,Ur),hr+=this.renderer.listitem(sn,vn,mn);Ae+=this.renderer.list(hr,$r,Xr);continue}case"html":{Ae+=this.renderer.html(St.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(hr=St.tokens?this.parseInline(St.tokens):St.text;Le+1<Cn&&xe[Le+1].type==="text";)St=xe[++Le],hr+=`
`+(St.tokens?this.parseInline(St.tokens):St.text);Ae+=Se?this.renderer.paragraph(hr):hr;continue}default:{var yn='Token with "'+St.type+'" type was not found.';if(this.options.silent){console.error(yn);return}else throw new Error(yn)}}}return Ae},Me.parseInline=function(xe,Se){Se=Se||this.renderer;var Ae="",Le,Je,Ve=xe.length;for(Le=0;Le<Ve;Le++){Je=xe[Le];switch(Je.type){case"escape":{Ae+=Se.text(Je.text);break}case"html":{Ae+=Se.html(Je.text);break}case"link":{Ae+=Se.link(Je.href,Je.title,this.parseInline(Je.tokens,Se));break}case"image":{Ae+=Se.image(Je.href,Je.title,Je.text);break}case"strong":{Ae+=Se.strong(this.parseInline(Je.tokens,Se));break}case"em":{Ae+=Se.em(this.parseInline(Je.tokens,Se));break}case"codespan":{Ae+=Se.codespan(Je.text);break}case"br":{Ae+=Se.br();break}case"del":{Ae+=Se.del(this.parseInline(Je.tokens,Se));break}case"text":{Ae+=Se.text(Je.text);break}default:{var gt='Token with "'+Je.type+'" type was not found.';if(this.options.silent){console.error(gt);return}else throw new Error(gt)}}}return Ae},Ue}(),dt=K.merge,mt=K.checkSanitizeDeprecation,He=K.escape,De=C.getDefaults,at=C.changeDefaults,ht=C.defaults;function Ze(Ue,Me,Ne){if(typeof Ue=="undefined"||Ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ue)+", string expected");if(typeof Me=="function"&&(Ne=Me,Me=null),Me=dt({},Ze.defaults,Me||{}),mt(Me),Ne){var xe=Me.highlight,Se;try{Se=J.lex(Ue,Me)}catch(Ve){return Ne(Ve)}var Ae=function(gt){var yt;if(!gt)try{yt=ut.parse(Se,Me)}catch(Bt){gt=Bt}return Me.highlight=xe,gt?Ne(gt):Ne(null,yt)};if(!xe||xe.length<3)return Ae();if(delete Me.highlight,!Se.length)return Ae();var Le=0;Ze.walkTokens(Se,function(Ve){Ve.type==="code"&&(Le++,setTimeout(function(){xe(Ve.text,Ve.lang,function(gt,yt){if(gt)return Ae(gt);yt!=null&&yt!==Ve.text&&(Ve.text=yt,Ve.escaped=!0),Le--,Le===0&&Ae()})},0))}),Le===0&&Ae();return}try{var Je=J.lex(Ue,Me);return Me.walkTokens&&Ze.walkTokens(Je,Me.walkTokens),ut.parse(Je,Me)}catch(Ve){if(Ve.message+=`
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+He(Ve.message+"",!0)+"</pre>";throw Ve}}Ze.options=Ze.setOptions=function(Ue){return dt(Ze.defaults,Ue),at(Ze.defaults),Ze},Ze.getDefaults=De,Ze.defaults=ht,Ze.use=function(Ue){var Me=dt({},Ue);if(Ue.renderer&&function(){var xe=Ze.defaults.renderer||new ge,Se=function(Je){var Ve=xe[Je];xe[Je]=function(){for(var gt=arguments.length,yt=new Array(gt),Bt=0;Bt<gt;Bt++)yt[Bt]=arguments[Bt];var Nt=Ue.renderer[Je].apply(xe,yt);return Nt===!1&&(Nt=Ve.apply(xe,yt)),Nt}};for(var Ae in Ue.renderer)Se(Ae);Me.renderer=xe}(),Ue.tokenizer&&function(){var xe=Ze.defaults.tokenizer||new ke,Se=function(Je){var Ve=xe[Je];xe[Je]=function(){for(var gt=arguments.length,yt=new Array(gt),Bt=0;Bt<gt;Bt++)yt[Bt]=arguments[Bt];var Nt=Ue.tokenizer[Je].apply(xe,yt);return Nt===!1&&(Nt=Ve.apply(xe,yt)),Nt}};for(var Ae in Ue.tokenizer)Se(Ae);Me.tokenizer=xe}(),Ue.walkTokens){var Ne=Ze.defaults.walkTokens;Me.walkTokens=function(xe){Ue.walkTokens(xe),Ne&&Ne(xe)}}Ze.setOptions(Me)},Ze.walkTokens=function(Ue,Me){for(var Ne=u(Ue),xe;!(xe=Ne()).done;){var Se=xe.value;Me(Se);switch(Se.type){case"table":{for(var Ae=u(Se.tokens.header),Le;!(Le=Ae()).done;){var Je=Le.value;Ze.walkTokens(Je,Me)}for(var Ve=u(Se.tokens.cells),gt;!(gt=Ve()).done;)for(var yt=gt.value,Bt=u(yt),Nt;!(Nt=Bt()).done;){var mr=Nt.value;Ze.walkTokens(mr,Me)}break}case"list":{Ze.walkTokens(Se.items,Me);break}default:Se.tokens&&Ze.walkTokens(Se.tokens,Me)}}},Ze.Parser=ut,Ze.parser=ut.parse,Ze.Renderer=ge,Ze.TextRenderer=Oe,Ze.Lexer=J,Ze.lexer=J.lex,Ze.Tokenizer=ke,Ze.Slugger=Qe,Ze.parse=Ze;var st=Ze;return st})},E4JC:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=[],C=[],E=[],l=u.Rabbit=D.extend({_doReset:function(){for(var n=this._key.words,h=this.cfg.iv,f=0;f<4;f++)n[f]=(n[f]<<8|n[f]>>>24)&16711935|(n[f]<<24|n[f]>>>8)&4278255360;var c=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],m=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 f=0;f<4;f++)s.call(this);for(var f=0;f<8;f++)m[f]^=c[f+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;m[0]^=a,m[1]^=S,m[2]^=t,m[3]^=x,m[4]^=a,m[5]^=S,m[6]^=t,m[7]^=x;for(var f=0;f<4;f++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<C[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<C[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<C[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<C[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<C[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<C[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<C[6]>>>0?1:0)|0,this._b=h[7]>>>0<C[7]>>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.Rabbit=D._createHelper(l)}(),P.Rabbit})},ELLl:function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(m,_,y){y&&y!=P.Init&&(m.removeKeyMap(u),m.state.closeBrackets=null),_&&(p(D(_,"pairs")),m.state.closeBrackets=_,m.addKeyMap(u))});function D(m,_){return _=="pairs"&&typeof m=="string"?m:typeof m=="object"&&m[_]!=null?m[_]:d[_]}var u={Backspace:l,Enter:s};function p(m){for(var _=0;_<m.length;_++){var y=m.charAt(_),i="'"+y+"'";u[i]||(u[i]=C(y))}}p(d.pairs+"`");function C(m){return function(_){return h(_,m)}}function E(m){var _=m.state.closeBrackets;if(!_||_.override)return _;var y=m.getModeAt(m.getCursor());return y.closeBrackets||_}function l(m){var _=E(m);if(!_||m.getOption("disableInput"))return P.Pass;for(var y=D(_,"pairs"),i=m.listSelections(),a=0;a<i.length;a++){if(!i[a].empty())return P.Pass;var t=f(m,i[a].head);if(!t||y.indexOf(t)%2!=0)return P.Pass}for(var a=i.length-1;a>=0;a--){var S=i[a].head;m.replaceRange("",T(S.line,S.ch-1),T(S.line,S.ch+1),"+delete")}}function s(m){var _=E(m),y=_&&D(_,"explode");if(!y||m.getOption("disableInput"))return P.Pass;for(var i=m.listSelections(),a=0;a<i.length;a++){if(!i[a].empty())return P.Pass;var t=f(m,i[a].head);if(!t||y.indexOf(t)%2!=0)return P.Pass}m.operation(function(){var S=m.lineSeparator()||`
`;m.replaceSelection(S+S,null),m.execCommand("goCharLeft"),i=m.listSelections();for(var x=0;x<i.length;x++){var o=i[x].head.line;m.indentLine(o,null,!0),m.indentLine(o+1,null,!0)}})}function n(m){var _=P.cmpPos(m.anchor,m.head)>0;return{anchor:new T(m.anchor.line,m.anchor.ch+(_?-1:1)),head:new T(m.head.line,m.head.ch+(_?1:-1))}}function h(m,_){var y=E(m);if(!y||m.getOption("disableInput"))return P.Pass;var i=D(y,"pairs"),a=i.indexOf(_);if(a==-1)return P.Pass;for(var t=D(y,"closeBefore"),S=D(y,"triples"),x=i.charAt(a+1)==_,o=m.listSelections(),k=a%2==0,O,b=0;b<o.length;b++){var v=o[b],g=v.head,w,M=m.getRange(g,T(g.line,g.ch+1));if(k&&!v.empty())w="surround";else if((x||!k)&&M==_)x&&c(m,g)?w="both":S.indexOf(_)>=0&&m.getRange(g,T(g.line,g.ch+3))==_+_+_?w="skipThree":w="skip";else if(x&&g.ch>1&&S.indexOf(_)>=0&&m.getRange(T(g.line,g.ch-2),g)==_+_){if(g.ch>2&&/\bstring/.test(m.getTokenTypeAt(T(g.line,g.ch-2))))return P.Pass;w="addFour"}else if(x){var N=g.ch==0?" ":m.getRange(T(g.line,g.ch-1),g);if(!P.isWordChar(M)&&N!=_&&!P.isWordChar(N))w="both";else return P.Pass}else if(k&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))w="both";else return P.Pass;if(!O)O=w;else if(O!=w)return P.Pass}var I=a%2?i.charAt(a-1):_,G=a%2?_:i.charAt(a+1);m.operation(function(){if(O=="skip")m.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)m.execCommand("goCharRight");else if(O=="surround"){for(var H=m.getSelections(),z=0;z<H.length;z++)H[z]=I+H[z]+G;m.replaceSelections(H,"around"),H=m.listSelections().slice();for(var z=0;z<H.length;z++)H[z]=n(H[z]);m.setSelections(H)}else O=="both"?(m.replaceSelection(I+G,null),m.triggerElectric(I+G),m.execCommand("goCharLeft")):O=="addFour"&&(m.replaceSelection(I+I+I+I,"before"),m.execCommand("goCharRight"))})}function f(m,_){var y=m.getRange(T(_.line,_.ch-1),T(_.line,_.ch+1));return y.length==2?y:null}function c(m,_){var y=m.getTokenAt(T(_.line,_.ch+1));return/\bstring/.test(y.type)&&y.start==_.ch&&(_.ch==0||!/\bstring/.test(m.getTokenTypeAt(_)))}})},ELcG:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){/** @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(d){var T=P,D=T.lib,u=D.WordArray,p=D.Hasher,C=T.algo,E=u.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=u.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=u.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),n=u.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=u.create([0,1518500249,1859775393,2400959708,2840853838]),f=u.create([1352829926,1548603684,1836072691,2053994217,0]),c=C.RIPEMD160=p.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,x){for(var o=0;o<16;o++){var k=x+o,O=S[k];S[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,v=h.words,g=f.words,w=E.words,M=l.words,N=s.words,I=n.words,G,z,H,K,U,B,V,ae,he,pe;B=G=b[0],V=z=b[1],ae=H=b[2],he=K=b[3],pe=U=b[4];for(var Re,o=0;o<80;o+=1)Re=G+S[x+w[o]]|0,o<16?Re+=m(z,H,K)+v[0]:o<32?Re+=_(z,H,K)+v[1]:o<48?Re+=y(z,H,K)+v[2]:o<64?Re+=i(z,H,K)+v[3]:Re+=a(z,H,K)+v[4],Re=Re|0,Re=t(Re,N[o]),Re=Re+U|0,G=U,U=K,K=t(H,10),H=z,z=Re,Re=B+S[x+M[o]]|0,o<16?Re+=a(V,ae,he)+g[0]:o<32?Re+=i(V,ae,he)+g[1]:o<48?Re+=y(V,ae,he)+g[2]:o<64?Re+=_(V,ae,he)+g[3]:Re+=m(V,ae,he)+g[4],Re=Re|0,Re=t(Re,I[o]),Re=Re+pe|0,B=pe,pe=he,he=t(ae,10),ae=V,V=Re;Re=b[1]+H+he|0,b[1]=b[2]+K+pe|0,b[2]=b[3]+U+B|0,b[3]=b[4]+G+V|0,b[4]=b[0]+z+ae|0,b[0]=Re},_doFinalize:function(){var S=this._data,x=S.words,o=this._nDataBytes*8,k=S.sigBytes*8;x[k>>>5]|=128<<24-k%32,x[(k+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var O=this._hash,b=O.words,v=0;v<5;v++){var g=b[v];b[v]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}return O},clone:function(){var S=p.clone.call(this);return S._hash=this._hash.clone(),S}});function m(S,x,o){return S^x^o}function _(S,x,o){return S&x|~S&o}function y(S,x,o){return(S|~x)^o}function i(S,x,o){return S&o|x&~o}function a(S,x,o){return S^(x|~o)}function t(S,x){return S<<x|S>>>32-x}T.RIPEMD160=p._createHelper(c),T.HmacRIPEMD160=p._createHmacHelper(c)}(Math),P.RIPEMD160})},ETIr:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Base64={stringify:function(E){var l=E.words,s=E.sigBytes,n=this._map;E.clamp();for(var h=[],f=0;f<s;f+=3)for(var c=l[f>>>2]>>>24-f%4*8&255,m=l[f+1>>>2]>>>24-(f+1)%4*8&255,_=l[f+2>>>2]>>>24-(f+2)%4*8&255,y=c<<16|m<<8|_,i=0;i<4&&f+i*.75<s;i++)h.push(n.charAt(y>>>6*(3-i)&63));var a=n.charAt(64);if(a)for(;h.length%4;)h.push(a);return h.join("")},parse:function(E){var l=E.length,s=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var h=0;h<s.length;h++)n[s.charCodeAt(h)]=h}var f=s.charAt(64);if(f){var c=E.indexOf(f);c!==-1&&(l=c)}return C(E,l,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function C(E,l,s){for(var n=[],h=0,f=0;f<l;f++)if(f%4){var c=s[E.charCodeAt(f-1)]<<f%4*2,m=s[E.charCodeAt(f)]>>>6-f%4*2,_=c|m;n[h>>>2]|=_<<24-h%4*8,h++}return D.create(n,h)}}(),P.enc.Base64})},"F+F2":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var d=P,T=d.lib,D=T.WordArray,u=D.init,p=D.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var E=C.byteLength,l=[],s=0;s<E;s++)l[s>>>2]|=C[s]<<24-s%4*8;u.call(this,l,E)}else u.apply(this,arguments)};p.prototype=D}(),P.lib.WordArray})},GRO8:function(j,Z,L){"use strict";L.r(Z);var P=L("k1fw"),d=L("2qtc"),T=L("kLXV"),D=L("lUTK"),u=L("BvKs"),p=L("+L6B"),C=L("2/Rp"),E=L("T2oS"),l=L("W9HT"),s=L("sPJy"),n=L("bE4q"),h=L("miYZ"),f=L("tsqr"),c=L("9og8"),m=L("tJVT"),_=L("PpiC"),y=L("WmNS"),i=L.n(y),a=L("q1tI"),t=L.n(a),S=L("Ty5D"),x=L("55Ip"),o=L("9kvl"),k=L("KeDT"),O=L.n(k),b=L("zrhs"),v=L("DZo9"),g=L("8z0m"),w=L("LtfV"),M=L("KhGG"),N=g.a.Dragger,I=function(tt){var pt=tt.user,_t=tt.dispatch,Mt=tt.classroomList,Dt=tt.shixunsDetail,Ht=tt.getResults,Wt=Object(S.i)(),ct=Object(a.useState)(),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)([]),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(!1),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr={onRemove:function(){tr([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return f.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var wt=[];return wt.push(Et),tr([].concat(wt)),!1},fileList:Kt};return t.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:Dr,onOk:Object(c.a)(i.a.mark(function er(){var Et,wt,xt;return i.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(!((Kt==null?void 0:Kt.length)<=0)){ur.next=3;break}return f.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),ur.abrupt("return");case 3:return Ir(!0),ur.next=6,Object(M.c)(Kt[0],{login:(Et=pt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(wt=Kt[0])===null||wt===void 0?void 0:wt.name});case 6:xt=ur.sent,(xt==null?void 0:xt.status)===0?(f.b.info("\u63D0\u4EA4\u6210\u529F"),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Ir(!1),tr([]),Ht(Dt.actionTabs.params.value)):(Ir(!1),f.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return ur.stop()}},er)})),onCancel:function(){tr([]),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,yr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(w.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.classroomList,_t=Ct.shixunsDetail;return{user:tt,classroomList:pt,shixunsDetail:_t}})(I),z=L("14J3"),H=L("BMrR"),K=L("5NDa"),U=L("5rEg"),B=L("9Bee"),V=L("m3rI"),ae=L("ErOA"),he=L("NLgs"),pe=L("fV52"),Re=L("3I+P"),ke=L("OaEy"),ve=L("2fM7"),Te=L("5bA4"),be=L("UESt"),ue=ve.a.Option;function le(Ct){var tt=Ct.rewarddata,pt=Ct.getlistdatas,_t=Ct.is_signed,Mt=Ct.dispatch,Dt=Ct.userlist,Ht=Object(a.useRef)(null),Wt=Object(a.useState)(!1),ct=Object(m.a)(Wt,2),Ot=ct[0],Rt=ct[1],fr=Object(a.useState)(void 0),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(""),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(void 0),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(void 0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(void 0),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1];function et(gr){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(pr){var Or;return i.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!pr.user_received){Jt.next=3;break}return window.open(pr.click_info),Jt.abrupt("return");case 3:if(Object(he.f)(Mt)){Jt.next=5;break}return Jt.abrupt("return");case 5:if(!(_t===!1)){Jt.next=8;break}return f.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Jt.abrupt("return");case 8:if(!(pr.click_event==="Pop")){Jt.next=14;break}return Dr(pr.id),Rt(!0),Jt.abrupt("return");case 14:Kt(void 0);case 15:return Jt.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:pr.id}});case 17:Or=Jt.sent,Or&&Or.status===0&&(pt(),pr.click_event==="Link"?(f.b.info("\u9886\u53D6\u6210\u529F"),window.open(pr.click_info)):f.b.info(pr.click_info));case 19:case"end":return Jt.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Dt&&!Dt.real_name)){Ft.next=4;break}if(er){Ft.next=4;break}return f.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Ft.next=8;break}if($t){Ft.next=8;break}return f.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Ft.next=12;break}if(Tr){Ft.next=12;break}return f.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Qt){Ft.next=15;break}return f.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:ot,className:Qt,name:er,mail:$t,phone:Tr}});case 17:pr=Ft.sent,pr&&pr.status===0&&(Rt(!1),pt(),f.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 Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(T.a,{visible:Ot,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Rt(!1)},onOk:function(){Lr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||er,disabled:Dt&&Dt.real_name||!1,onChange:function(pr){return Et(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||$t,disabled:Dt&&Dt.email||!1,onChange:function(pr){return ur(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Tr,disabled:Dt&&Dt.phone||!1,onChange:function(pr){return Zr(pr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(ve.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(pr){Kt(pr)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{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")),tt&&tt.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Te.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Re.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\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(){Ht.current.next()}},t.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=le,fe=function(tt,pt){var _t=tt.StaffDetail,Mt=tt.HeaderDetail,Dt=tt.ItemData,Ht=tt.setIssee,Wt=tt.ModelType,ct=tt.dispatch,Ot=tt.userinfo,Rt=tt.Editable,fr=Object(a.useState)(!1),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)([]),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(""),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(!1),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(S.i)(),ir=et.identifier,Lr=Object(a.useRef)(null),Jr=Object(a.useRef)(null);Lr.current=_t==null?void 0:_t.enrolled,Object(a.useEffect)(function(){var Ft;return(Ft=Jr.current)===null||Ft===void 0||Ft.addEventListener("click",gr),function(){var Jt;(Jt=Jr.current)===null||Jt===void 0||Jt.removeEventListener("click",gr)}},[]);var gr=function(Jt){var br;if((Jt==null||((br=Jt.target)===null||br===void 0)?void 0:br.id)==="modal-upload"){if(!Object(he.e)(ct))return;if(!Lr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Kt(!0)}};Object(a.useEffect)(function(){if(Mt!=null&&Mt.upload_file){var Ft,Jt,br;Dr([{name:Mt==null||((Ft=Mt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),ur(Mt==null?void 0:Mt.upload_file_url),Et(Mt==null||((Jt=Mt.upload_file)===null||Jt===void 0||((br=Jt.url)===null||br===void 0))?void 0:br.split("/")[3])}},[Mt==null?void 0:Mt.upload_file]);var pr={name:"file",multiple:!1,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Jt){var br=Jt.file.status,Zt=[Object(P.a)({},Jt.file)];if(Dr(Zt),Jt.file.status==="uploading"&&Zr(!0),br==="done"){var vt,bt;Et((vt=Zt[0])===null||vt===void 0||((bt=vt.response)===null||bt===void 0)?void 0:bt.id),Zr(!1)}br==="error"&&(Dr([]),Zr(!1))},beforeUpload:function(Jt){var br=Jt.size/1024/1024<1e3;return br?Promise.resolve():(f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Or=function(){Kt(!0)};return Object(a.useImperativeHandle)(pt,function(){return{handleVisible:Or}}),t.a.createElement("div",{ref:Jr},Wt==="reward"?t.a.createElement(re,{userlist:Ot,dispatch:ct,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((Ot==null?void 0:Ot.admin)||(Ot==null?void 0:Ot.business)||Rt)&&t.a.createElement(C.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(B.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Ft,Jt){return t.a.createElement("div",null,t.a.createElement("a",{href:(V.a===null||V.a===void 0?void 0:V.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Qt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Tr,onCancel:function(){return Kt(!1)},onOk:Object(c.a)(i.a.mark(function Ft(){var Jt;return i.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(!(!er&&!$t)){Zt.next=3;break}return Kt(!1),Zt.abrupt("return");case 3:return Zr(!0),Zt.next=6,Object(ae.a)("/api/competitions/".concat(ir,"/upload_file.json"),{method:"post",body:{attachment_id:er,upload_file_url:$t}});case 6:Jt=Zt.sent,Jt.status===0&&(Kt(!1),Zr(!1));case 8:case"end":return Zt.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(H.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:$t,onChange:function(Jt){var br;return ur((br=Jt.target)===null||br===void 0?void 0:br.value)}})),t.a.createElement(H.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(g.a,pr,t.a.createElement(C.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},q=Object(a.forwardRef)(fe),ee=L("Ot1p"),Ce=L("hJwl");function te(Ct){var tt=Ct.ItemData,pt=Ct.setIssee,_t=Ct.MenuItem,Mt=Ct.dispatch,Dt=Ct.identifier,Ht=Ct.ModelType,Wt=Ct.userinfo,ct=Ct.getrightdatas,Ot=Object(a.useState)([]),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.useState)(tt.md_content),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1];Object(a.useEffect)(function(){var Et,wt=[];tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),qt(wt)},[tt==null?void 0:tt.attachments]);function ot(){var Et,wt=[];return tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt==null?void 0:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),wt}var Dr={name:"file",multiple:!0,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(wt){Object(Ce.t)({id:wt.uid})},onChange:function(wt){var xt=wt.file.status;xt!=="uploading",xt==="removed"&&qt(wt.fileList),xt==="done"?(qt(wt.fileList),f.b.success("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):xt==="error"&&f.b.error("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(wt){var xt=wt.size/1024/1024<150;return xt||f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),xt}};console.log(Dr);function Ir(){return yr.apply(this,arguments)}function yr(){return yr=Object(c.a)(i.a.mark(function Et(){var wt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,Mt({type:"competitions/updateMdContent",payload:{attachment_ids:er(fr),competition_module_id:tt.id,md_content_id:tt.md_id,content:tr,identifier:Dt}});case 2:wt=$t.sent,wt&&(f.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ct(_t));case 4:case"end":return $t.stop()}},Et)})),yr.apply(this,arguments)}function er(Et){var wt=[];return Et&&Et.map(function(xt){wt.push(xt.response.id)}),wt}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(re,{userlist:Wt,dispatch:Mt,rewarddata:tt.reward_setting,is_signed:tt.is_signed}):null,t.a.createElement(ee.a,{defaultValue:tr,onChange:function(wt){return or(wt)}}),t.a.createElement(g.a,Dr,t.a.createElement(C.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ir()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var J=te,X=L("g9YV"),Q=L("wCAj"),Ee=L("Znn+"),ge=L("ZTPi");function Oe(){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:V.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 Qe=Oe,rt=L("5Dmo"),nt=L("3S7+"),ut=L("jCWc"),dt=L("kPKH"),mt=L("IzEo"),He=L("bx4M");function De(Ct){var tt=Ct.oneItem,pt=Ct.towItem,_t=Ct.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(H.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(tt==null?void 0:tt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(tt==null?void 0:tt.user_image)}),(tt==null?void 0:tt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},tt==null?void 0:tt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},tt==null?void 0:tt.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},tt==null?void 0:tt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},tt==null?void 0:tt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(tt==null?void 0:tt.extra_score)+parseFloat(tt==null?void 0:tt.score),"\u5206"))),t.a.createElement(dt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(_t==null?void 0:_t.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(_t==null?void 0:_t.user_image)}),(_t==null?void 0:_t.competition_prize)&&t.a.createElement("p",{className:O.a.prize},_t==null?void 0:_t.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},_t==null?void 0:_t.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},_t==null?void 0:_t.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},_t==null?void 0:_t.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(_t==null?void 0:_t.extra_score)+parseFloat(_t==null?void 0:_t.score),"\u5206")))))}var at=De;function ht(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt,fr,qt,Qt,Kt,tr,or,ot,Dr,Ir,yr,er,Et,wt,xt,$t,ur,sr,lr,Tr,Zr,et=Ct.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:et==null?void 0:et.teams[0],towItem:et==null?void 0:et.teams[1],threeItem:et==null?void 0:et.teams[2]}),(et==null||((tt=et.user_ranks)===null||tt===void 0)?void 0:tt.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(et==null||((pt=et.user_ranks)===null||pt===void 0||((_t=pt[0])===null||_t===void 0))?void 0:_t.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(et==null||((Mt=et.user_ranks)===null||Mt===void 0||((Dt=Mt[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(et==null||((Ht=et.user_ranks)===null||Ht===void 0||((Wt=Ht[0])===null||Wt===void 0))?void 0:Wt.success)===!1?"\u5426":et!=null&&(ct=et.user_ranks)!==null&&ct!==void 0&&(Ot=ct[0])!==null&&Ot!==void 0&&Ot.success?"\u662F":"")),(et==null||((Rt=et.user_ranks)===null||Rt===void 0||((fr=Rt[0])===null||fr===void 0))?void 0:fr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(et==null||((qt=et.user_ranks)===null||qt===void 0||((Qt=qt[0])===null||Qt===void 0))?void 0:Qt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(et==null||((Kt=et.user_ranks)===null||Kt===void 0||((tr=Kt[0])===null||tr===void 0))?void 0:tr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",et==null||((or=et.user_ranks)===null||or===void 0||((ot=or[0])===null||ot===void 0))?void 0:ot.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},et==null||((Dr=et.user_ranks)===null||Dr===void 0||((Ir=Dr[0])===null||Ir===void 0))?void 0:Ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},et==null||((yr=et.user_ranks)===null||yr===void 0||((er=yr[0])===null||er===void 0))?void 0:er.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},et==null||((Et=et.user_ranks)===null||Et===void 0||((wt=Et[0])===null||wt===void 0))?void 0:wt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},et==null||((xt=et.user_ranks)===null||xt===void 0||(($t=xt[0])===null||$t===void 0))?void 0:$t.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(et==null||((ur=et.user_ranks)===null||ur===void 0||((sr=ur[0])===null||sr===void 0))?void 0:sr.extra_score)+parseFloat(et==null||((lr=et.user_ranks)===null||lr===void 0||((Tr=lr[0])===null||Tr===void 0))?void 0:Tr.score)||0))),et==null||((Zr=et.teams)===null||Zr===void 0)?void 0:Zr.map(function(ir,Lr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Lr+1),t.a.createElement(x.a,{to:"/users/".concat(ir==null?void 0:ir.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(ir==null?void 0:ir.user_image)}),(ir==null?void 0:ir.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},ir==null?void 0:ir.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},ir==null?void 0:ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},ir.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},ir.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},ir.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(ir.extra_score)+parseFloat(ir.score))))}))}var Ze=ht,st=ge.a.TabPane;function Ue(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.getChartRules,qt=Ct.userinfo,Qt=Ct.Editable,Kt=Ct.HeaderDetail,tr=Object(a.useState)(!1),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(!0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1],gr=Object(S.i)(),pr=gr.identifier;Object(a.useEffect)(function(){if($t){var br,Zt=Wt==null||((br=Wt.stages)===null||br===void 0)?void 0:br[0];if(Zr(Zt),Zt!=null&&Zt.id){var vt,bt,zt;((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog")&&Ot(Zt==null?void 0:Zt.id),Et(((vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(an){return parseInt(an.competition_stage_id)===parseInt(Zt==null?void 0:Zt.id)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.content)||"")}else{var Lt,kr,rn;(Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog",Et(((Lt=Wt.rule_contents)===null||Lt===void 0||((kr=Lt.filter(function(an){return parseInt(an.competition_stage_id)===0}))===null||kr===void 0||((rn=kr[0])===null||rn===void 0))?void 0:rn.content)||"")}}},[Wt]);function Or(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(c.a)(i.a.mark(function br(){var Zt,vt,bt,zt,Lt,kr,rn,an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(er){Nr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Nr.abrupt("return");case 3:if(ur(!1),Zt=Tr==null?void 0:Tr.id,!Zt){Nr.next=12;break}return Nr.next=8,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(un){return parseInt(un.competition_stage_id)===parseInt(Zt)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.id,stage_id:Tr==null?void 0:Tr.id}});case 8:Lt=Nr.sent,Lt.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr()),Nr.next=16;break;case 12:return Nr.next=14,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(un){return parseInt(un.competition_stage_id)===0}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.id,stage_id:Tr==null?void 0:Tr.id}});case 14:Ar=Nr.sent,Ar.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr());case 16:case"end":return Nr.stop()}},br)})),Ft.apply(this,arguments)}var Jt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Zt,vt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Zt){return t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(Zt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Zt){return t.a.createElement("span",{title:Zt},Zt&&(Zt==null?void 0:Zt.length)>=15?(Zt==null?void 0:Zt.substr(0,15))+"...":Zt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}},{title:(Kt==null?void 0:Kt.task)==="mAP"?"mAP\u6307\u6807":(Kt==null?void 0:Kt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}}];return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:((qt==null?void 0:qt.admin)||(qt==null?void 0:qt.business)||Qt)&&t.a.createElement(C.a,{onClick:function(){Dr(!0)}},"\u7F16\u8F91"),onChange:function(Zt){var vt,bt,zt,Lt,kr;Dr(!1);var rn=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt.filter(function(Ar){return parseInt(Zt)===parseInt(Ar==null?void 0:Ar.id)})[0];Zr(rn);var an=rn==null||((bt=rn.children)===null||bt===void 0)?void 0:bt[0];Jr(an),Et(((zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(Ar){return parseInt(Ar.competition_stage_id)===parseInt(rn==null?void 0:rn.id)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.content)||""),Ot((an==null?void 0:an.id)||Zt)}},Wt&&Wt.stages.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id},ot===!1&&Wt&&Wt.rule_contents.map(function(vt,bt){if(br.id===vt.competition_stage_id)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content});if(br.id===null&&vt.competition_stage_id===0)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content})}))})),(Tr==null||((_t=Tr.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(Lr==null?void 0:Lr.id)+"",onChange:function(Zt){var vt,bt=Tr==null||((vt=Tr.children)===null||vt===void 0)?void 0:vt.filter(function(zt){return parseInt(Zt)===parseInt(zt==null?void 0:zt.id)})[0];Jr(bt),Ot(Zt)}},Tr==null||((Mt=Tr.children)===null||Mt===void 0)?void 0:Mt.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:er,onChange:function(Zt){Et(Zt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Or()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Dr(!1)}},"\u53D6\u6D88"))),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog"||(Kt==null?void 0:Kt.task)==="Jittor-3")?t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.teams,columns:Jt,pagination:!1}):(ct==null||((Ht=ct.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Ze,{ItemData:ct}))}var Me=Ue,Ne=L("/zsF"),xe=L("PArb");function Se(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct=Ct.Prize,Ot=Object(S.i)(),Rt=Object(a.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"}]),fr=Object(m.a)(Rt,2),qt=fr[0],Qt=fr[1],Kt=function(){var tr=Object(c.a)(i.a.mark(function or(ot){var Dr;return i.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(Ce.u)({type:ot.type,id:Ot.identifier});case 2:Dr=yr.sent,(Dr==null?void 0:Dr.status)===0&&(location.href="/competitions/exports?id=".concat(Ot.identifier,"&type=").concat(ot.type));case 4:case"end":return yr.stop()}},or)}));return function(ot){return tr.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||((tt=ct.personal_certifications)===null||tt===void 0)?void 0:tt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((pt=ct.personal_certifications[0])===null||pt===void 0)?void 0:pt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ct==null||((_t=ct.team_certifications)===null||_t===void 0)?void 0:_t.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((Mt=ct.team_certifications[0])===null||Mt===void 0)?void 0:Mt.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(xe.a,null),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ct==null?void 0:ct.teams)&&(ct==null||((Ht=ct.teams[0])===null||Ht===void 0)?void 0:Ht.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||((Wt=ct.teams[0])===null||Wt===void 0)?void 0:Wt.team_members.map(function(tr,or){var ot,Dr,Ir,yr,er,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.role),t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.name),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(tr==null?void 0:tr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ct==null?void 0:ct.teams)&&(ct==null||((ot=ct.teams[0])===null||ot===void 0||((Dr=ot.bank_account)===null||Dr===void 0))?void 0:Dr.bank),(ct==null?void 0:ct.teams)&&(ct==null||((Ir=ct.teams[0])===null||Ir===void 0||((yr=Ir.bank_account)===null||yr===void 0))?void 0:yr.second_bank),(ct==null?void 0:ct.teams)&&(ct==null||((er=ct.teams[0])===null||er===void 0||((Et=er.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(H.a,{gutter:[20,20]},qt.map(function(tr,or){return t.a.createElement(dt.a,{key:or},t.a.createElement(C.a,{type:"primary",onClick:function(){return Kt(tr)}},tr.name))})))}var Ae=Se,Le=L("0Owb"),Je=L("7Kak"),Ve=L("9yH6"),gt=L("y8nQ"),yt=L("Vl3Y"),Bt=L("1vsH"),Nt=L("Dgm7"),mr=L.n(Nt),hr=L("NnUe"),St=L.n(hr),$r=g.a.Dragger,Xr=10,Ur=function(tt){var pt=tt.user,_t=tt.account,Mt=tt.globalSetting,Dt=tt.loading,Ht=tt.dispatch,Wt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch"]),ct=yt.a.useForm(),Ot=Object(m.a)(ct,1),Rt=Ot[0],fr=Object(a.useState)({}),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(!0),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1];Object(a.useEffect)(function(){if(!_t.basicInfo)return;var Zt=_t.basicInfo,vt={name:Zt.show_realname?Zt.name:Object(Bt.F)(Zt.name),gender:Zt.gender};Et(Zt.name),Dr(Zt.show_realname),Rt.setFieldsValue(vt),Kt(vt)},[_t.basicInfo]);var gr=function(vt){if(vt.file.status==="uploading"){Jr(!0);return}if(vt.file.status==="done"){var bt;console.log(vt.file,vt.file.response),Zr((bt=vt.file.response)===null||bt===void 0?void 0:bt.id),Object(Bt.C)(vt.file.originFileObj,function(zt){ur(zt),Jr(!1)})}},pr=function(vt){Kt(Object(P.a)({},Rt.getFieldsValue())),"name"in vt&&Et(vt.name)},Or=function(){var vt=!ot;Dr(vt);var bt=vt?er:Object(Bt.F)(er);Rt.setFieldsValue({name:bt})},Ft=function(){var Zt=Object(c.a)(i.a.mark(function vt(bt){var zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(kr=bt||{},rn=kr.name,an=kr.gender,Ar=kr.idNumber,$t){zr.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),zr.abrupt("return");case 4:return zr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((zt=_t.basicInfo)===null||zt===void 0?void 0:zt.id)||((Lt=pt.userInfo)===null||Lt===void 0?void 0:Lt.login),name:rn,gender:an,id_number:Ar,show_realname:ot,attachment_ids:[Tr]}});case 6:qr=zr.sent,Jt(),qr&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Nr=pt.userInfo)===null||Nr===void 0?void 0:Nr.login}}));case 9:case"end":return zr.stop()}},vt)}));return function(bt){return Zt.apply(this,arguments)}}(),Jt=function(){Ht({type:"account/setActionTabs",payload:{}})},br={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:gr,beforeUpload:function(vt){var bt=vt.type==="image/jpeg"||vt.type==="image/png"||vt.type==="image/jpg"||vt.type==="image/bmp";return bt||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_t.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(l.a,{spinning:!!Lr},t.a.createElement(yt.a,{className:St.a.formWrap,form:Rt,layout:"horizontal",onValuesChange:pr,onFinish:Ft},t.a.createElement(yt.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(Xr,"\u4E2A\u5B57\u7B26")},{validator:Bt.I}],extra:t.a.createElement("span",null,ot?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!ot,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Xr,"\u4E2A\u5B57\u7B26"),maxLength:Xr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Or})})),t.a.createElement(yt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(Ve.a.Group,null,t.a.createElement(Ve.a,{value:0},"\u7537"),t.a.createElement(Ve.a,{value:1},"\u5973"))),t.a.createElement(yt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(yt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:mr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement($r,Object(Le.a)({},br,{accept:".png,.jpg,.bmp,.jpeg"}),$t?t.a.createElement("img",{src:$t,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:Jt},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},sn=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Ur),Rr=L("O3gP"),mn=L("lrIw"),vn=L("KXlV"),Gt=L.n(vn),Cn=L("Sjjz"),yn=L.n(Cn),Sn=U.a.TextArea,xn=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.departmentName,ct=tt.visible,Ot=tt.onClose,Rt=Ot===void 0?function(){}:Ot,fr=tt.onSuccess,qt=fr===void 0?function(){}:fr,Qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Kt=yt.a.useForm(),tr=Object(m.a)(Kt,1),or=tr[0],ot=Object(a.useRef)();Object(a.useEffect)(function(){ot.current=Qt.schoolId},[Qt.schoolId]),Object(a.useEffect)(function(){or.setFieldsValue({department:Wt})},[Wt]);var Dr=function(){var Ir=Object(c.a)(i.a.mark(function yr(er){var Et,wt,xt,$t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return Et=er||{},wt=Et.department,xt=Et.remarks,sr.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:wt,remarks:xt}});case 3:$t=sr.sent,Rt(),$t&&(f.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),qt(wt));case 6:case"end":return sr.stop()}},yr)}));return function(er){return Ir.apply(this,arguments)}}();return t.a.createElement(T.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(yt.a,{className:yn.a.formWrap,form:or,labelCol:{span:4},wrapperCol:{span:20},onFinish:Dr},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(yt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Sn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:yn.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Rt()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},xi=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(xn),Ti=L("6UJt"),hn=L("DFOY"),cr=L("jO45"),Gn=L("jN4g"),pi=L("gJ3r"),Vn=L("jwmR"),Yr=L.n(Vn),Un=function(tt,pt){return pt.some(function(_t){return _t.label.toLowerCase().indexOf(tt.toLowerCase())>-1})},ui=U.a.TextArea,ci=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.visible,ct=tt.onClose,Ot=ct===void 0?function(){}:ct,Rt=tt.onSuccess,fr=Rt===void 0?function(){}:Rt,qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Qt=yt.a.useForm(),Kt=Object(m.a)(Qt,1),tr=Kt[0];Object(a.useEffect)(function(){tr.setFieldsValue({name:Ht})},[Ht]);var or=function(){var ot=Object(c.a)(i.a.mark(function Dr(Ir){var yr,er,Et,wt,xt,$t,ur;return i.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return yr=Ir||{},er=yr.name,Et=yr.city,wt=Et===void 0?[]:Et,xt=yr.address,$t=yr.remarks,lr.next=3,Dt({type:"account/appplySchool",payload:{name:er,province:wt[0],city:wt[1],address:xt,remarks:$t}});case 3:ur=lr.sent,Ot(),ur&&(f.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),fr(er));case 6:case"end":return lr.stop()}},Dr)}));return function(Ir){return ot.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Wt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:Yr.a.formWrap,form:tr,labelCol:{span:4},wrapperCol:{span:20},onFinish:or},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Yr.a.flexRow," ").concat(Yr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Yr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(cr.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(Gn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(yt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(hn.a,{allowClear:!0,size:"large",options:pi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Un}})),t.a.createElement(yt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(ui,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Yr.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Ot()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplySchool"]},"\u4FDD\u5B58")))))},jt=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(ci),_r=ve.a.Option,ai=g.a.Dragger,Oi=function(tt){var pt,_t,Mt=tt.user,Dt=tt.account,Ht=tt.globalSetting,Wt=tt.loading,ct=tt.dispatch,Ot=tt.Scoid,Rt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch","Scoid"]),fr=yt.a.useForm(),qt=Object(m.a)(fr,1),Qt=qt[0],Kt=Object(a.useState)({}),tr=Object(m.a)(Kt,2),or=tr[0],ot=tr[1],Dr=Object(a.useState)([]),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)([]),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)([]),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)([]),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(a.useState)(),Jt=Object(m.a)(Ft,2),br=Jt[0],Zt=Jt[1],vt=Object(a.useState)(),bt=Object(m.a)(vt,2),zt=bt[0],Lt=bt[1],kr=Object(a.useState)(),rn=Object(m.a)(kr,2),an=rn[0],Ar=rn[1],qr=Object(a.useState)(),Nr=Object(m.a)(qr,2),un=Nr[0],zr=Nr[1];Object(a.useEffect)(function(){cn()},[]),Object(a.useEffect)(function(){Object(c.a)(i.a.mark(function Xe(){var We;return i.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(Ot){ft.next=2;break}return ft.abrupt("return");case 2:return ft.next=4,$n(Ot);case 4:We=ft.sent,Tr(We==null?void 0:We.departments);case 6:case"end":return ft.stop()}},Xe)}))()},[Ot]);var cn=function(){var Xe=Object(c.a)(i.a.mark(function We(){var qe;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,ct({type:"account/getSchoolOption"});case 2:qe=kt.sent,er(qe==null?void 0:qe.schools);case 4:case"end":return kt.stop()}},We)}));return function(){return Xe.apply(this,arguments)}}(),$n=function(We){return ct({type:"account/getDepartmentOption",payload:{id:We}})};Object(a.useEffect)(function(){if(!Dt.basicInfo)return;var Xe=Dt.basicInfo,We={identity:Xe.identity,school:Xe.school_name,department:Xe.department_name,studentNo:Xe.student_id,jobTitle:Xe.identity=="teacher"?Xe.technical_title:"\u6559\u6388",manager:Xe.identity=="professional"?Xe.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Qt.setFieldsValue(We),ot(We)},[Dt.basicInfo]);var Ie=function(){Ar(!0)},Ge=function(){if(!yr.find(function(We){return We.name===or.school})){f.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}zr(!0)},Ye=function(We){if(ot(Object(P.a)({},Qt.getFieldsValue())),"school"in We){$t(yr.filter(function(ft){return ft.name.includes(We.school)}));var qe=(yr.find(function(ft){return ft.name===We.school})||{}).id;qe?Fe(We.school):(Qt.setFieldsValue({department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:We.school,department:""})))}},Fe=function(){var Xe=Object(c.a)(i.a.mark(function We(qe,ft){var kt,It,Xt,Pr,Gr,Kr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Pr=(kt=yr.find(function(en){return en.name===qe}))===null||kt===void 0?void 0:kt.id,Wr.next=3,$n(Pr);case 3:if(Wr.t0=Wr.sent,Wr.t0){Wr.next=6;break}Wr.t0={};case 6:Gr=Wr.t0,Tr(Gr==null?void 0:Gr.departments),Kr=ft||(Gr==null||((It=Gr.departments)===null||It===void 0||((Xt=It[0])===null||Xt===void 0))?void 0:Xt.name),Qt.setFieldsValue({department:Kr}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:Kr}));case 11:case"end":return Wr.stop()}},We)}));return function(qe,ft){return Xe.apply(this,arguments)}}(),ye=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,cn();case 2:Qt.setFieldsValue({school:qe,department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:""}));case 4:case"end":return kt.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),Pe=function(We){if(We.file.status==="uploading"){Lt(!0);return}if(We.file.status==="done"){var qe;console.log(We.file,We.file.response),Zt((qe=We.file.response)===null||qe===void 0?void 0:qe.id),Object(Bt.C)(We.file.originFileObj,function(ft){Or(ft),Lt(!1)})}},we=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){var ft,kt,It,Xt,Pr,Gr,Kr,Qr,Wr,en,tn,pn,on,kn,ln,Mr;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(Pr=qe||{},Gr=Pr.school,Kr=Pr.department,Qr=Pr.identity,Wr=Pr.studentNo,en=Pr.jobTitle,tn=Pr.manager,pr){nn.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),nn.abrupt("return");case 4:return pn=(ft=yr.find(function(dn){return dn.name===Gr}))===null||ft===void 0?void 0:ft.id,on=(kt=lr.find(function(dn){return dn.name===Kr}))===null||kt===void 0?void 0:kt.id,Qr==="student"?kn=Wr:Qr==="teacher"?kn=en:kn=tn,nn.next=9,ct({type:"account/applyProfessionalAuth",payload:{id:((It=Dt.basicInfo)===null||It===void 0?void 0:It.id)||((Xt=Mt.userInfo)===null||Xt===void 0?void 0:Xt.login),school_id:pn,department_id:on,identity:Qr,extra:kn,attachment_ids:[br]}});case 9:ln=nn.sent,je(),ln&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ct({type:"account/getBasicInfo",payload:{login:(Mr=Mt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return nn.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),je=function(){ct({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Pe,beforeUpload:function(We){var qe=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return qe||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),qe}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(l.a,{spinning:!!zt},t.a.createElement(yt.a,{className:St.a.formWrap,form:Qt,layout:"horizontal",onValuesChange:Ye,onFinish:we},t.a.createElement(H.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(_r,{value:"student"},"\u5B66\u751F"),t.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),or.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),or.identity==="teacher"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),or.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(yt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:or.school&&!(yr!=null&&yr.find(function(Xe){return Xe.name===or.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",or.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ie},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(mn.a,{showSearch:!0,options:xt==null?void 0:xt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:or.department&&!(lr!=null&&lr.find(function(Xe){return Xe.name===or.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},or.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(or.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(mn.a,{showSearch:!0,onChange:function(We){return Lr(lr.filter(function(qe){return qe.name.includes(We)}))},options:ir==null?void 0:ir.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Gt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(ai,Object(Le.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),pr?t.a.createElement("img",{src:pr,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Ht!=null&&(pt=Ht.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(jt,{visible:an,onClose:function(){return Ar(!1)},schoolName:or.school,onSuccess:ye}),t.a.createElement(xi,{visible:un,onClose:function(){return zr(!1)},schoolId:(_t=yr.find(function(Xe){return Xe.name===or.school}))===null||_t===void 0?void 0:_t.id,schoolName:or.school,departmentName:or.department,onSuccess:function(We){return Fe(or.school,We)}}))},Ai=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Oi),Ri=L("aCH8"),se=L.n(Ri);function W(Ct){var tt=Ct.type,pt=Ct.dispatch,_t=Ct.userid,Mt=Ct.isshow,Dt=Ct.setPhoneshow,Ht=Ct.setEmailshow,Wt="79e33abd4b6588941ab7622aed1e67e8",ct=Object(a.useState)(""),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(60),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr=Object(a.useState)(!1),er=Object(m.a)(yr,2),Et=er[0],wt=er[1],xt=Object(a.useState)(""),$t=Object(m.a)(xt,2),ur=$t[0],sr=$t[1];function lr(){return Tr.apply(this,arguments)}function Tr(){return Tr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Rt){Ft.next=3;break}return tt===3?f.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):f.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,pt({type:"competitions/getVerification",payload:{type:tt,login:Rt,smscode:se()(Wt+Rt)}});case 5:pr=Ft.sent,pr.status===1&&(f.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),Zr(),wt(!0));case 7:case"end":return Ft.stop()}},gr)})),Tr.apply(this,arguments)}function Zr(){Ir(60);var gr=setInterval(function(){--Dr,Dr>-1?Ir(Dr):(clearInterval(gr),wt(!1))},1e3)}function et(){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/PhoneBind",payload:{userid:_t,code:ur,phone:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Ft.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/EmailBind",payload:{userid:_t,code:ur,email:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",{style:{display:Mt}},t.a.createElement("p",null,t.a.createElement(U.a,{value:Rt,onChange:function(pr){return fr(pr.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:ur,onChange:function(pr){return sr(pr.target.value)},placeholder:tt===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(C.a,{disabled:Et,onClick:function(){return lr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(Dr,"s"):Kt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(C.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!ur){f.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}tt===3?et():Lr()}},"\u786E\u8BA4"),t.a.createElement(C.a,{style:{marginLeft:"20px"},onClick:function(){tt===3?Dt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=W;function ne(Ct){var tt=Ct.dispatch,pt=Ct.userid,_t={wrapperCol:{offset:3,span:21}},Mt=yt.a.useForm(),Dt=Object(m.a)(Mt,1),Ht=Dt[0],Wt=Object(S.i)(),ct=Wt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(yt.a,{form:Ht,name:"basic"},t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(i.a.mark(function Ot(){return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:Ht.validateFields().then(function(){var qt=Object(c.a)(i.a.mark(function Qt(Kt){var tr;return i.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,tt({type:"competitions/setleader",payload:Object(P.a)({identifier:ct,user_id:pt},Kt)});case 2:tr=ot.sent,tr.status===0&&f.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},Qt)}));return function(Qt){return qt.apply(this,arguments)}}());case 1:case"end":return fr.stop()}},Ot)}))},"\u63D0\u4EA4"))))}var ce=ne,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot=Ct.Prize,Rt=Ct.Accounts,fr=Ct.dispatch,qt=Ct.userid,Qt=Object(a.useState)("none"),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1],ot=Object(a.useState)("none"),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1];function er(wt){return Et.apply(this,arguments)}function Et(){return Et=Object(c.a)(i.a.mark(function wt(xt){var $t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(!(xt==="1")){sr.next=6;break}return sr.next=3,fr({type:"competitions/Authentication"});case 3:$t=sr.sent,sr.next=9;break;case 6:return sr.next=8,fr({type:"competitions/Professional"});case 8:$t=sr.sent;case 9:$t.status===0&&f.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return sr.stop()}},wt)})),Et.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Rt==null?void 0:Rt.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,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){fr({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,Rt==null?void 0:Rt.name),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.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"),(Rt==null?void 0:Rt.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,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){fr({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,Rt&&Rt.identity&&oe[Rt.identity]),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(C.a,{type:"primary",onClick:function(){fr({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,(Rt==null?void 0:Rt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.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"}},(Rt==null?void 0:Rt.phone)||"--"),tr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){or("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:tr,setPhoneshow:or,setEmailshow:yr}),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"}},(Rt==null?void 0:Rt.mail)||"--"),Ir==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){yr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:Ir,setEmailshow:yr,setPhoneshow:or})),Ot!=null&&Ot.leader&&Ot!==null&&Ot!==void 0&&Ot.teams&&Ot!==null&&Ot!==void 0&&(tt=Ot.teams[0])!==null&&tt!==void 0&&(pt=tt.bank_account)!==null&&pt!==void 0&&pt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(ce,{dispatch:fr,userid:qt})),Ot!=null&&Ot.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,(Ot==null?void 0:Ot.teams)&&(Ot==null||((_t=Ot.teams[0])===null||_t===void 0||((Mt=_t.bank_account)===null||Mt===void 0))?void 0:Mt.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,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Dt=Ot.teams[0])===null||Dt===void 0||((Ht=Dt.bank_account)===null||Ht===void 0))?void 0:Ht.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,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Wt=Ot.teams[0])===null||Wt===void 0||((ct=Wt.bank_account)===null||ct===void 0))?void 0:ct.card_no)||"--"))):null,t.a.createElement(Ai,{Scoid:Rt==null?void 0:Rt.school_id}),t.a.createElement(sn,null))}var At=Ke,Vt=ge.a.TabPane;function vr(Ct){var tt=Ct.Prize,pt=Ct.Accounts,_t=Ct.getAccounts,Mt=Ct.dispatch,Dt=Ct.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ge.a,{defaultActiveKey:"1",onChange:function(Wt){Wt==="2"&&_t()}},t.a.createElement(Vt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(Ae,{Prize:tt})),t.a.createElement(Vt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(At,{userid:Dt,dispatch:Mt,Prize:tt,Accounts:pt})))))}var Pt=vr,Br=L("xKgJ"),jr=L("wd/R"),fn=L.n(jr),ti=ge.a.TabPane;function mi(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.HeaderDetail,qt=Ct.getChartRules,Qt=Ct.userinfo,Kt=Ct.Editable,tr=Ct.dispatch,or=Ct.StaffDetail,ot=Object(a.useState)(!1),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1],er=Object(a.useState)(""),Et=Object(m.a)(er,2),wt=Et[0],xt=Et[1],$t=Object(a.useState)(!0),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)(),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(S.i)(),Ft=Or.identifier;Object(a.useEffect)(function(){if(sr){var vt,bt,zt,Lt,kr=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt[0];ir(kr);var rn=Wt==null||((bt=Wt.stages)===null||bt===void 0||((zt=bt[0])===null||zt===void 0||((Lt=zt.children)===null||Lt===void 0)))?void 0:Lt[0];if(pr(rn),kr!=null&&kr.id){var an,Ar,qr;Ot(kr==null?void 0:kr.id),xt(((an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(kr==null?void 0:kr.id)}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.content)||"")}else{var Nr,un,zr;Ot(0),xt(((Nr=Wt.rule_contents)===null||Nr===void 0||((un=Nr.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||un===void 0||((zr=un[0])===null||zr===void 0))?void 0:zr.content)||"")}}},[Wt]);function Jt(){return br.apply(this,arguments)}function br(){return br=Object(c.a)(i.a.mark(function vt(){var bt,zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(wt){zr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),zr.abrupt("return");case 3:if(lr(!1),bt=et==null?void 0:et.id,!bt){zr.next=12;break}return zr.next=8,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(bt)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.id,stage_id:et==null?void 0:et.id}});case 8:rn=zr.sent,rn.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt()),zr.next=16;break;case 12:return zr.next=14,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.id,stage_id:et==null?void 0:et.id}});case 14:Nr=zr.sent,Nr.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt());case 16:case"end":return zr.stop()}},vt)})),br.apply(this,arguments)}var Zt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,zt,Lt){return t.a.createElement("span",null,bt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(bt){return t.a.createElement(nt.a,{title:bt},t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=10?(bt==null?void 0:bt.substr(0,10))+"...":bt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(bt){return t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=6?(bt==null?void 0:bt.substr(0,6))+"...":bt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(bt){return t.a.createElement("span",null,bt===1?"\u8BA1\u7B97\u4E2D":bt===2?"\u5B8C\u6210":bt===0?"\u5F85\u8BA1\u7B97":bt===3&&"\u9519\u8BEF")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){return(bt==null?void 0:bt.length)>0?bt==null?void 0:bt.map(function(zt,Lt){return t.a.createElement("span",null,zt==null?void 0:zt.name,"\uFF1A",zt==null?void 0:zt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="fid"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="total_score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Coffee"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Easyship"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scar"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scarf"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.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(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Total"}))===null||zt===void 0)?void 0:zt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(bt){return t.a.createElement("a",{href:bt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(vt){return!!vt});return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:Qt!=null&&Qt.admin||Qt!=null&&Qt.business||Kt?t.a.createElement(C.a,{onClick:function(){yr(!0)}},"\u7F16\u8F91"):or.enrolled&&(et==null?void 0:et.start_time)&&(et==null?void 0:et.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",fn()(et==null?void 0:et.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",fn()(et==null?void 0:et.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(C.a,{style:{marginLeft:"20px"},disabled:fn()(et==null?void 0:et.start_time).unix()>fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()||fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()>fn()(et==null?void 0:et.end_time).unix(),onClick:function(){tr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(gr==null?void 0:gr.id)||(et==null?void 0:et.id),id:fr==null?void 0:fr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var zt,Lt,kr,rn,an;yr(!1);var Ar=Wt==null||((zt=Wt.stages)===null||zt===void 0)?void 0:zt.filter(function(Nr){return parseInt(bt)===parseInt(Nr==null?void 0:Nr.id)})[0],qr=Ar==null||((Lt=Ar.children)===null||Lt===void 0)?void 0:Lt[0];pr(qr),ir(Ar),xt(((kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(Nr){return parseInt(Nr.competition_stage_id)===parseInt(Ar==null?void 0:Ar.id)}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.content)||""),Ot((qr==null?void 0:qr.id)||bt)}},Wt&&Wt.stages.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id},Ir===!1&&Wt&&Wt.rule_contents.map(function(zt,Lt){if(vt.id===zt.competition_stage_id)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content});if(vt.id===null&&zt.competition_stage_id===0)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content})}))})),(et==null||((_t=et.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(gr==null?void 0:gr.id)+"",onChange:function(bt){var zt,Lt=et==null||((zt=et.children)===null||zt===void 0)?void 0:zt.filter(function(kr){return parseInt(bt)===parseInt(kr==null?void 0:kr.id)})[0];pr(Lt),Ot(bt)}},et==null||((Mt=et.children)===null||Mt===void 0)?void 0:Mt.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id})})),Ir&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:wt,onChange:function(bt){xt(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Jt()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return yr(!1)}},"\u53D6\u6D88"))),((Dt=fr.competition_modules.filter(function(vt){return vt.id===Rt}))===null||Dt===void 0||((Ht=Dt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.results,columns:Zt}))}var Rn=mi,Li=L("DjyN"),qi=L("NUBc"),Qn=ge.a.TabPane;function _i(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10,sort:"desc"}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1];Object(a.useEffect)(function(){var Lt;lr&&ct!==null&&ct!==void 0&&(Lt=ct.stages)!==null&&Lt!==void 0&&Lt[0]&&zt()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var zt=function(){var Lt=Object(c.a)(i.a.mark(function kr(){var rn,an,Ar,qr,Nr,un;return i.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Nr=ct==null||((rn=ct.stages)===null||rn===void 0)?void 0:rn[0],Lr(Nr),un=ct==null||((an=ct.stages)===null||an===void 0||((Ar=an[0])===null||Ar===void 0||((qr=Ar.children)===null||qr===void 0)))?void 0:qr[0],Or(un),vt.id=(un==null?void 0:un.id)||(Nr==null?void 0:Nr.id),bt(Object(P.a)({},vt)),cn.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return cn.stop()}},kr)}));return function(){return Lt.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar,qr,Nr,un,zr,cn;return i.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return er(!1),zr=ct==null||((an=ct.stages)===null||an===void 0)?void 0:an.filter(function(Ge){return parseInt(rn)===parseInt(Ge==null?void 0:Ge.id)})[0],cn=zr==null||((Ar=zr.children)===null||Ar===void 0)?void 0:Ar[0],Or(cn),Lr(zr),$t(((qr=ct.rule_contents)===null||qr===void 0||((Nr=qr.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(zr==null?void 0:zr.id)}))===null||Nr===void 0||((un=Nr[0])===null||un===void 0))?void 0:un.content)||""),vt.page=1,vt.limit=10,vt.id=(cn==null?void 0:cn.id)||rn,bt(Object(P.a)({},vt)),Ie.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return Ie.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ct&&ct.stages.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Ar=ir==null||((an=ir.children)===null||an===void 0)?void 0:an.filter(function(un){return parseInt(rn)===parseInt(un==null?void 0:un.id)})[0],Or(Ar),vt.page=1,vt.limit=10,vt.id=rn,bt(Object(P.a)({},vt)),Nr.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return Nr.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.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(){vt.page=1,vt.sort=vt.sort==="desc"?"asc":"desc",bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",vt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(vt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(kr){vt.page=1,vt.search=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Lt,kr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:kr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/"+(Lt==null?void 0:Lt.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"}},Lt==null?void 0:Lt.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"}},(Lt==null?void 0:Lt.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"}},(Lt==null?void 0:Lt.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",Lt==null?void 0:Lt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Lt==null?void 0:Lt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Lt==null?void 0:Lt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Lt==null?void 0:Lt.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(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(kr,rn){vt.page=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var vi=_i,Fi=function(tt){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],_t=["","\u5341","\u767E","\u5343","\u4E07"];tt=parseInt(tt);var Mt=function(ct){for(var Ot=ct.toString().split("").reverse(),Rt="",fr=0;fr<Ot.length;fr++)Rt=(fr==0&&Ot[fr]==0||fr>0&&Ot[fr]==0&&Ot[fr-1]==0?"":pt[Ot[fr]]+(Ot[fr]==0?_t[0]:_t[fr]))+Rt;return Rt},Dt=Math.floor(tt/1e4),Ht=tt%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Dt?Mt(Dt)+"\u4E07"+Mt(Ht):Mt(tt)};function gi(Ct){var tt,pt=Ct.item,_t=Ct.index,Mt=Ct.StaffDetail,Dt=Object(a.useState)(!0),Ht=Object(m.a)(Dt,2),Wt=Ht[0],ct=Ht[1],Ot=Object(a.useState)(!0),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.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:V.a.IMG_SERVER+"/"+(pt==null?void 0:pt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Fi(_t+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),t.a.createElement("div",{ref:Qt},t.a.createElement(B.a,{style:{maxHeight:Wt&&100},value:pt==null?void 0:pt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ct(!Wt)}},Wt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Wt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:fr&&58,overflow:"hidden"}},pt==null||((tt=pt.challenges)===null||tt===void 0)?void 0:tt.map(function(Kt,tr){return t.a.createElement("div",{style:{marginTop:tr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",tr+1,"\u5173",Kt==null?void 0:Kt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){qt(!fr)}},fr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(fr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Mt==null?void 0:Mt.enrolled)&&t.a.createElement(C.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Gi=gi,Mi=ge.a.TabPane;function oa(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1],zt=Object(a.useState)(),Lt=Object(m.a)(zt,2),kr=Lt[0],rn=Lt[1];Object(a.useEffect)(function(){var Ar;lr&&ct!==null&&ct!==void 0&&(Ar=ct.stages)!==null&&Ar!==void 0&&Ar[0]&&an()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var an=function(){var Ar=Object(c.a)(i.a.mark(function qr(){var Nr,un,zr,cn,$n,Ie;return i.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return $n=ct==null||((Nr=ct.stages)===null||Nr===void 0)?void 0:Nr[0],Lr($n),Ie=ct==null||((un=ct.stages)===null||un===void 0||((zr=un[0])===null||zr===void 0||((cn=zr.children)===null||cn===void 0)))?void 0:cn[0],Or(Ie),vt.id=(Ie==null?void 0:Ie.id)||($n==null?void 0:$n.id),bt(Object(P.a)({},vt)),Ye.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return Ye.stop()}},qr)}));return function(){return Ar.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr,cn,$n,Ie,Ge,Ye;return i.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return er(!1),Ge=ct==null||((un=ct.stages)===null||un===void 0)?void 0:un.filter(function(Pe){return parseInt(Nr)===parseInt(Pe==null?void 0:Pe.id)})[0],Ye=Ge==null||((zr=Ge.children)===null||zr===void 0)?void 0:zr[0],Or(Ye),Lr(Ge),$t(((cn=ct.rule_contents)===null||cn===void 0||(($n=cn.filter(function(Pe){return parseInt(Pe.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||$n===void 0||((Ie=$n[0])===null||Ie===void 0))?void 0:Ie.content)||""),vt.page=1,vt.limit=10,vt.id=(Ye==null?void 0:Ye.id)||Nr,bt(Object(P.a)({},vt)),ye.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return ye.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ct&&ct.stages.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr;return i.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return zr=ir==null||((un=ir.children)===null||un===void 0)?void 0:un.filter(function(Ie){return parseInt(Nr)===parseInt(Ie==null?void 0:Ie.id)})[0],Or(zr),vt.page=1,vt.limit=10,vt.id=Nr,bt(Object(P.a)({},vt)),$n.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return $n.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.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}},Ot==null?void 0:Ot.start_time,"~",Ot==null?void 0:Ot.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(Ot==null?void 0:Ot.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Ar,qr){return t.a.createElement(Gi,{StaffDetail:ot,item:Ar,index:qr})})),t.a.createElement(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(qr,Nr){vt.page=qr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var sa=oa,Ii=L("UfjD"),Xn=L("qHvr"),Vi=function(tt){var pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt=tt.globalSetting,fr=tt.loading,qt=tt.dispatch,Qt=tt.user,Kt=Object(_.a)(tt,["globalSetting","loading","dispatch","user"]),tr=Object(a.useState)({avatar_url:""}),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)([]),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(S.i)(),xt=wt.identifier,$t=Object(a.useState)([]),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(!0),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)([]),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(a.useState)([]),Ft=Object(m.a)(Or,2),Jt=Ft[0],br=Ft[1],Zt=Object(a.useState)(!1),vt=Object(m.a)(Zt,2),bt=vt[0],zt=vt[1],Lt=Object(a.useState)(!1),kr=Object(m.a)(Lt,2),rn=kr[0],an=kr[1],Ar=Object(a.useState)(!1),qr=Object(m.a)(Ar,2),Nr=qr[0],un=qr[1],zr=Object(a.useState)([]),cn=Object(m.a)(zr,2),$n=cn[0],Ie=cn[1],Ge=Object(a.useState)([]),Ye=Object(m.a)(Ge,2),Fe=Ye[0],ye=Ye[1],Pe=Object(a.useState)([]),we=Object(m.a)(Pe,2),je=we[0],ze=we[1],Xe=Object(a.useState)(!1),We=Object(m.a)(Xe,2),qe=We[0],ft=We[1],kt=Object(a.useState)([]),It=Object(m.a)(kt,2),Xt=It[0],Pr=It[1],Gr=Object(a.useState)(),Kr=Object(m.a)(Gr,2),Qr=Kr[0],Wr=Kr[1],en=Object(a.useState)(!0),tn=Object(m.a)(en,2),pn=tn[0],on=tn[1],kn=Object(a.useState)(!1),ln=Object(m.a)(kn,2),Mr=ln[0],Fr=ln[1],nn=Object(a.useState)(!1),dn=Object(m.a)(nn,2),wr=dn[0],bn=dn[1],Wn=Object(a.useState)(!1),wn=Object(m.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(a.useState)(!1),ri=Object(m.a)(Yn,2),Hn=ri[0],di=ri[1],Xi=Object(a.useState)(!1),wi=Object(m.a)(Xi,2),ni=wi[0],In=wi[1],Nn=Object(a.useState)(!0),zn=Object(m.a)(Nn,2),Bn=zn[0],Zn=zn[1],Di=Object(S.h)(),ra=Object(a.useRef)(null);Object(a.useEffect)(function(){xt&&An(),Object(Bt.V)("\u7ADE\u8D5B")},[xt]);function An(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(c.a)(i.a.mark(function xr(){var Cr;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.t0=Et,En.next=3,qt({type:"competitions/getStaff",payload:{identifier:xt}});case 3:return En.t1=En.sent,(0,En.t0)(En.t1),En.next=7,qt({type:"competitions/getHeader",payload:{identifier:xt}});case 7:Cr=En.sent,Dr(Cr),Object(Bt.V)((Cr==null?void 0:Cr.name)||"\u7ADE\u8D5B");case 10:case"end":return En.stop()}},xr)})),Ui.apply(this,arguments)}Object(a.useEffect)(function(){var xr;Wr(parseInt(Di==null||((xr=Di.query)===null||xr===void 0)?void 0:xr.type)===1)},[Di]),Object(a.useEffect)(function(){var xr;if((ot==null||((xr=ot.competition_modules)===null||xr===void 0)?void 0:xr.length)>0){var Cr,ar;if((Di==null||((Cr=Di.query)===null||Cr===void 0)?void 0:Cr.active)==="\u8D5B\u9898\u53D1\u5E03"){var En,dr=ot==null||((En=ot.competition_modules)===null||En===void 0)?void 0:En.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(dr){Bi(dr);return}}Bi(ot==null||((ar=ot.competition_modules)===null||ar===void 0)?void 0:ar[0])}},[ot]);function Bi(xr){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(ze(Cr.id),je=Cr.id,pr(Cr),!(Cr.module_type==="entrance")){dr.next=9;break}return dr.next=6,qt({type:"competitions/getItem",payload:{url:Cr.module_url,module_type:"entrance"}});case 6:ar=dr.sent,dr.next=12;break;case 9:return dr.next=11,qt({type:"competitions/getItem",payload:{url:Cr.module_url}});case 11:ar=dr.sent;case 12:zt(!1),un(!1),ft(!1),lr(ar),Fr(!1),bn(!1),br(Cr.module_type),Cr.module_type==="chart"?(zt(!0),ir(!1),Ba()):Cr.module_type==="certificate"?(un(!0),zt(!1),ir(!1),ba()):Cr.module_type==="md_tab"?(ft(!0),ir(!1),localStorage.setItem("issee","2"),zt(!1),un(!1),ca()):Cr.module_type==="md_shixun"?(Fr(!0),ir(!1),ca()):Cr.module_type==="entrance"?(bn(!0),ir(!1),ca()):(ir(!0),localStorage.setItem("issee","1"));case 20:case"end":return dr.stop()}},xr)})),Pn.apply(this,arguments)}function On(xr,Cr,ar){return qn.apply(this,arguments)}function qn(){return qn=Object(c.a)(i.a.mark(function xr(Cr,ar,En){var dr,pa;return i.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Cr.stopPropagation(),Object(he.e)(qt)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(Qt!=null&&(dr=Qt.userInfo)!==null&&dr!==void 0&&dr.authentication))){jn.next=6;break}return qt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(Bt.Q)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(En==="ismodel")){jn.next=23;break}if(!(ar.member_of_course===!0)){jn.next=14;break}Object(Bt.Q)("/classrooms/".concat(ar.course_id)),jn.next=21;break;case 14:if(ar.invite_code){jn.next=17;break}return f.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"),jn.abrupt("return");case 17:return jn.next=19,qt({type:"competitions/addApplytojoincourse",payload:{invite_code:ar.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(Bt.Q)("/classrooms/".concat(ar.course_id));case 21:jn.next=27;break;case 23:if(!(er.enrolled===!0)){jn.next=26;break}return Object(Bt.Q)(En),jn.abrupt("return");case 26:Tn(!0);case 27:case"end":return jn.stop()}},xr)})),qn.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=an,ar.next=3,qt({type:"competitions/ChartRules",payload:{identifier:xt}});case 3:return ar.t1=ar.sent,ar.next=6,(0,ar.t0)(ar.t1);case 6:case"end":return ar.stop()}},xr)})),wa.apply(this,arguments)}function la(xr){return ua.apply(this,arguments)}function ua(){return ua=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Charts",payload:{identifier:xt,stage_id:Cr}});case 2:ar=dr.sent,lr(ar);case 4:case"end":return dr.stop()}},xr)})),ua.apply(this,arguments)}function Pa(xr){return Ca.apply(this,arguments)}function Ca(){return Ca=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Ca.apply(this,arguments)}function La(xr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id,module_type:"entrance"},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Wa.apply(this,arguments)}function Xa(xr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Results",payload:{identifier:xt,stage_id:Cr}});case 2:if(ar=dr.sent,!(localStorage.getItem("issee")==="1")){dr.next=5;break}return dr.abrupt("return");case 5:lr(ar);case 6:case"end":return dr.stop()}},xr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=Pr,ar.next=3,qt({type:"competitions/TabResults",payload:{identifier:xt,competition_module_id:je}});case 3:ar.t1=ar.sent,(0,ar.t0)(ar.t1);case 5:case"end":return ar.stop()}},xr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Prize",payload:{identifier:xt,user_id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,Ie(ar);case 4:case"end":return dr.stop()}},xr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Accounts",payload:{id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,ye(ar);case 4:case"end":return dr.stop()}},xr)})),Ea.apply(this,arguments)}function Ta(xr){return ha.apply(this,arguments)}function ha(){return ha=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(Zn(!1),!fa()){dr.next=5;break}return dr.abrupt("return");case 5:return dr.next=7,qt({type:"competitions/AddTeam",payload:{identifier:xt,name:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),di(!1)):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),ha.apply(this,arguments)}function fa(){var xr,Cr;if(Qt!=null&&(xr=Qt.userInfo)!==null&&xr!==void 0&&xr.is_teacher){var ar;if(er!=null&&(ar=er.teacher_staff)!==null&&ar!==void 0&&ar.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}else{var En;if(er!=null&&(En=er.member_staff)!==null&&En!==void 0&&En.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}if(er!=null&&er.enroll_ended)return f.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Zn(!0),!0;if(Qt!=null&&(Cr=Qt.userInfo)!==null&&Cr!==void 0&&Cr.is_teacher){if(!er.teacher_staff)return f.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Zn(!0),!0}else if(!(er!=null&&er.member_staff))return f.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Zn(!0),!0}function $i(xr){return na.apply(this,arguments)}function na(){return na=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(!fa()){dr.next=4;break}return dr.abrupt("return");case 4:return Zn(!1),dr.next=7,qt({type:"competitions/JoinTeam",payload:{identifier:xt,invite_code:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),In(!1),Zn(!0),An()):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),na.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(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,ot.name,ot.sub_title?"-"+ot.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(l.a,{spinning:fr.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(ot==null?void 0:ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.a.IMG_SERVER+"/"+(ot==null?void 0:ot.avatar_url)}),!(ot!=null&&ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.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)},ot.name,ot.sub_title?"-"+ot.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"),ot!=null&&ot.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(ot&&ot.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(ot&&ot.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(ot&&ot.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"),ot.start_time,"~",ot.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),ot.enroll_end_time),ot.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,ot.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,ot.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"}},(ot==null?void 0:ot.mode)<=2&&er.enrolled&&t.a.createElement(C.a,{onClick:function(Cr){if((ot==null?void 0:ot.mode)===1){var ar;Bi((ar=ot.competition_modules)===null||ar===void 0?void 0:ar.find(function(En){return En.module_type==="entrance"}))}else On(Cr,ot,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(ot==null?void 0:ot.mode)===2||(ot==null?void 0:ot.mode)===1&&((pt=ot.competition_modules)===null||pt===void 0||((_t=pt.filter(function(xr){return xr.module_type==="entrance"}))===null||_t===void 0)?void 0:_t.length)>0?"":"none"},className:O.a.buttonsize},(ot==null?void 0:ot.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(ot==null?void 0:ot.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),ot.competition_status==="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(C.a,{type:"primary",disabled:er.enrolled&&!ot.need_attachment,className:O.a.buttonsize,onClick:function(Cr){if(er.enrolled&&ot.need_attachment){var ar;(ar=ra.current)===null||ar===void 0||ar.handleVisible();return}On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},er.enrolled?ot.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":ot!=null&&ot.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Qt.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Cr){return On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:O.a.myteam},Object(Br.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(u.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(xr,Cr){if(xr.module_type!="enroll")return t.a.createElement(u.a.Item,{className:O.a.menuItem,onClick:function(){if(xr!=null&&xr.is_authentication){if(!Object(he.e)(qt))return;f.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Bi(xr)},key:xr.id},xr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Mr||wr)&&0}},Nr?t.a.createElement(Pt,{dispatch:qt,userid:Qt==null||((Mt=Qt.userInfo)===null||Mt===void 0)?void 0:Mt.user_id,Prize:$n,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Me,{HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Dt=ot.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:rn,ItemData:sr}):null,et?t.a.createElement(q,{ref:ra,StaffDetail:er,HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Ht=ot.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:sr,setIssee:ir,ModelType:Jt,dispatch:qt}):null,!et&&!Mr&&!wr&&!bt&&!Nr&&!qe?t.a.createElement(J,{userinfo:Qt.userInfo,ModelType:Jt,getrightdatas:Bi,dispatch:qt,MenuItem:gr,setIssee:ir,identifier:xt,ItemData:sr}):null,qe&&t.a.createElement(Rn,{dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Wt=ot.permission)===null||Wt===void 0)?void 0:Wt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),Mr&&t.a.createElement(vi,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((ct=ot.permission)===null||ct===void 0)?void 0:ct.editable,getCharts:Pa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),wr&&t.a.createElement(sa,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Ot=ot.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}))),t.a.createElement(b.a,null),t.a.createElement(G,{getResults:Xa}),t.a.createElement(T.a,{visible:Qr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Wr(!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(C.a,{type:"primary",onClick:function(){return Object(Bt.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Mn,onCancel:function(){Tn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(C.a,{type:"primary",style:{height:40},onClick:function(){In(!0),Tn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(C.a,{style:{height:40},onClick:function(){di(!0),Tn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ni?t.a.createElement(Ii.a,{isjoin:ni,setJoin:In,JoinTeams:$i}):null,Hn?t.a.createElement(Xn.a,{isAddmodle:Hn,setIsAdd:di,createTeam:Ta}):null)},ta=Z.default=Object(o.a)(function(Ct){var tt=Ct.loading,pt=Ct.globalSetting,_t=Ct.user;return{globalSetting:pt,loading:tt,user:_t}})(Vi)},GRuw:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("lPiR"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.algo,p=u.SHA256,C=u.SHA224=p.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var E=p._doFinalize.call(this);return E.sigBytes-=4,E}});d.SHA224=p._createHelper(C),d.HmacSHA224=p._createHmacHelper(C)}(),P.SHA224})},GfqC:function(j,Z,L){"use strict";var P=L("q1tI"),d=L.n(P),T=L("TSYQ"),D=L.n(T);function u(K,U){var B="cannot "+K.method+" "+K.action+" "+U.status+"'",V=new Error(B);return V.status=U.status,V.method=K.method,V.url=K.action,V}function p(K){var U=K.responseText||K.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function C(K){var U=new XMLHttpRequest;K.onProgress&&U.upload&&(U.upload.onprogress=function(he){he.total>0&&(he.percent=he.loaded/he.total*100),K.onProgress(he)});var B=new FormData;K.data&&Object.keys(K.data).forEach(function(ae){var he=K.data[ae];if(Array.isArray(he)){he.forEach(function(pe){B.append(ae+"[]",pe)});return}B.append(ae,K.data[ae])}),K.file instanceof Blob?B.append(K.filename,K.file,K.file.name):B.append(K.filename,K.file),U.onerror=function(he){K.onError(he)},U.onload=function(){return U.status<200||U.status>=300?K.onError(u(K,U),p(U)):K.onSuccess(p(U),U)},U.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var V=K.headers||{};return V["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(V).forEach(function(ae){V[ae]!==null&&U.setRequestHeader(ae,V[ae])}),U.send(B),{abort:function(){U.abort()}}}var E=+new Date,l=0;function s(){return"rc-upload-"+E+"-"+ ++l}function n(K,U){return K.indexOf(U,K.length-U.length)!==-1}var h=function(K,U){if(K&&U){var B=Array.isArray(U)?U:U.split(","),V=K.name||"",ae=K.type||"",he=ae.replace(/\/.*$/,"");return B.some(function(pe){var Re=pe.trim();return Re.charAt(0)==="."?n(V.toLowerCase(),Re.toLowerCase()):/\/\*$/.test(Re)?he===Re.replace(/\/.*$/,""):ae===Re})}return!0};function f(K,U){var B=K.createReader(),V=[];function ae(){B.readEntries(function(he){var pe=Array.prototype.slice.apply(he);V=V.concat(pe);var Re=!pe.length;Re?U(V):ae()})}ae()}var c=function(U,B,V){var ae=function he(pe,Re){Re=Re||"",pe.isFile?pe.file(function(ke){V(ke)&&(pe.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=pe.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),B([ke]))}):pe.isDirectory&&f(pe,function(ke){ke.forEach(function(ve){he(ve,""+Re+pe.name+"/")})})};U.forEach(function(he){ae(he.webkitGetAsEntry())})},m=c,_=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var V in B)Object.prototype.hasOwnProperty.call(B,V)&&(K[V]=B[V])}return K},y=function(){function K(U,B){var V=[],ae=!0,he=!1,pe=void 0;try{for(var Re=U[Symbol.iterator](),ke;!(ae=(ke=Re.next()).done)&&!(V.push(ke.value),B&&V.length===B);ae=!0);}catch(ve){he=!0,pe=ve}finally{try{!ae&&Re.return&&Re.return()}finally{if(he)throw pe}}return V}return function(U,B){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return K(U,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function K(U,B){for(var V=0;V<B.length;V++){var ae=B[V];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(U,ae.key,ae)}}return function(U,B,V){return B&&K(U.prototype,B),V&&K(U,V),U}}();function a(K,U,B){return U in K?Object.defineProperty(K,U,{value:B,enumerable:!0,configurable:!0,writable:!0}):K[U]=B,K}function t(K,U){var B={};for(var V in K){if(U.indexOf(V)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,V))continue;B[V]=K[V]}return B}function S(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function x(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function o(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}var k=function(U){return Object.keys(U).reduce(function(B,V){return(V.substr(0,5)==="data-"||V.substr(0,5)==="aria-"||V==="role")&&(B[V]=U[V]),B},{})},O=function(K){o(U,K);function U(){var B,V,ae,he;S(this,U);for(var pe=arguments.length,Re=Array(pe),ke=0;ke<pe;ke++)Re[ke]=arguments[ke];return he=(V=(ae=x(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(Re))),ae),ae.state={uid:s()},ae.reqs={},ae.onChange=function(ve){var Te=ve.target.files;ae.uploadFiles(Te),ae.reset()},ae.onClick=function(ve){var Te=ae.fileInput;if(!Te)return;var be=ae.props,ue=be.children,le=be.onClick;ue&&ue.type==="button"&&(Te.parentNode.focus(),Te.parentNode.querySelector("button").blur()),Te.click(),le&&le(ve)},ae.onKeyDown=function(ve){ve.key==="Enter"&&ae.onClick()},ae.onFileDrop=function(ve){var Te=ae.props.multiple;if(ve.preventDefault(),ve.type==="dragover")return;if(ae.props.directory)m(Array.prototype.slice.call(ve.dataTransfer.items),ae.uploadFiles,function(ue){return h(ue,ae.props.accept)});else{var be=Array.prototype.slice.call(ve.dataTransfer.files).filter(function(ue){return h(ue,ae.props.accept)});Te===!1&&(be=be.slice(0,1)),ae.uploadFiles(be)}},ae.uploadFiles=function(ve){var Te=Array.prototype.slice.call(ve);Te.map(function(be){return be.uid=s(),be}).forEach(function(be){ae.upload(be,Te)})},ae.saveFileInput=function(ve){ae.fileInput=ve},V),x(ae,he)}return i(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(V,ae){var he=this,pe=this.props;if(!pe.beforeUpload)return setTimeout(function(){return he.post(V)},0);var Re=pe.beforeUpload(V,ae);Re&&Re.then?Re.then(function(ke){var ve=Object.prototype.toString.call(ke);return ve==="[object File]"||ve==="[object Blob]"?he.post(ke):he.post(V)}).catch(function(ke){console.log(ke)}):Re!==!1&&setTimeout(function(){return he.post(V)},0);return}},{key:"post",value:function(V){var ae=this;if(!this._isMounted)return;var he=this.props,pe=he.onStart,Re=he.onProgress,ke=he.transformFile,ve=ke===void 0?function(Te){return Te}:ke;new Promise(function(Te){var be=he.action;return typeof be=="function"&&(be=be(V)),Te(be)}).then(function(Te){var be=V.uid,ue=he.customRequest||C,le=Promise.resolve(ve(V)).then(function(re){var fe=he.data;return typeof fe=="function"&&(fe=fe(re)),Promise.all([re,fe])}).catch(function(re){console.error(re)});le.then(function(re){var fe=y(re,2),q=fe[0],ee=fe[1],Ce={action:Te,filename:he.name,data:ee,file:q,headers:he.headers,withCredentials:he.withCredentials,method:he.method||"post",onProgress:Re?function(te){Re(te,V)}:null,onSuccess:function(J,X){delete ae.reqs[be],he.onSuccess(J,V,X)},onError:function(J,X){delete ae.reqs[be],he.onError(J,X,V)}};pe(V),ae.reqs[be]=ue(Ce)})})}},{key:"reset",value:function(){this.setState({uid:s()})}},{key:"abort",value:function(V){var ae=this.reqs;if(V){var he=V;V&&V.uid&&(he=V.uid),ae[he]&&ae[he].abort&&ae[he].abort(),delete ae[he]}else Object.keys(ae).forEach(function(pe){ae[pe]&&ae[pe].abort&&ae[pe].abort(),delete ae[pe]})}},{key:"render",value:function(){var V,ae=this.props,he=ae.component,pe=ae.prefixCls,Re=ae.className,ke=ae.disabled,ve=ae.id,Te=ae.style,be=ae.multiple,ue=ae.accept,le=ae.children,re=ae.directory,fe=ae.openFileDialogOnClick,q=ae.onMouseEnter,ee=ae.onMouseLeave,Ce=t(ae,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),te=D()((V={},a(V,pe,!0),a(V,pe+"-disabled",ke),a(V,Re,Re),V)),J=ke?{}:{onClick:fe?this.onClick:function(){},onKeyDown:fe?this.onKeyDown:function(){},onMouseEnter:q,onMouseLeave:ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return d.a.createElement(he,_({},J,{className:te,role:"button",style:Te}),d.a.createElement("input",_({},k(Ce),{id:ve,type:"file",ref:this.saveFileInput,onClick:function(Q){return Q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ue,directory:re?"directory":null,webkitdirectory:re?"webkitdirectory":null,multiple:be,onChange:this.onChange})),le)}}]),U}(P.Component),b=O,v=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var V in B)Object.prototype.hasOwnProperty.call(B,V)&&(K[V]=B[V])}return K},g=function(){function K(U,B){for(var V=0;V<B.length;V++){var ae=B[V];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(U,ae.key,ae)}}return function(U,B,V){return B&&K(U.prototype,B),V&&K(U,V),U}}();function w(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function M(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function N(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}function I(){}var G=function(K){N(U,K);function U(){var B,V,ae,he;w(this,U);for(var pe=arguments.length,Re=Array(pe),ke=0;ke<pe;ke++)Re[ke]=arguments[ke];return he=(V=(ae=M(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(Re))),ae),ae.saveUploader=function(ve){ae.uploader=ve},V),M(ae,he)}return g(U,[{key:"abort",value:function(V){this.uploader.abort(V)}},{key:"render",value:function(){return d.a.createElement(b,v({},this.props,{ref:this.saveUploader}))}}]),U}(P.Component);G.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 z=G,H=Z.a=z},HmJG:function(j,Z,L){},IBYe:function(j,Z,L){"use strict";function P(d){return null}Z.a=P},Ib8C:function(j,Z,L){(function(P){(function(d,T){j.exports=Z=T()})(this,function(){var d=d||function(T,D){var u;if(typeof window!="undefined"&&window.crypto&&(u=window.crypto),typeof self!="undefined"&&self.crypto&&(u=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window!="undefined"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof P!="undefined"&&P.crypto&&(u=P.crypto),!u&&!0)try{u=L(4)}catch(a){}var p=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch(a){}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch(a){}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||function(){function a(){}return function(t){var S;return a.prototype=t,S=new a,a.prototype=null,S}}(),E={},l=E.lib={},s=l.Base=function(){return{extend:function(a){var t=C(this);return a&&t.mixIn(a),(!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 a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var t in a)a.hasOwnProperty(t)&&(this[t]=a[t]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=l.WordArray=s.extend({init:function(a,t){a=this.words=a||[],t!=D?this.sigBytes=t:this.sigBytes=a.length*4},toString:function(a){return(a||f).stringify(this)},concat:function(a){var t=this.words,S=a.words,x=this.sigBytes,o=a.sigBytes;if(this.clamp(),x%4)for(var k=0;k<o;k++){var O=S[k>>>2]>>>24-k%4*8&255;t[x+k>>>2]|=O<<24-(x+k)%4*8}else for(var b=0;b<o;b+=4)t[x+b>>>2]=S[b>>>2];return this.sigBytes+=o,this},clamp:function(){var a=this.words,t=this.sigBytes;a[t>>>2]&=4294967295<<32-t%4*8,a.length=T.ceil(t/4)},clone:function(){var a=s.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var t=[],S=0;S<a;S+=4)t.push(p());return new n.init(t,a)}}),h=E.enc={},f=h.Hex={stringify:function(a){for(var t=a.words,S=a.sigBytes,x=[],o=0;o<S;o++){var k=t[o>>>2]>>>24-o%4*8&255;x.push((k>>>4).toString(16)),x.push((k&15).toString(16))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x<t;x+=2)S[x>>>3]|=parseInt(a.substr(x,2),16)<<24-x%8*4;return new n.init(S,t/2)}},c=h.Latin1={stringify:function(a){for(var t=a.words,S=a.sigBytes,x=[],o=0;o<S;o++){var k=t[o>>>2]>>>24-o%4*8&255;x.push(String.fromCharCode(k))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x<t;x++)S[x>>>2]|=(a.charCodeAt(x)&255)<<24-x%4*8;return new n.init(S,t)}},m=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},_=l.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=m.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var t,S=this._data,x=S.words,o=S.sigBytes,k=this.blockSize,O=k*4,b=o/O;a?b=T.ceil(b):b=T.max((b|0)-this._minBufferSize,0);var v=b*k,g=T.min(v*4,o);if(v){for(var w=0;w<v;w+=k)this._doProcessBlock(x,w);t=x.splice(0,v),S.sigBytes-=g}return new n.init(t,g)},clone:function(){var a=s.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),y=l.Hasher=_.extend({cfg:s.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(a){return function(t,S){return new a.init(S).finalize(t)}},_createHmacHelper:function(a){return function(t,S){return new i.HMAC.init(a,S).finalize(t)}}}),i=E.algo={};return E}(Math);return d})}).call(this,L("IyRk"))},K3mO:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Base,u=T.WordArray,p=d.algo,C=p.MD5,E=p.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:C,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,s){for(var n,h=this.cfg,f=h.hasher.create(),c=u.create(),m=c.words,_=h.keySize,y=h.iterations;m.length<_;){n&&f.update(n),n=f.update(l).finalize(s),f.reset();for(var i=1;i<y;i++)n=f.finalize(n),f.reset();c.concat(n)}return c.sigBytes=_*4,c}});d.EvpKDF=function(l,s,n){return E.create(n).compute(l,s)}}(),P.EvpKDF})},KXlV:function(j,Z,L){j.exports=L.p+"static/job.65c6034f.png"},KeDT:function(j,Z,L){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,Z,L){"use strict";L.d(Z,"a",function(){return o}),L.d(Z,"c",function(){return O});var P=L("0Owb"),d=L("miYZ"),T=L("tsqr"),D=L("oBTY"),u=L("tJVT"),p=L("PpiC"),C=L("k1fw"),E=L("9og8"),l=L("DZo9"),s=L("8z0m"),n=L("WmNS"),h=L.n(n),f=L("q1tI"),c=L.n(f),m=L("ErOA"),_=L("NFKh"),y=L.n(_),i=L("7Cbv"),a=L("9kvl"),t=L("mxV5"),S=L.n(t),x=s.a.Dragger,o=function(g){var w="bf3c199c2470cb477d907b1e0917c17b",M="5183666c72eec9e4",N=y.a.enc.Utf8.parse(w),I=y.a.enc.Utf8.parse(M),G=y.a.AES.decrypt(g,N,{iv:I,mode:y.a.mode.CBC});return G.toString(y.a.enc.Utf8)},k,O=function(){var v=Object(E.a)(h.a.mark(function g(w,M,N){var I,G,z,H,K,U,B,V,ae;return h.a.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return M.file_name=w.name,pe.next=3,Object(m.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return B=pe.sent,console.log("decrypt(res.data):",o(B.data)),B.data=JSON.parse(o(B.data)),V=Object(i.a)(),ae=new S.a({endpoint:B==null||((I=B.data)===null||I===void 0)?void 0:I.end_point,region:B==null||((G=B.data)===null||G===void 0)?void 0:G.region,accessKeyId:B==null||((z=B.data)===null||z===void 0)?void 0:z.access_key_id,accessKeySecret:B==null||((H=B.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:B==null||((K=B.data)===null||K===void 0)?void 0:K.bucket,stsToken:B==null||((U=B.data)===null||U===void 0)?void 0:U.security_token}),pe.abrupt("return",new Promise(function(Re,ke){var ve;ae.multipartUpload("".concat(V),new Blob([w],{type:w.type}),Object(C.a)(Object(C.a)({timeout:200*1e3,partSize:102400},N),{},{callback:{url:B==null||((ve=B.data)===null||ve===void 0)?void 0:ve.callback_url,host:B==null?void 0:B.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(M)}})).then(function(Te){var be;w.response=(be=Te.data)===null||be===void 0?void 0:be.data,Re(Te==null?void 0:Te.data)}).catch(function(Te){ke(Te),console.log("err:",Te)})}));case 9:case"end":return pe.stop()}},g)}));return function(w,M,N){return v.apply(this,arguments)}}(),b=function(g){var w=g.user,M=g.cancelUpload,N=Object(p.a)(g,["user","cancelUpload"]),I=Object(f.useState)([]),G=Object(u.a)(I,2),z=G[0],H=G[1],K=Object(f.useState)(),U=Object(u.a)(K,2),B=U[0],V=U[1],ae={onRemove:function(Re){H(Object(D.a)(z.filter(function(ke){return ke.name!==Re.name}))),N.onChange(z.filter(function(ke){return ke.name!==Re.name}))},disabled:N.disabled,multiple:!0,fileList:z==null?void 0:z.map(function(pe){return pe.file}),customRequest:function(){},beforeUpload:function(){var pe=Object(E.a)(h.a.mark(function ke(ve){var Te;return h.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(Te=N.maxSize||1024*1024*1024*1,!z.filter(function(le){return le.name===ve.name}).length){ue.next=4;break}return T.b.info("".concat(ve.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ue.abrupt("return");case 4:if(!((ve==null?void 0:ve.size)>Te)){ue.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Te/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return z.push({name:ve.name,file:ve}),H(Object(D.a)(z)),N.onChange(z),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},ke)}));function Re(ke){return pe.apply(this,arguments)}return Re}()},he=function(){var pe=Object(E.a)(h.a.mark(function Re(ke,ve){var Te,be,ue,le,re,fe,q,ee,Ce;return h.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return ve.file_name=ke.name,q=ke.name,J.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ee=J.sent,ee.data=JSON.parse(o(ee.data)),!((ee==null?void 0:ee.status)!==0)){J.next=12;break}return z[z.findIndex(function(X){return X.name===q})].status="error",z[z.findIndex(function(X){return X.name===q})].file.status="error",N.onChange(z),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return B=new S.a({endpoint:ee==null||((Te=ee.data)===null||Te===void 0)?void 0:Te.end_point,region:ee==null||((be=ee.data)===null||be===void 0)?void 0:be.region,accessKeyId:ee==null||((ue=ee.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:ee==null||((le=ee.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:ee==null||((re=ee.data)===null||re===void 0)?void 0:re.bucket,stsToken:ee==null||((fe=ee.data)===null||fe===void 0)?void 0:fe.security_token}),console.log(ke,"file"),V(B),Ce=Object(i.a)(),J.abrupt("return",new Promise(function(X,Q){try{var Ee;B.multipartUpload("".concat(N.identifier,"/").concat(Ce).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([ke.file],{type:ke.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Oe,Qe,rt){try{console.log("\u8FDB\u5EA6",Oe,Qe,rt);var nt=z.findIndex(function(ut){return ut.name===q});z[nt].file.percent=Oe*100,z[nt].tempCheckpoint=Qe,H(Object(D.a)(z))}catch(ut){}},checkpoint:z[z.findIndex(function(ge){return ge.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ee==null||((Ee=ee.data)===null||Ee===void 0)?void 0:Ee.callback_url,host:ee==null?void 0:ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(ve)}}).then(function(ge){var Oe,Qe=z.findIndex(function(mt){return mt.name===q}),rt="done";if(((Oe=ge.data)===null||Oe===void 0?void 0:Oe.status)===0){var nt;ke.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var ut=z.findIndex(function(mt){return mt.name===q});z[ut].status="done",z[ut].file.status="done"}else{var dt;T.b.warn((dt=ge.data)===null||dt===void 0?void 0:dt.message),rt="error"}z[Qe].status=rt,z[Qe].file.status=rt,N.onChange(z),X(ge==null?void 0:ge.data)}).catch(function(ge){z[z.findIndex(function(Oe){return Oe.name===q})].status="error",z[z.findIndex(function(Oe){return Oe.name===q})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(D.a)(z)),N.onChange(z),Q(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return J.stop()}},Re)}));return function(ke,ve){return pe.apply(this,arguments)}}();return Object(f.useEffect)(function(){z.every(function(pe){return pe==="done"||pe==="error"})&&N.onComplete(z)},[z]),Object(f.useEffect)(function(){if(M){var pe;(pe=B)===null||pe===void 0||pe.cancel()}},[M]),Object(f.useEffect)(function(){N.uploading&&z.map(function(){var pe=Object(E.a)(h.a.mark(function Re(ke){var ve,Te;return h.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!ke.status||ke.status==="error")&&!M)){ue.next=6;break}return ke.status="uploading",ke.file.status="uploading",ue.next=5,he(ke,{login:w==null||((ve=w.userInfo)===null||ve===void 0)?void 0:ve.login,container_type:N.container_type,container_id:N.container_id,description:N.description});case 5:Te=ue.sent;case 6:case"end":return ue.stop()}},Re)}));return function(Re){return pe.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(x,Object(P.a)({},ae,{height:N.height,className:N.className}),c.a.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(a.a)(function(v){var g=v.loading,w=v.globalSetting,M=v.user;return{globalSetting:w,loading:g.models.competitions,user:M}})(b)},KmYQ:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(d,T){var D=T*4;d.clamp(),d.sigBytes+=D-(d.sigBytes%D||D)},unpad:function(d){for(var T=d.words,D=d.sigBytes-1,D=d.sigBytes-1;D>=0;D--)if(T[D>>>2]>>>24-D%4*8&255){d.sigBytes=D+1;break}}},P.pad.ZeroPadding})},LdHM:function(j,Z,L){"use strict";L.d(Z,"b",function(){return t}),L.d(Z,"a",function(){return x});var P=L("1OyB"),d=L("vuIU"),T=L("Ji7U"),D=L("LK+K"),u=L("q1tI"),p=L("rePB"),C=L("Ff2n"),E=L("ODXe"),l=L("4IlW"),s=L("bX4T"),n=L("YrtM"),h=L("TSYQ"),f=L.n(h),c=L("+nKL"),m=L("8OUc"),_=function(V,ae){var he=V.prefixCls,pe=V.id,Re=V.flattenOptions,ke=V.childrenAsData,ve=V.values,Te=V.searchValue,be=V.multiple,ue=V.defaultActiveFirstOption,le=V.height,re=V.itemHeight,fe=V.notFoundContent,q=V.open,ee=V.menuItemSelectedIcon,Ce=V.virtual,te=V.onSelect,J=V.onToggleOpen,X=V.onActiveValue,Q=V.onScroll,Ee=V.onMouseEnter,ge="".concat(he,"-item"),Oe=Object(n.a)(function(){return Re},[q,Re],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Qe=u.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Qe.current&&Qe.current.scrollTo({index:Ue})},ut=function(Ue){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=Oe.length,xe=0;xe<Ne;xe+=1){var Se=(Ue+xe*Me+Ne)%Ne,Ae=Oe[Se],Le=Ae.group,Je=Ae.data;if(!Le&&!Je.disabled)return Se}return-1},dt=u.useState(function(){return ut(0)}),mt=Object(E.a)(dt,2),He=mt[0],De=mt[1],at=function(Ue){De(Ue);var Me=Oe[Ue];if(!Me){X(null,-1);return}X(Me.data.value,Ue)};u.useEffect(function(){at(ue!==!1?ut(0):-1)},[Oe.length,Te]),u.useEffect(function(){var st=setTimeout(function(){if(!be&&q&&ve.size===1){var Ue=Array.from(ve)[0],Me=Oe.findIndex(function(Ne){var xe=Ne.data;return xe.value===Ue});at(Me),nt(Me)}});return function(){return clearTimeout(st)}},[q]);var ht=function(Ue){Ue!==void 0&&te(Ue,{selected:!ve.has(Ue)}),be||J(!1)};if(u.useImperativeHandle(ae,function(){return{onKeyDown:function(Ue){var Me=Ue.which;switch(Me){case l.a.UP:case l.a.DOWN:{var Ne=0;if(Me===l.a.UP?Ne=-1:Me===l.a.DOWN&&(Ne=1),Ne!==0){var xe=ut(He+Ne,Ne);nt(xe),at(xe)}break}case l.a.ENTER:{var Se=Oe[He];Se&&!Se.data.disabled?ht(Se.data.value):ht(void 0),q&&Ue.preventDefault();break}case l.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(Ue){nt(Ue)}}}),Oe.length===0)return u.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),className:"".concat(ge,"-empty"),onMouseDown:rt},fe);function Ze(st){var Ue=Oe[st];if(!Ue)return null;var Me=Ue.data||{},Ne=Me.value,xe=Me.label,Se=Me.children,Ae=Object(s.a)(Me,!0),Le=ke?Se:xe;return Ue?u.createElement("div",Object.assign({"aria-label":typeof Le=="string"?Le:null},Ae,{key:st,role:"option",id:"".concat(pe,"_list_").concat(st),"aria-selected":ve.has(Ne)}),Ne):null}return u.createElement(u.Fragment,null,u.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(He-1),Ze(He),Ze(He+1)),u.createElement(c.a,{itemKey:"key",ref:Qe,data:Oe,height:le,itemHeight:re,fullHeight:!1,onMouseDown:rt,onScroll:Q,virtual:Ce,onMouseEnter:Ee},function(st,Ue){var Me,Ne=st.group,xe=st.groupOption,Se=st.data,Ae=Se.label,Le=Se.key;if(Ne)return u.createElement("div",{className:f()(ge,"".concat(ge,"-group"))},Ae!==void 0?Ae:Le);var Je=Se.disabled,Ve=Se.value,gt=Se.title,yt=Se.children,Bt=Se.style,Nt=Se.className,mr=Object(C.a)(Se,["disabled","value","title","children","style","className"]),hr=ve.has(Ve),St="".concat(ge,"-option"),$r=f()(ge,St,Nt,(Me={},Object(p.a)(Me,"".concat(St,"-grouped"),xe),Object(p.a)(Me,"".concat(St,"-active"),He===Ue&&!Je),Object(p.a)(Me,"".concat(St,"-disabled"),Je),Object(p.a)(Me,"".concat(St,"-selected"),hr),Me)),Xr=ke?yt:Ae,Ur=!ee||typeof ee=="function"||hr;return u.createElement("div",Object.assign({},mr,{"aria-selected":hr,className:$r,title:gt,onMouseMove:function(){if(He===Ue||Je)return;at(Ue)},onClick:function(){Je||ht(Ve)},style:Bt}),u.createElement("div",{className:"".concat(St,"-content")},Xr||Ve),u.isValidElement(ee)||hr,Ur&&u.createElement(m.a,{className:"".concat(ge,"-option-state"),customizeIcon:ee,customizeIconProps:{isSelected:hr}},hr?"\u2713":null))}))},y=u.forwardRef(_);y.displayName="OptionList";var i=y,a=function(){return null};a.isSelectOption=!0;var t=a,S=function(){return null};S.isSelectOptGroup=!0;var x=S,o=L("VTBJ"),k=L("Zm9Q");function O(B){var V=B.key,ae=B.props,he=ae.children,pe=ae.value,Re=Object(C.a)(ae,["children","value"]);return Object(o.a)({key:V,value:pe!==void 0?pe:V,children:he},Re)}function b(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(B).map(function(ae,he){if(!u.isValidElement(ae)||!ae.type)return null;var pe=ae.type.isSelectOptGroup,Re=ae.key,ke=ae.props,ve=ke.children,Te=Object(C.a)(ke,["children"]);return V||!pe?O(ae):Object(o.a)(Object(o.a)({key:"__RC_SELECT_GRP__".concat(Re===null?he:Re,"__"),label:Re},Te),{},{options:b(ve)})}).filter(function(ae){return ae})}var v=L("2Qr1"),g=L("qNPg"),w=L("U8pU"),M=L("Kwbf"),N=L("WKfj");function I(B){var V=B.mode,ae=B.options,he=B.children,pe=B.backfill,Re=B.allowClear,ke=B.placeholder,ve=B.getInputElement,Te=B.showSearch,be=B.onSearch,ue=B.defaultOpen,le=B.autoFocus,re=B.labelInValue,fe=B.value,q=B.inputValue,ee=B.optionLabelProp,Ce=V==="multiple"||V==="tags",te=Te!==void 0?Te:Ce||V==="combobox",J=ae||b(he);if(Object(M.a)(V!=="tags"||J.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var X=J.some(function(ge){return ge.options?ge.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(M.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(V!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(V==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(M.a)(V==="combobox"||!ve,"`getInputElement` only work with `combobox` mode."),Object(M.b)(V!=="combobox"||!ve||!Re||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!te&&V!=="combobox"&&V!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Q=Object(N.d)(fe);Object(M.a)(!re||Q.every(function(ge){return Object(w.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Ce||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Ee=null;Object(k.a)(he).some(function(ge){if(!u.isValidElement(ge)||!ge.type)return!1;var Oe=ge.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Qe=Object(k.a)(ge.props.children).every(function(rt){return!u.isValidElement(rt)||!ge.type||rt.type.isSelectOption?!0:(Ee=rt.type,!1)});return!Qe}return Ee=Oe,!0}),Ee&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(M.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=I,z=Object(g.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:b,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:G,fillOptionsWithMissingValue:v.a}),H=function(B){Object(T.a)(ae,B);var V=Object(D.a)(ae);function ae(){var he;return Object(P.a)(this,ae),he=V.apply(this,arguments),he.selectRef=u.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(d.a)(ae,[{key:"render",value:function(){return u.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ae}(u.Component);H.Option=t,H.OptGroup=x;var K=H,U=Z.c=K},M8RZ:function(j,Z,L){"use strict";L.d(Z,"a",function(){return l});var P=L("fWQN"),d=L("mtLc"),T=L("yKVA"),D=L("879j"),u=L("q1tI"),p=L.n(u),C=L("i8i4"),E=L.n(C),l=function(s){Object(T.a)(h,s);var n=Object(D.a)(h);function h(f){var c;Object(P.a)(this,h),c=n.call(this,f);var m=window.document;return c.node=m.createElement("div"),m.body.appendChild(c.node),c}return Object(d.a)(h,[{key:"render",value:function(){var c=this.props.children;return Object(C.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(p.a.Component)},MlIO:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=T.x64={},E=C.Word=u.extend({init:function(s,n){this.high=s,this.low=n}}),l=C.WordArray=u.extend({init:function(s,n){s=this.words=s||[],n!=d?this.sigBytes=n:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,n=s.length,h=[],f=0;f<n;f++){var c=s[f];h.push(c.high),h.push(c.low)}return p.create(h,this.sigBytes)},clone:function(){for(var s=u.clone.call(this),n=s.words=this.words.slice(0),h=n.length,f=0;f<h;f++)n[f]=n[f].clone();return s}})}(),P})},NFKh:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"),L("F+F2"),L("qM6L"),L("ETIr"),L("wbyO"),L("cv67"),L("3y9D"),L("lPiR"),L("GRuw"),L("1uat"),L("uGsb"),L("5hvy"),L("ELcG"),L("WYAk"),L("e7zE"),L("K3mO"),L("OLod"),L("ALsQ"),L("9OqN"),L("qu8F"),L("S6kV"),L("gb/T"),L("qBft"),L("oRuE"),L("jO9C"),L("KmYQ"),L("uGxW"),L("bQjk"),L("wZgz"),L("pA7S"),L("w7YG"),L("E4JC"),L("PVpz"))})(this,function(P){return P})},NLgs:function(j,Z,L){"use strict";L.d(Z,"e",function(){return S}),L.d(Z,"f",function(){return x}),L.d(Z,"d",function(){return k}),L.d(Z,"c",function(){return O}),L.d(Z,"a",function(){return b}),L.d(Z,"b",function(){return v});var P=L("miYZ"),d=L("tsqr"),T=L("9og8"),D=L("2qtc"),u=L("kLXV"),p=L("WmNS"),C=L.n(p),E=L("q1tI"),l=L.n(E),s=L("9kvl"),n=L("xKgJ"),h=L("1vsH"),f=L("RCxd"),c=L("mOS8"),m=L.n(c),_=L("1ZF9"),y=L.n(_),i=L("WdTA"),a=L.n(i),t=L("m3rI"),S=function(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(w)&&o(M))},x=function(w){return Object(n.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},o=function(){var w,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=Object(s.c)()._store.getState(),I=N.user;return(w=I.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(u.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\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(){s.d.push("/account/profile/edit")}}),!1)},k=function(){var w,M=Object(s.c)()._store.getState(),N=M.user;return(w=N.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(u.a.confirm({title:"\u63D0\u793A",centered:!0,content:l.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(h.Q)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(u.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),l.a.createElement("img",{src:Object(n.t)()?a.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},b=function(w,M){return w?!0:(u.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("p",null,M||"\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"),l.a.createElement("div",{style:{marginLeft:"110px"}},l.a.createElement("img",{src:y.a,width:200}),l.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(h.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},v=function(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=Object(s.c)()._store.getState(),I=N.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(u.a.info({centered:!0,icon:l.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),l.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),l.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(u.a.confirm({centered:!0,icon:l.a.createElement(f.a,null),title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){u.a.confirm({width:440,centered:!0,icon:l.a.createElement(f.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 z=Object(T.a)(C.a.mark(function K(){var U;return C.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:U=V.sent,U.status!==401&&(d.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return V.stop()}},K)}));function H(){return z.apply(this,arguments)}return H}()})}}),!0):!1}},NnUe:function(j,Z,L){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,Z,L){"use strict";L.d(Z,"a",function(){return p});var P=L("Kwbf");function d(C,E){var l=new Set;return C.forEach(function(s){E.has(s)||l.add(s)}),l}function T(C){var E=C||{},l=E.disabled,s=E.disableCheckbox,n=E.checkable;return!!(l||s)||n===!1}function D(C,E,l,s){for(var n=new Set(C),h=new Set,f=0;f<=l;f+=1){var c=E.get(f)||new Set;c.forEach(function(i){var a=i.key,t=i.node,S=i.children,x=S===void 0?[]:S;n.has(a)&&!s(t)&&x.filter(function(o){return!s(o.node)}).forEach(function(o){n.add(o.key)})})}for(var m=new Set,_=l;_>=0;_-=1){var y=E.get(_)||new Set;y.forEach(function(i){var a=i.parent,t=i.node;if(s(t)||!i.parent||m.has(i.parent.key))return;if(s(i.parent.node)){m.add(a.key);return}var S=!0,x=!1;(a.children||[]).filter(function(o){return!s(o.node)}).forEach(function(o){var k=o.key,O=n.has(k);S&&!O&&(S=!1),!x&&(O||h.has(k))&&(x=!0)}),S&&n.add(a.key),x&&h.add(a.key),m.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(d(h,n))}}function u(C,E,l,s,n){for(var h=new Set(C),f=new Set(E),c=0;c<=s;c+=1){var m=l.get(c)||new Set;m.forEach(function(a){var t=a.key,S=a.node,x=a.children,o=x===void 0?[]:x;!h.has(t)&&!f.has(t)&&!n(S)&&o.filter(function(k){return!n(k.node)}).forEach(function(k){h.delete(k.key)})})}f=new Set;for(var _=new Set,y=s;y>=0;y-=1){var i=l.get(y)||new Set;i.forEach(function(a){var t=a.parent,S=a.node;if(n(S)||!a.parent||_.has(a.parent.key))return;if(n(a.parent.node)){_.add(t.key);return}var x=!0,o=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,b=h.has(O);x&&!b&&(x=!1),!o&&(b||f.has(O))&&(o=!0)}),x||h.delete(t.key),o&&f.add(t.key),_.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(d(f,h))}}function p(C,E,l,s){var n=[],h;s?h=s:h=T;var f=new Set(C.filter(function(y){var i=!!l[y];return i||n.push(y),i})),c=new Map,m=0;Object.keys(l).forEach(function(y){var i=l[y],a=i.level,t=c.get(a);t||(t=new Set,c.set(a,t)),t.add(i),m=Math.max(m,a)}),Object(P.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(y){return"'".concat(y,"'")}).join(", ")));var _;return E===!0?_=D(f,c,m,h):_=u(f,E.halfCheckedKeys,c,m,h),_}},OLod:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("K3mO"))})(this,function(P){P.lib.Cipher||function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=D.BufferedBlockAlgorithm,E=T.enc,l=E.Utf8,s=E.Base64,n=T.algo,h=n.EvpKDF,f=D.Cipher=C.extend({cfg:u.extend(),createEncryptor:function(g,w){return this.create(this._ENC_XFORM_MODE,g,w)},createDecryptor:function(g,w){return this.create(this._DEC_XFORM_MODE,g,w)},init:function(g,w,M){this.cfg=this.cfg.extend(M),this._xformMode=g,this._key=w,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(g){return this._append(g),this._process()},finalize:function(g){g&&this._append(g);var w=this._doFinalize();return w},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function g(w){return typeof w=="string"?v:k}return function(w){return{encrypt:function(M,N,I){return g(N).encrypt(w,M,N,I)},decrypt:function(M,N,I){return g(N).decrypt(w,M,N,I)}}}}()}),c=D.StreamCipher=f.extend({_doFinalize:function(){var g=this._process(!0);return g},blockSize:1}),m=T.mode={},_=D.BlockCipherMode=u.extend({createEncryptor:function(g,w){return this.Encryptor.create(g,w)},createDecryptor:function(g,w){return this.Decryptor.create(g,w)},init:function(g,w){this._cipher=g,this._iv=w}}),y=m.CBC=function(){var g=_.extend();g.Encryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize;w.call(this,M,N,G),I.encryptBlock(M,N),this._prevBlock=M.slice(N,N+G)}}),g.Decryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize,z=M.slice(N,N+G);I.decryptBlock(M,N),w.call(this,M,N,G),this._prevBlock=z}});function w(M,N,I){var G,z=this._iv;z?(G=z,this._iv=d):G=this._prevBlock;for(var H=0;H<I;H++)M[N+H]^=G[H]}return g}(),i=T.pad={},a=i.Pkcs7={pad:function(g,w){for(var M=w*4,N=M-g.sigBytes%M,I=N<<24|N<<16|N<<8|N,G=[],z=0;z<N;z+=4)G.push(I);var H=p.create(G,N);g.concat(H)},unpad:function(g){var w=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=w}},t=D.BlockCipher=f.extend({cfg:f.cfg.extend({mode:y,padding:a}),reset:function(){var g;f.reset.call(this);var w=this.cfg,M=w.iv,N=w.mode;this._xformMode==this._ENC_XFORM_MODE?g=N.createEncryptor:(g=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==g?this._mode.init(this,M&&M.words):(this._mode=g.call(N,this,M&&M.words),this._mode.__creator=g)},_doProcessBlock:function(g,w){this._mode.processBlock(g,w)},_doFinalize:function(){var g,w=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(w.pad(this._data,this.blockSize),g=this._process(!0)):(g=this._process(!0),w.unpad(g)),g},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(g){this.mixIn(g)},toString:function(g){return(g||this.formatter).stringify(this)}}),x=T.format={},o=x.OpenSSL={stringify:function(g){var w,M=g.ciphertext,N=g.salt;return N?w=p.create([1398893684,1701076831]).concat(N).concat(M):w=M,w.toString(s)},parse:function(g){var w,M=s.parse(g),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(w=p.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:w})}},k=D.SerializableCipher=u.extend({cfg:u.extend({format:o}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=g.createEncryptor(M,N),G=I.finalize(w),z=I.cfg;return S.create({ciphertext:G,key:M,iv:z.iv,algorithm:g,mode:z.mode,padding:z.padding,blockSize:g.blockSize,formatter:N.format})},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=g.createDecryptor(M,N).finalize(w.ciphertext);return I},_parse:function(g,w){return typeof g=="string"?w.parse(g,this):g}}),O=T.kdf={},b=O.OpenSSL={execute:function(g,w,M,N){N||(N=p.random(64/8));var I=h.create({keySize:w+M}).compute(g,N),G=p.create(I.words.slice(w),M*4);return I.sigBytes=w*4,S.create({key:I,iv:G,salt:N})}},v=D.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:b}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=N.kdf.execute(M,g.keySize,g.ivSize);N.iv=I.iv;var G=k.encrypt.call(this,g,w,I.key,N);return G.mixIn(I),G},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=N.kdf.execute(M,g.keySize,g.ivSize,w.salt);N.iv=I.iv;var G=k.decrypt.call(this,g,w,I.key,N);return G}})}()})},OZM5:function(j,Z,L){"use strict";L.d(Z,"b",function(){return s}),L.d(Z,"a",function(){return n}),L.d(Z,"k",function(){return h}),L.d(Z,"h",function(){return f}),L.d(Z,"i",function(){return c}),L.d(Z,"g",function(){return m}),L.d(Z,"c",function(){return _}),L.d(Z,"d",function(){return y}),L.d(Z,"j",function(){return t}),L.d(Z,"e",function(){return S}),L.d(Z,"f",function(){return x});var P=L("KQm4"),d=L("U8pU"),T=L("Ff2n"),D=L("q1tI"),u=L.n(D),p=L("Kwbf"),C=L("WaYH"),E=.25,l=2;function s(o,k){var O=o.slice(),b=O.indexOf(k);return b>=0&&O.splice(b,1),O}function n(o,k){var O=o.slice();return O.indexOf(k)===-1&&O.push(k),O}function h(o){return o.split("-")}function f(o,k){return"".concat(o,"-").concat(k)}function c(o){return o&&o.type&&o.type.isTreeNode}function m(o,k){var O=[o],b=k[o];function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(w){var M=w.key,N=w.children;O.push(M),v(N)})}return v(b.children),O}function _(o,k){var O=o.clientY,b=k.selectHandle.getBoundingClientRect(),v=b.top,g=b.bottom,w=b.height,M=Math.max(w*E,l);return O<=v+M?-1:O>=g-M?1:0}function y(o,k){if(!o)return;var O=k.multiple;return O?o.slice():o.length?[o[0]]:o}var i=function(k){return k};function a(o,k){if(!o)return[];var O=k||{},b=O.processProps,v=b===void 0?i:b,g=Array.isArray(o)?o:[o];return g.map(function(w){var M=w.children,N=Object(T.a)(w,["children"]),I=a(M,k);return u.a.createElement(C.a,Object.assign({},v(N)),I)})}function t(o){if(!o)return null;var k;if(Array.isArray(o))k={checkedKeys:o,halfCheckedKeys:void 0};else if(Object(d.a)(o)==="object")k={checkedKeys:o.checked||void 0,halfCheckedKeys:o.halfChecked||void 0};else return Object(p.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function S(o,k){var O=new Set;function b(v){if(O.has(v))return;var g=k[v];if(!g)return;O.add(v);var w=g.parent,M=g.node;if(M.disabled)return;w&&b(w.key)}return(o||[]).forEach(function(v){b(v)}),Object(P.a)(O)}function x(o){var k={};return Object.keys(o).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=o[O])}),k}},Ot1p:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("rAM+"),D=L("miYZ"),u=L("tsqr"),p=L("9og8"),C=L("tJVT"),E=L("jrin"),l=L("WmNS"),s=L.n(l),n=L("q1tI"),h=L.n(n),f=L("VrN/"),c=L.n(f),m=L("bdgK"),_=L("p77/"),y=L("Bd2K"),i=L("ELLl"),a=L("19Vz"),t=L("lZu9"),S=L("+NIl"),x=L("kSUc"),o=L("9Bee"),k=function(Ve){var gt=Ve.value,yt=gt===void 0?"":gt,Bt=Ve.className,Nt=Ve.showTextOnly,mr=Ve.showLines,hr=Ve.style,St=hr===void 0?{}:hr,$r=Object(n.useMemo)(function(){return""},[yt]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:$r}}))},O=L("0Owb"),b=L("dejd"),v=L("C+DQ"),g=L("1vsH"),w=L("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function N(Ve){var gt=Ve.onActionCallback,yt=Ve.title,Bt=Ve.icon,Nt=Ve.actionName,mr=Ve.className,hr=mr===void 0?"":mr,St=Ve.children;function $r(){gt(Nt)}return h.a.createElement("a",{title:yt,className:hr,onClick:$r},h.a.createElement("i",{className:"md-iconfont ".concat(Bt)}),St)}var I=function(Ve){var gt=Ve.watch,yt=Ve.showNullButton,Bt=Ve.onActionCallback,Nt=Ve.fullScreen,mr=Ve.insertTemp,hr=Ve.hidetoolBar,St=Ve.uuid,$r=Ve.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.E)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var Xr=[].concat(M,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!hr&&Xr.map(function(Ur,sn){return h.a.createElement("li",{key:sn},Ur.actionName?h.a.createElement(N,Object(O.a)({},Ur,{onActionCallback:Bt})):h.a.createElement("span",{className:"v-line"}))}),yt?h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,mr&&h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(mr),onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(N,{icon:"".concat(Nt?"icon-shrink":"icon-enlarge"),title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Bt})))},G=L("M8RZ"),z=L("+L6B"),H=L("2/Rp"),K=L("y8nQ"),U=L("Vl3Y"),B=L("5NDa"),V=L("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},he=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,Object(O.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Bt}),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(V.a,null)),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(V.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},pe=L("7ahc"),Re=L("k1fw"),ke=L("HmJG"),ve=L("BjJ7"),Te=U.a.useForm,be={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},le=function(Ve){var gt=Ve.callback,yt=Ve.onCancel,Bt=Te(),Nt=Object(C.a)(Bt,1),mr=Nt[0],hr=Object(n.useRef)();function St(Ur){gt(Object(Re.a)(Object(Re.a)({},Ur),{},{name:hr.current}))}function $r(Ur,sn){mr.setFieldsValue({src:"/api/attachments/".concat(Ur.id,"?type=").concat(Ur.content_type),type:sn.type})}function Xr(Ur){var sn=Ur.target.files[0];hr.current=sn.name,fe(sn,$r)}return h.a.createElement(U.a,Object(O.a)({form:mr},ue,{className:"upload-image-panel",onFinish:St}),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},h.a.createElement(V.a,{style:be})),h.a.createElement(re,{onFileChange:Xr}))),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},h.a.createElement(V.a,{style:{width:264}})),h.a.createElement(U.a.Item,{style:{textAlign:"right"}},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))};function re(Ve){var gt=Ve.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:gt}))}function fe(Ve,gt){if(!Ve)throw new String("\u6CA1\u6709\u6587\u4EF6");var yt=new FormData;yt.append("editormd-image-file",Ve),yt.append("file_param_name","editormd-image-file"),yt.append("byxhr","true");var Bt=new window.XMLHttpRequest;Bt.withCredentials=!0,Bt.addEventListener("load",function(Nt){gt(JSON.parse(Nt.target.responseText),Ve)},!1),Bt.addEventListener("error",function(Nt){console.error(Nt)},!1),Bt.open("POST","".concat(ve.a,"/api/attachments.json")),Bt.send(yt)}var q=L("giR+"),ee=L("fyUT"),Ce=L("7Kak"),te=L("9yH6"),J=te.a.Group,X={margin:"0 8px"},Q=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Bt},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:X},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:X},"\u884C\u6570"),h.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(ee.a,null)),h.a.createElement("span",{style:X},"\u5217\u6570"),h.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(ee.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:X},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(U.a.Item,{name:"align"},h.a.createElement(J,null,h.a.createElement(te.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(te.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(te.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(te.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},Ee=L("ErOA"),ge=L("7Cbv"),Oe="link",Qe="upload-image",rt="code-block",nt="add-table",ut="------------",dt={default:ut,left:":".concat(ut),center:":".concat(ut,":"),right:"".concat(ut,":")},mt=L("9VGf"),He,De;function at(){}var ht=0,Ze=1e4,st="\u2581",Ue=`
**\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 Me(Ve){return/^\d+$/.test(Ve)?"".concat(Ve,"px"):Ve}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,xe=Ne?"Cmd":"Ctrl",Se=["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"],Ae=(He={},Object(E.a)(He,xe+"-B","bold"),Object(E.a)(He,xe+"-I","italic"),He),Le=(De={},Object(E.a)(De,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(E.a)(De,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(E.a)(De,Qe,"\u6DFB\u52A0\u6587\u4EF6"),Object(E.a)(De,nt,"\u6DFB\u52A0\u8868\u683C"),De),Je=Z.a=function(Ve){var gt=Ve.defaultValue,yt=gt===void 0?"":gt,Bt=Ve.onChange,Nt=Ve.width,mr=Nt===void 0?"100%":Nt,hr=Ve.height,St=hr===void 0?400:hr,$r=Ve.miniToolbar,Xr=$r===void 0?!1:$r,Ur=Ve.isFocus,sn=Ur===void 0?!1:Ur,Rr=Ve.watch,mn=Ve.insertTemp,vn=Ve.mode,Gt=vn===void 0?"markdown":vn,Cn=Ve.id,yn=Cn===void 0?"markdown-editor-id":Cn,Sn=Ve.showResizeBar,xn=Sn===void 0?!1:Sn,xi=Ve.noStorage,Ti=xi===void 0?!1:xi,hn=Ve.showNullButton,cr=hn===void 0?!1:hn,Gn=Ve.hidetoolBar,pi=Gn===void 0?!1:Gn,Vn=Ve.fullScreen,Yr=Vn===void 0?!1:Vn,Un=Ve.onBlur,ui=Ve.onCMBeforeChange,ci=Ve.onFullScreen,jt=Ve.className,_r=jt===void 0?"":jt,ai=Ve.disablePaste,Oi=ai===void 0?!1:ai,Ai=Ve.placeholder,Ri=Ai===void 0?"":Ai,se=Ve.values,W=se===void 0?"":se,$=Object(n.useState)(null),ne=Object(C.a)($,2),ce=ne[0],oe=ne[1],Ke=Object(n.useState)(yt),At=Object(C.a)(Ke,2),Vt=At[0],vr=At[1],Pt=Object(n.useState)(Rr),Br=Object(C.a)(Pt,2),jr=Br[0],fn=Br[1],ti=Object(n.useState)(Yr),mi=Object(C.a)(ti,2),Rn=mi[0],Li=mi[1],qi=Object(n.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(n.useState)(0),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=Object(n.useState)(St),sa=Object(C.a)(oa,2),Ii=sa[0],Xn=sa[1],Vi=Object(n.useState)(!1),ta=Object(C.a)(Vi,2),Ct=ta[0],tt=ta[1],pt=Object(n.useRef)(Object(ge.a)()),_t=Object(n.useRef)(!1),Mt=Object(n.useRef)(),Dt=Object(n.useRef)(),Ht=Object(n.useRef)(),Wt=Object(n.useRef)(),ct=Object(n.useRef)(),Ot=function(){var Et=Object(p.a)(s.a.mark(function wt(){var xt,$t;return s.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Object(Ee.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:pt.current}});case 2:$t=sr.sent,$t!=null&&(xt=$t.attachments)!==null&&xt!==void 0&&xt.length&&(console.log("cm:",ce,Dt),$t.attachments.map(function(lr){lr.content_type.indexOf("image")>-1?ce.replaceSelection("![,](/api/attachments/".concat(lr.id,"?type=").concat(lr.content_type,")")):lr.content_type.indexOf("video")>-1?ce.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):lr.content_type.indexOf("pdf")>-1?ce.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(lr.id,"?type=").concat(lr.content_type,'&disposition=inline" target="_blank">').concat(lr.name,"</a>")):ce.replaceSelection("[".concat(lr.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(lr.id,"?type=").concat(lr.content_type,")"))}));case 4:case"end":return sr.stop()}},wt)}));return function(){return Et.apply(this,arguments)}}();Object(n.useEffect)(function(){vr(W),ce==null||ce.setValue(W)},[W]),Object(n.useEffect)(function(){ci==null||ci(Rn)},[Rn]),Object(n.useEffect)(function(){if(Dt.current){var Et=c.a.fromTextArea(Dt.current,{mode:Gt,lineNumbers:!Xr,lineWrapping:!0,value:yt,autoCloseTags:!0,autoCloseBrackets:!0});sn&&Et.focus();function wt(xt,$t){if(Oi){$t.preventDefault();return}var ur=$t.clipboardData;if(ur){var sr=ur.types.toString(),lr=ur.items;if(sr==="Files"||ur.types.indexOf("Files")>-1){if($t.preventDefault(),Gt=="stex")return;try{var Tr,Zr=lr[1];((Tr=lr[0])===null||Tr===void 0?void 0:Tr.kind)==="file"&&(Zr=lr[0]);var et=Zr.getAsFile(),ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Lr.id,"?type=").concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,'"></video>')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(et.type,'&disposition=inline" target="_blank">').concat(et.name,"</a>")):Se.includes(ir)?Et.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,'?type=office&disposition=inline" target="_blank">').concat(et.name,"</a>")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})}catch(Lr){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",wt),Et.on("dragleave",function(xt,$t){Ht.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(xt,$t){Ht.current.classList.add("mouse-hover-md")}),Et.on("drop",function(xt,$t){Ht.current.classList.add("mouse-hover-md");var ur;if(ur=$t.dataTransfer.files,ur.length>0){$t.preventDefault(),$t.stopPropagation();for(var sr=function(Zr){var et=ur[Zr],ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(Lr.id,"?type=").concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,'"></video>')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(et.type,'&disposition=inline" target="_blank">').concat(et.name,"</a>")):Se.includes(ir)?Et.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,'?type=office&disposition=inline" target="_blank">').concat(et.name,"</a>")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})},lr=0;lr<ur.length;lr++)sr(lr)}}),oe(Et),function(){Et.off("paste",wt)}}},[]);var Rt=Object(n.useCallback)(function(){if(Ht.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[Ii,Ht,Rn]);Object(n.useEffect)(function(){function Et(){var xt=new m.default(function($t){var ur=Object(T.a)($t),sr;try{for(ur.s();!(sr=ur.n()).done;){var lr=sr.value;(lr.target.offsetHeight>0||lr.target.offsetWidth>0)&&(Rt(),ce.setSize("100%","100%"),ce.refresh())}}catch(Tr){ur.e(Tr)}finally{ur.f()}});return xt.observe(Dt.current.parentElement),xt}if(ce){var wt=Et();return function(){wt.unobserve(Dt.current.parentElement)}}},[ce,Rt]),Object(n.useEffect)(function(){if(ce){for(var Et=[],wt=function(){var lr=$t[xt];ur=Object(C.a)(lr,2);var Tr=ur[0],Zr=ur[1],et=Object(E.a)({},Tr,function(){fr(Zr)});Et.push(et),ce.addKeyMap(et)},xt=0,$t=Object.entries(Ae);xt<$t.length;xt++){var ur;wt()}return Mt.current=setInterval(function(){_t.current&&Ot()},4e3),function(){clearInterval(Mt.current);var sr=Object(T.a)(Et),lr;try{for(sr.s();!(lr=sr.n()).done;){var Tr=lr.value;ce.removeKeyMap(Tr)}}catch(Zr){sr.e(Zr)}finally{sr.f()}}}},[ce]),Object(n.useEffect)(function(){Yr!==Rn&&Li(Yr)},[Yr]),Object(mt.a)(function(){if(!Ti&&Gi>0){var Et=new Date().getTime(),wt=window.sessionStorage.getItem(yn);Et>=Gi+Ze&&(!wt||wt!==Vt)&&(window.sessionStorage.setItem(yn,Vt),tt(!0))}},Ze),Object(n.useEffect)(function(){fn(Rr)},[ce,Rr]),Object(n.useEffect)(function(){ce&&(sn&&ce.focus())},[ce,sn]),Object(n.useEffect)(function(){if(jr&&ce){var Et=ce.getScrollerElement();function wt(xt){var $t=xt.target;if(ct.current){var ur=$t.scrollTop/$t.scrollHeight;ct.current.scrollTop=ct.current.scrollHeight*ur}}return Et.addEventListener("scroll",wt),function(){Et.removeEventListener("scroll",wt)}}},[ce,jr]),Object(n.useEffect)(function(){if(ce&&ui){function Et(wt,xt){ui(wt,xt)}return ce.on("beforeChange",Et),function(){ce.off("beforeChange",Et)}}},[ce,ui]),Object(n.useEffect)(function(){if(ce&&Un){function Et(){Un(ce.getValue())}return ce.on("blur",Et),function(){ce.off("blur",Et)}}},[ce,Un]),Object(n.useEffect)(function(){if(ce){function Et(wt){var xt=wt.getValue();vr(xt),Mi(new Date().getTime()),wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Bt&&Bt(xt)}return ce.on("change",Et),function(){ce.off("change",Et)}}},[ce,Bt]),Object(n.useEffect)(function(){ce&&(yt==null?(ce.setValue(""),vr("")):yt!==ce.getValue()&&(ce.setValue(yt),vr(yt),ce.setCursor(ce.lineCount(),0)))},[ce,yt]);var fr=Object(n.useCallback)(function(Et){var wt=ce.getCursor(),xt=ce.getSelection(),$t=xt.split(`
`);switch(Et){case"bold":return ce.replaceSelection("**"+xt+"**"),xt===""&&ce.setCursor(wt.line,wt.ch+2),ce.focus();case"italic":return ce.replaceSelection("*"+xt+"*"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"code":return ce.replaceSelection("`"+xt+"`"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"inline-latex":return ce.replaceSelection("`$$"+xt+"$$`"),xt===""&&ce.setCursor(wt.line,wt.ch+3),ce.focus();case"latex":return ce.replaceSelection("```latex\n"+xt+"\n```"),ce.setCursor(wt.line+1,xt.length+1),ce.focus();case"line-break":return ce.replaceSelection(`<br/>
`),ce.focus();case"list-ul":return xt===""?ce.replaceSelection("- "+xt):ce.replaceSelection($t.map(function(ur){return ur===""?"":"- ".concat(ur)}).join(`
`)),ce.focus();case"list-ol":return xt===""?ce.replaceSelection("1. "+xt):ce.replaceSelection($t.map(function(ur,sr){return ur===""?"":"".concat(sr+1,". ").concat(ur)}).join(`
`)),ce.focus();case"add-null-ch":return xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.replaceSelection(st),ce.focus();case"inster-template-1":return xt===""&&ce.setCursor(wt.line,wt.ch),ce.replaceSelection(Ue),ce.focus();case"eraser":return ce.setValue(""),ce.focus();case"trigger-watch":return fn(!jr),ce.focus();case"trigger-full-screen":return Li(!Rn),ce.focus();case Oe:vi(Oe);return;case rt:vi(rt);return;case Qe:vi(Qe);return;case nt:vi(nt);return;default:throw new Error}},[ce,jr,Rn]),qt=Object(n.useCallback)(function(Et){vi("");switch(_i){case Oe:var wt=Et.title,xt=Et.link;return ce.replaceSelection("[".concat(wt,"](").concat(xt,")")),ce.focus();case rt:var $t=Et.language,ur=Et.content;return ce.replaceSelection(["```"+$t,ur,"```"].join(`
`)),ce.focus();case Qe:var sr=Et.src,lr=Et.alt,Tr=Et.name;return sr.indexOf("type=image")>-1?ce.replaceSelection("![ ".concat(lr||""," ]( ").concat(sr,' "').concat(lr||"",'" )')):sr.indexOf("type=application/pdf")>-1?ce.replaceSelection('<a href="'.concat(sr,'&disposition=inline" target="_blank">').concat(Tr,"</a>")):ce.replaceSelection('<a href="'.concat(sr,'" target="_blank">').concat(Tr,"</a>")),ce.focus();case nt:for(var Zr=Et.row,et=Et.col,ir=Et.align,Lr=`
`,Jr=0;Jr<Zr;Jr++){for(var gr=[],pr=[],Or=0;Or<et;Or++)Jr===1&&pr.push(dt[ir]),gr.push(" ");Jr===1&&(Lr+="| ".concat(pr.join(" | "),` |
`)),Lr+="| ".concat(gr.join(et===1?"":" | "),` |
`)}return ce.replaceSelection(Lr+`
`),ce.focus();default:throw new Error}},[ce,_i]),Qt=Object(n.useMemo)(function(){switch(_i){case Oe:return h.a.createElement(he,{callback:qt,onCancel:Kt});case rt:return h.a.createElement(pe.b,{callback:qt,onCancel:Kt});case Qe:return h.a.createElement(le,{callback:qt,onCancel:Kt});case nt:return h.a.createElement(Q,{callback:qt,onCancel:Kt});default:return null}},[_i]);function Kt(){vi("")}Object(n.useEffect)(function(){if(Wt.current){var Et=Wt.current,wt=!1,xt=0;function $t(lr){wt=!0,xt=lr.pageY}function ur(){wt=!1}function sr(lr){if(wt){var Tr=lr.pageY-xt;Tr<0&&(Tr=0),Tr>300&&(Tr=300);var Zr=St+Tr+"px";Xn(Zr)}}return Et.addEventListener("mousedown",$t),document.addEventListener("mousemove",sr),document.addEventListener("mouseup",ur),function(){Et.removeEventListener("mousedown",$t),document.removeEventListener("mousemove",sr),document.removeEventListener("mouseup",ur)}}},[ce,Wt]),Object(n.useEffect)(function(){Xn(St)},[St]);var tr=Me(mr),or=Me(Ii),ot={width:tr,height:or},Dr=Object(n.useMemo)(function(){if(Gi){var Et=new Date(Gi),wt=Et.getHours(),xt=Et.getMinutes(),$t=Et.getSeconds();return wt=wt<10?"0"+wt:wt,xt=xt<10?"0"+xt:xt,$t=$t<10?"0"+$t:$t,"".concat(wt,":").concat(xt,":").concat($t)}return 0},[Gi]);function Ir(){window.sessionStorage.removeItem(yn),tt(!1),Mi(0)}function yr(){tt(!1),Mi(0),ce.setValue(window.sessionStorage.getItem(yn))}function er(Et,wt){var xt=ce.getValue();xt=xt.replace(Et,wt),vr(xt),ce==null||ce.setValue(xt)}return h.a.createElement(n.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ht},h.a.createElement("div",{className:"markdown-editor-container ".concat(_r," ").concat(jr?"on-preview":""," ").concat(Xr?"mini":""," ").concat(Rn?"full-screen":""),style:ot},h.a.createElement(I,{insertTemp:mn,watch:jr,fullScreen:Rn,showNullButton:cr,onActionCallback:fr,hidetoolBar:pi,uuid:pt.current,setOpenPhones:function(){_t.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:Dt,placeholder:Ri})),jr?h.a.createElement("div",{ref:ct,className:"preview-container"},Gt==="stex"&&h.a.createElement(k,{value:Vt}),Gt!=="stex"&&h.a.createElement(o.a,{edit:!0,value:Vt,replaces:er})):null))),xn?h.a.createElement("a",{ref:Wt,className:"editor-resize"}):null,h.a.createElement(G.a,null,Le[_i]?h.a.createElement(d.a,{centered:!0,title:Le[_i],visible:!0,onCancel:Kt,footer:null},Qt):null))}},PVpz:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=[],C=[],E=[],l=u.RabbitLegacy=D.extend({_doReset:function(){var n=this._key.words,h=this.cfg.iv,f=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],c=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 m=0;m<4;m++)s.call(this);for(var m=0;m<8;m++)c[m]^=f[m+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;c[0]^=a,c[1]^=S,c[2]^=t,c[3]^=x,c[4]^=a,c[5]^=S,c[6]^=t,c[7]^=x;for(var m=0;m<4;m++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<C[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<C[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<C[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<C[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<C[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<C[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<C[6]>>>0?1:0)|0,this._b=h[7]>>>0<C[7]>>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.RabbitLegacy=D._createHelper(l)}(),P.RabbitLegacy})},RxwV:function(j,Z,L){"use strict";var P=L("q1tI"),d=L("uciX"),T=L("2W6z"),D=L.n(T),u=L("4IlW"),p=L("uK0f"),C=L.n(p);function E(Te,be){if(Te===be)return!0;if(!Te||!be)return!1;var ue=Te.length;if(be.length!==ue)return!1;for(var le=0;le<ue;le++)if(Te[le]!==be[le])return!1;return!0}function l(Te){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(ue){return typeof ue}:l=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},l(Te)}function s(Te,be){if(!(Te instanceof be))throw new TypeError("Cannot call a class as a function")}function n(Te,be){for(var ue=0;ue<be.length;ue++){var le=be[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Te,le.key,le)}}function h(Te,be,ue){return be&&n(Te.prototype,be),ue&&n(Te,ue),Te}function f(Te,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Te.prototype=Object.create(be&&be.prototype,{constructor:{value:Te,writable:!0,configurable:!0}}),be&&c(Te,be)}function c(Te,be){return c=Object.setPrototypeOf||function(le,re){return le.__proto__=re,le},c(Te,be)}function m(Te){var be=i();return function(){var ue=a(Te),le;if(be){var re=a(this).constructor;le=Reflect.construct(ue,arguments,re)}else le=ue.apply(this,arguments);return _(this,le)}}function _(Te,be){return be&&(l(be)==="object"||typeof be=="function")?be:y(Te)}function y(Te){if(Te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Te}function i(){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(Te){return!1}}function a(Te){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},a(Te)}var t=function(){var Te=function(be){f(le,be);var ue=m(le);function le(){var re;return s(this,le),re=ue.apply(this,arguments),re.menuItems={},re.saveMenuItem=function(fe){return function(q){re.menuItems[fe]=q}},re}return h(le,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(fe){!fe.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(fe){var q=this.props,ee=q.fieldNames,Ce=q.defaultFieldNames;return ee[fe]||Ce[fe]}},{key:"getOption",value:function(fe,q){var ee=this.props,Ce=ee.prefixCls,te=ee.expandTrigger,J=ee.expandIcon,X=ee.loadingIcon,Q=this.props.onSelect.bind(this,fe,q),Ee=this.props.onItemDoubleClick.bind(this,fe,q),ge={onClick:Q,onDoubleClick:Ee},Oe="".concat(Ce,"-menu-item"),Qe=null,rt=fe[this.getFieldName("children")]&&fe[this.getFieldName("children")].length>0;(rt||fe.isLeaf===!1)&&(Oe+=" ".concat(Ce,"-menu-item-expand"),fe.loading||(Qe=P.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},J))),te==="hover"&&(rt||fe.isLeaf===!1)&&(ge={onMouseEnter:this.delayOnSelect.bind(this,Q),onMouseLeave:this.delayOnSelect.bind(this),onClick:Q}),this.isActiveOption(fe,q)&&(Oe+=" ".concat(Ce,"-menu-item-active"),ge.ref=this.saveMenuItem(q)),fe.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var nt=null;fe.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),nt=X||null);var ut="";return"title"in fe?ut=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ut=fe[this.getFieldName("label")]),P.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Oe,title:ut},ge,{role:"menuitem",onMouseDown:function(mt){return mt.preventDefault()}}),fe[this.getFieldName("label")],Qe,nt)}},{key:"getActiveOptions",value:function(fe){var q=this,ee=this.props.options,Ce=fe||this.props.activeValue;return C()(ee,function(te,J){return te[q.getFieldName("value")]===Ce[J]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,q=this.props.options,ee=this.getActiveOptions().map(function(Ce){return Ce[fe.getFieldName("children")]}).filter(function(Ce){return!!Ce});return ee.unshift(q),ee}},{key:"delayOnSelect",value:function(fe){for(var q=this,ee=arguments.length,Ce=new Array(ee>1?ee-1:0),te=1;te<ee;te++)Ce[te-1]=arguments[te];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof fe=="function"&&(this.delayTimer=window.setTimeout(function(){fe(Ce),q.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var fe=this.getShowOptions().length,q=0;q<fe;q++){var ee=this.menuItems[q];ee&&ee.parentElement&&(ee.parentElement.scrollTop=ee.offsetTop)}}},{key:"isActiveOption",value:function(fe,q){var ee=this.props.activeValue,Ce=ee===void 0?[]:ee;return Ce[q]===fe[this.getFieldName("value")]}},{key:"render",value:function(){var fe=this,q=this.props,ee=q.prefixCls,Ce=q.dropdownMenuColumnStyle;return P.createElement("div",null,this.getShowOptions().map(function(te,J){return P.createElement("ul",{className:"".concat(ee,"-menu"),key:J,style:Ce},te.map(function(X){return fe.getOption(X,J)}))}))}}]),le}(P.Component);return Te.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Te}(),S=t,x={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}}},o=x;function k(Te){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(ue){return typeof ue}:k=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},k(Te)}function O(Te,be){if(Te==null)return{};var ue=b(Te,be),le,re;if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(Te);for(re=0;re<fe.length;re++){if(le=fe[re],be.indexOf(le)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Te,le))continue;ue[le]=Te[le]}}return ue}function b(Te,be){if(Te==null)return{};var ue={},le=Object.keys(Te),re,fe;for(fe=0;fe<le.length;fe++){if(re=le[fe],be.indexOf(re)>=0)continue;ue[re]=Te[re]}return ue}function v(Te){return N(Te)||M(Te)||w(Te)||g()}function g(){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 w(Te,be){if(!Te)return;if(typeof Te=="string")return I(Te,be);var ue=Object.prototype.toString.call(Te).slice(8,-1);if(ue==="Object"&&Te.constructor&&(ue=Te.constructor.name),ue==="Map"||ue==="Set")return Array.from(Te);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return I(Te,be)}function M(Te){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Te))return Array.from(Te)}function N(Te){if(Array.isArray(Te))return I(Te)}function I(Te,be){(be==null||be>Te.length)&&(be=Te.length);for(var ue=0,le=new Array(be);ue<be;ue++)le[ue]=Te[ue];return le}function G(Te,be){if(!(Te instanceof be))throw new TypeError("Cannot call a class as a function")}function z(Te,be){for(var ue=0;ue<be.length;ue++){var le=be[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Te,le.key,le)}}function H(Te,be,ue){return be&&z(Te.prototype,be),ue&&z(Te,ue),Te}function K(Te,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Te.prototype=Object.create(be&&be.prototype,{constructor:{value:Te,writable:!0,configurable:!0}}),be&&U(Te,be)}function U(Te,be){return U=Object.setPrototypeOf||function(le,re){return le.__proto__=re,le},U(Te,be)}function B(Te){var be=he();return function(){var ue=pe(Te),le;if(be){var re=pe(this).constructor;le=Reflect.construct(ue,arguments,re)}else le=ue.apply(this,arguments);return V(this,le)}}function V(Te,be){return be&&(k(be)==="object"||typeof be=="function")?be:ae(Te)}function ae(Te){if(Te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Te}function he(){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(Te){return!1}}function pe(Te){return pe=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},pe(Te)}var Re=function(){var Te=function(be){K(le,be);var ue=B(le);function le(re){var fe;G(this,le),fe=ue.call(this,re),fe.setPopupVisible=function(ee){var Ce=fe.state.value;"popupVisible"in fe.props||fe.setState({popupVisible:ee}),ee&&!fe.state.popupVisible&&fe.setState({activeValue:Ce}),fe.props.onPopupVisibleChange(ee)},fe.handleChange=function(ee,Ce,te){var J=Ce.visible;(te.type!=="keydown"||te.keyCode===u.a.ENTER)&&(fe.props.onChange(ee.map(function(X){return X[fe.getFieldName("value")]}),ee),fe.setPopupVisible(J))},fe.handlePopupVisibleChange=function(ee){fe.setPopupVisible(ee)},fe.handleMenuSelect=function(ee,Ce,te){var J=fe.trigger.getRootDomNode();J&&J.focus&&J.focus();var X=fe.props,Q=X.changeOnSelect,Ee=X.loadData,ge=X.expandTrigger;if(!ee||ee.disabled)return;var Oe=fe.state.activeValue;Oe=Oe.slice(0,Ce+1),Oe[Ce]=ee[fe.getFieldName("value")];var Qe=fe.getActiveOptions(Oe);if(ee.isLeaf===!1&&!ee[fe.getFieldName("children")]&&Ee){Q&&fe.handleChange(Qe,{visible:!0},te),fe.setState({activeValue:Oe}),Ee(Qe);return}var rt={};!ee[fe.getFieldName("children")]||!ee[fe.getFieldName("children")].length?(fe.handleChange(Qe,{visible:!1},te),rt.value=Oe):Q&&(te.type==="click"||te.type==="keydown")&&(ge==="hover"?fe.handleChange(Qe,{visible:!1},te):fe.handleChange(Qe,{visible:!0},te),rt.value=Oe),rt.activeValue=Oe,("value"in fe.props||te.type==="keydown"&&te.keyCode!==u.a.ENTER)&&delete rt.value,fe.setState(rt)},fe.handleItemDoubleClick=function(){var ee=fe.props.changeOnSelect;ee&&fe.setPopupVisible(!1)},fe.handleKeyDown=function(ee){var Ce=fe.props.children;if(Ce&&Ce.props.onKeyDown){Ce.props.onKeyDown(ee);return}var te=v(fe.state.activeValue),J=te.length-1<0?0:te.length-1,X=fe.getCurrentLevelOptions(),Q=X.map(function(Qe){return Qe[fe.getFieldName("value")]}).indexOf(te[J]);if(ee.keyCode!==u.a.DOWN&&ee.keyCode!==u.a.UP&&ee.keyCode!==u.a.LEFT&&ee.keyCode!==u.a.RIGHT&&ee.keyCode!==u.a.ENTER&&ee.keyCode!==u.a.SPACE&&ee.keyCode!==u.a.BACKSPACE&&ee.keyCode!==u.a.ESC&&ee.keyCode!==u.a.TAB)return;if(!fe.state.popupVisible&&ee.keyCode!==u.a.BACKSPACE&&ee.keyCode!==u.a.LEFT&&ee.keyCode!==u.a.RIGHT&&ee.keyCode!==u.a.ESC&&ee.keyCode!==u.a.TAB){fe.setPopupVisible(!0);return}if(ee.keyCode===u.a.DOWN||ee.keyCode===u.a.UP){ee.preventDefault();var Ee=Q;Ee!==-1?ee.keyCode===u.a.DOWN?(Ee+=1,Ee=Ee>=X.length?0:Ee):(Ee-=1,Ee=Ee<0?X.length-1:Ee):Ee=0,te[J]=X[Ee][fe.getFieldName("value")]}else if(ee.keyCode===u.a.LEFT||ee.keyCode===u.a.BACKSPACE)ee.preventDefault(),te.splice(te.length-1,1);else if(ee.keyCode===u.a.RIGHT)ee.preventDefault(),X[Q]&&X[Q][fe.getFieldName("children")]&&te.push(X[Q][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ee.keyCode===u.a.ESC||ee.keyCode===u.a.TAB){fe.setPopupVisible(!1);return}(!te||te.length===0)&&fe.setPopupVisible(!1);var ge=fe.getActiveOptions(te),Oe=ge[ge.length-1];fe.handleMenuSelect(Oe,ge.length-1,ee),fe.props.onKeyDown&&fe.props.onKeyDown(ee)},fe.saveTrigger=function(ee){fe.trigger=ee};var q=[];return"value"in re?q=re.value||[]:"defaultValue"in re&&(q=re.defaultValue||[]),D()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:re.popupVisible,activeValue:q,value:q,prevProps:re},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return H(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var q=this.defaultFieldNames,ee=this.props,Ce=ee.fieldNames,te=ee.filedNames;return"filedNames"in this.props?te[fe]||q[fe]:Ce[fe]||q[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,q=fe.fieldNames,ee=fe.filedNames;return"filedNames"in this.props?ee:q}},{key:"getCurrentLevelOptions",value:function(){var fe=this,q=this.props.options,ee=q===void 0?[]:q,Ce=this.state.activeValue,te=Ce===void 0?[]:Ce,J=C()(ee,function(X,Q){return X[fe.getFieldName("value")]===te[Q]},{childrenKeyName:this.getFieldName("children")});return J[J.length-2]?J[J.length-2][this.getFieldName("children")]:v(ee).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var q=this;return C()(this.props.options||[],function(ee,Ce){return ee[q.getFieldName("value")]===fe[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,q=fe.prefixCls,ee=fe.transitionName,Ce=fe.popupClassName,te=fe.options,J=te===void 0?[]:te,X=fe.disabled,Q=fe.builtinPlacements,Ee=fe.popupPlacement,ge=fe.children,Oe=fe.dropdownRender,Qe=O(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=P.createElement("div",null),nt="";J&&J.length>0?rt=P.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(q,"-menus-empty");var ut=rt;return Oe&&(ut=Oe(rt)),P.createElement(d.a,Object.assign({ref:this.saveTrigger},Qe,{popupPlacement:Ee,builtinPlacements:Q,popupTransitionName:ee,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(q,"-menus"),popupClassName:Ce+nt,popup:ut}),P.cloneElement(ge,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,q){var ee=q.prevProps,Ce=ee===void 0?{}:ee,te={prevProps:fe};return"value"in fe&&!E(Ce.value,fe.value)&&(te.value=fe.value||[],"loadData"in fe||(te.activeValue=fe.value||[])),"popupVisible"in fe&&(te.popupVisible=fe.popupVisible),te}}]),le}(P.Component);return Te.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:o,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Te}(),ke=Re,ve=Z.a=ke},S6kV:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.OFB=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._keystream;E&&(l=this._keystream=E.slice(0),this._iv=void 0),p.encryptBlock(l,0);for(var s=0;s<C;s++)D[u+s]^=l[s]}});return d.Decryptor=T,d}(),P.mode.OFB})},"SA+Z":function(j,Z,L){var P=L("wTVA"),d=L("EbDI"),T=L("ZhPi"),D=L("wkBT");function u(p){return P(p)||d(p)||T(p)||D()}j.exports=u,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,Z){/**
* @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 L,P,d,T=!1,D,u;window.PR_SHOULD_USE_CONTINUATION=!0;var p,C;(function(){var E=window,l=["break,continue,do,else,for,if,return,while"],s=[l,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[s,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[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"],f=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[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"],m="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",_=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],y="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",i=[l,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],a=[l,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[h,c,f,_,y,i,a,t],x=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,o="str",k="kwd",O="com",b="typ",v="lit",g="pun",w="pln",M="tag",N="dec",I="src",G="atn",z="atv",H="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(te){for(var J=0,X=!1,Q=!1,Ee=0,ge=te.length;Ee<ge;++Ee){var Oe=te[Ee];if(Oe.ignoreCase)Q=!0;else if(/[a-z]/i.test(Oe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Q=!1;break}}var Qe={b:8,t:9,n:10,v:11,f:12,r:13};function rt(He){var De=He.charCodeAt(0);if(De!==92)return De;var at=He.charAt(1);return De=Qe[at],De||("0"<=at&&at<="7"?parseInt(He.substring(1),8):at==="u"||at==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function nt(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var De=String.fromCharCode(He);return De==="\\"||De==="-"||De==="]"||De==="^"?"\\"+De:De}function ut(He){var De=He.substring(1,He.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")),at=[],ht=De[0]==="^",Ze=["["];ht&&Ze.push("^");for(var st=ht?1:0,Ue=De.length;st<Ue;++st){var Me=De[st];if(/\\[bdsw]/i.test(Me))Ze.push(Me);else{var Ne=rt(Me),xe;st+2<Ue&&De[st+1]==="-"?(xe=rt(De[st+2]),st+=2):xe=Ne,at.push([Ne,xe]),xe<65||Ne>122||(xe<65||Ne>90||at.push([Math.max(65,Ne)|32,Math.min(xe,90)|32]),xe<97||Ne>122||at.push([Math.max(97,Ne)&~32,Math.min(xe,122)&~32]))}}at.sort(function(Je,Ve){return Je[0]-Ve[0]||Ve[1]-Je[1]});for(var Se=[],Ae=[],st=0;st<at.length;++st){var Le=at[st];Le[0]<=Ae[1]+1?Ae[1]=Math.max(Ae[1],Le[1]):Se.push(Ae=Le)}for(var st=0;st<Se.length;++st){var Le=Se[st];Ze.push(nt(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&Ze.push("-"),Ze.push(nt(Le[1])))}return Ze.push("]"),Ze.join("")}function dt(He){for(var De=He.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")),at=De.length,ht=[],Ze=0,st=0;Ze<at;++Ze){var Ue=De[Ze];if(Ue==="(")++st;else if(Ue.charAt(0)==="\\"){var Me=+Ue.substring(1);Me&&(Me<=st?ht[Me]=-1:De[Ze]=nt(Me))}}for(var Ze=1;Ze<ht.length;++Ze)ht[Ze]===-1&&(ht[Ze]=++J);for(var Ze=0,st=0;Ze<at;++Ze){var Ue=De[Ze];if(Ue==="(")++st,ht[st]||(De[Ze]="(?:");else if(Ue.charAt(0)==="\\"){var Me=+Ue.substring(1);Me&&Me<=st&&(De[Ze]="\\"+ht[Me])}}for(var Ze=0;Ze<at;++Ze)De[Ze]==="^"&&De[Ze+1]!=="^"&&(De[Ze]="");if(He.ignoreCase&&X)for(var Ze=0;Ze<at;++Ze){var Ue=De[Ze],Ne=Ue.charAt(0);Ue.length>=2&&Ne==="["?De[Ze]=ut(Ue):Ne!=="\\"&&(De[Ze]=Ue.replace(/[a-zA-Z]/g,function(Ae){var Le=Ae.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return De.join("")}for(var mt=[],Ee=0,ge=te.length;Ee<ge;++Ee){var Oe=te[Ee];if(Oe.global||Oe.multiline)throw new Error(""+Oe);mt.push("(?:"+dt(Oe)+")")}return new RegExp(mt.join("|"),Q?"gi":"g")}function B(te,J){var X=/(?:^|\s)nocode(?:\s|$)/,Q=[],Ee=0,ge=[],Oe=0;function Qe(rt){var nt=rt.nodeType;if(nt==1){if(X.test(rt.className))return;for(var ut=rt.firstChild;ut;ut=ut.nextSibling)Qe(ut);var dt=rt.nodeName.toLowerCase();(dt==="br"||dt==="li")&&(Q[Oe]=`
`,ge[Oe<<1]=Ee++,ge[Oe++<<1|1]=rt)}else if(nt==3||nt==4){var mt=rt.nodeValue;mt.length&&(J?mt=mt.replace(/\r\n?/g,`
`):mt=mt.replace(/[ \t\r\n]+/g," "),Q[Oe]=mt,ge[Oe<<1]=Ee,Ee+=mt.length,ge[Oe++<<1|1]=rt)}}return Qe(te),{sourceCode:Q.join("").replace(/\n$/,""),spans:ge}}function V(te,J,X,Q,Ee){if(!X)return;var ge={sourceNode:te,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:J,decorations:null};Q(ge),Ee.push.apply(Ee,ge.decorations)}var ae=/\S/;function he(te){for(var J=void 0,X=te.firstChild;X;X=X.nextSibling){var Q=X.nodeType;J=Q===1?J?te:X:Q===3&&ae.test(X.nodeValue)?te:J}return J===te?void 0:J}function pe(te,J){var X={},Q;(function(){for(var Oe=te.concat(J),Qe=[],rt={},nt=0,ut=Oe.length;nt<ut;++nt){var dt=Oe[nt],mt=dt[3];if(mt)for(var He=mt.length;--He>=0;)X[mt.charAt(He)]=dt;var De=dt[1],at=""+De;rt.hasOwnProperty(at)||(Qe.push(De),rt[at]=null)}Qe.push(/[\0-\uffff]/),Q=U(Qe)})();var Ee=J.length,ge=function(Oe){for(var Qe=Oe.sourceCode,rt=Oe.basePos,nt=Oe.sourceNode,ut=[rt,w],dt=0,mt=Qe.match(Q)||[],He={},De=0,at=mt.length;De<at;++De){var ht=mt[De],Ze=He[ht],st=void 0,Ue;if(typeof Ze=="string")Ue=!1;else{var Me=X[ht.charAt(0)];if(Me)st=ht.match(Me[1]),Ze=Me[0];else{for(var Ne=0;Ne<Ee;++Ne)if(Me=J[Ne],st=ht.match(Me[1]),st){Ze=Me[0];break}st||(Ze=w)}Ue=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,Ze=I),Ue||(He[ht]=Ze)}var xe=dt;if(dt+=ht.length,!Ue)ut.push(rt+xe,Ze);else{var Se=st[1],Ae=ht.indexOf(Se),Le=Ae+Se.length;st[2]&&(Le=ht.length-st[2].length,Ae=Le-Se.length);var Je=Ze.substring(5);V(nt,rt+xe,ht.substring(0,Ae),ge,ut),V(nt,rt+xe+Ae,Se,le(Je,Se),ut),V(nt,rt+xe+Le,ht.substring(Le),ge,ut)}}Oe.decorations=ut};return ge}function Re(te){var J=[],X=[];te.tripleQuotedStrings?J.push([o,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?J.push([o,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([o,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&X.push([o,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=te.hashComments;Q&&(te.cStyleComments?(Q>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([o,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\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 Ee=te.regexLiterals;if(Ee){var ge=Ee>1?"":`
\r`,Oe=ge?".":"[\\S\\s]",Qe="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+K+"("+Qe+")")])}var rt=te.types;rt&&X.push([b,rt]);var nt=(""+te.keywords).replace(/^ | $/g,"");nt.length&&X.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([w,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(ut+="(?!s*/)"),X.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[g,new RegExp(ut),null]),pe(J,X)}var ke=Re({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(te,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,ge=te.ownerDocument,Oe=ge.createElement("li");te.firstChild;)Oe.appendChild(te.firstChild);var Qe=[Oe];function rt(De){var at=De.nodeType;if(at==1&&!Q.test(De.className))if(De.nodeName==="br")nt(De),De.parentNode&&De.parentNode.removeChild(De);else for(var ht=De.firstChild;ht;ht=ht.nextSibling)rt(ht);else if((at==3||at==4)&&X){var Ze=De.nodeValue,st=Ze.match(Ee);if(st){var Ue=Ze.substring(0,st.index);De.nodeValue=Ue;var Me=Ze.substring(st.index+st[0].length);if(Me){var Ne=De.parentNode;Ne.insertBefore(ge.createTextNode(Me),De.nextSibling)}nt(De),Ue||De.parentNode.removeChild(De)}}}function nt(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function at(st,Ue){var Me=Ue?st.cloneNode(!1):st,Ne=st.parentNode;if(Ne){var xe=at(Ne,1),Se=st.nextSibling;xe.appendChild(Me);for(var Ae=Se;Ae;Ae=Se)Se=Ae.nextSibling,xe.appendChild(Ae)}return Me}for(var ht=at(De.nextSibling,0),Ze;(Ze=ht.parentNode)&&Ze.nodeType===1;)ht=Ze;Qe.push(ht)}for(var ut=0;ut<Qe.length;++ut)rt(Qe[ut]);J===(J|0)&&Qe[0].setAttribute("value",J);var dt=ge.createElement("ol");dt.className="linenums";for(var mt=Math.max(0,J-1|0)||0,ut=0,He=Qe.length;ut<He;++ut)Oe=Qe[ut],Oe.className="L"+(ut+mt)%10,Oe.firstChild||Oe.appendChild(ge.createTextNode("\xA0")),dt.appendChild(Oe);te.appendChild(dt)}function Te(te){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var X=/\n/g,Q=te.sourceCode,Ee=Q.length,ge=0,Oe=te.spans,Qe=Oe.length,rt=0,nt=te.decorations,ut=nt.length,dt=0;nt[ut]=Ee;var mt,He;for(He=mt=0;He<ut;)nt[He]!==nt[He+2]?(nt[mt++]=nt[He++],nt[mt++]=nt[He++]):He+=2;for(ut=mt,He=mt=0;He<ut;){for(var De=nt[He],at=nt[He+1],ht=He+2;ht+2<=ut&&nt[ht+1]===at;)ht+=2;nt[mt++]=De,nt[mt++]=at,He=ht}ut=nt.length=mt;var Ze=te.sourceNode,st="";Ze&&(st=Ze.style.display,Ze.style.display="none");try{for(var Ue=null;rt<Qe;){var Me=Oe[rt],Ne=Oe[rt+2]||Ee,xe=nt[dt+2]||Ee,ht=Math.min(Ne,xe),Se=Oe[rt+1],Ae;if(Se.nodeType!==1&&(Ae=Q.substring(ge,ht))){J&&(Ae=Ae.replace(X,"\r")),Se.nodeValue=Ae;var Le=Se.ownerDocument,Je=Le.createElement("span");Je.className=nt[dt+1];var Ve=Se.parentNode;Ve.replaceChild(Je,Se),Je.appendChild(Se),ge<Ne&&(Oe[rt+1]=Se=Le.createTextNode(Q.substring(ht,Ne)),Ve.insertBefore(Se,Je.nextSibling))}ge=ht,ge>=Ne&&(rt+=2),ge>=xe&&(dt+=2)}}finally{Ze&&(Ze.style.display=st)}}var be={};function ue(te,J){for(var X=J.length;--X>=0;){var Q=J[X];be.hasOwnProperty(Q)?E.console&&console.warn("cannot override language handler %s",Q):be[Q]=te}}function le(te,J){return te&&be.hasOwnProperty(te)||(te=/^\s*</.test(J)?"default-markup":"default-code"),be[te]}ue(ke,["default-code"]),ue(pe([],[[w,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["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"]),ue(pe([[w,/^[\s]+/,null,` \r
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[g,/^[=<>\/]+/],["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"]),ue(pe([],[[z,/^[\s\S]+/]]),["uq.val"]),ue(Re({keywords:h,hashComments:!0,cStyleComments:!0,types:x}),["c","cc","cpp","cxx","cyc","m"]),ue(Re({keywords:"null,true,false"}),["json"]),ue(Re({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:x}),["cs"]),ue(Re({keywords:f,cStyleComments:!0}),["java"]),ue(Re({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Re({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Re({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Re({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Re({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Re({keywords:m,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(pe([],[[o,/^[\s\S]+/]]),["regex"]);function re(te){var J=te.langExtension;try{var X=B(te.sourceNode,te.pre),Q=X.sourceCode;te.sourceCode=Q,te.spans=X.spans,te.basePos=0,le(J,Q)(te),Te(te)}catch(Ee){E.console&&console.log(Ee&&Ee.stack||Ee)}}function fe(te,J,X){var Q=X||!1,Ee=J||null,ge=document.createElement("div");ge.innerHTML="<pre>"+te+"</pre>",ge=ge.firstChild,Q&&ve(ge,Q,!0);var Oe={langExtension:Ee,numberLines:Q,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Oe),ge.innerHTML}function q(te,J){var X=J||document.body,Q=X.ownerDocument||document;function Ee(Me){return X.getElementsByTagName(Me)}for(var ge=[Ee("pre"),Ee("code"),Ee("xmp")],Oe=[],Qe=0;Qe<ge.length;++Qe)for(var rt=0,nt=ge[Qe].length;rt<nt;++rt)Oe.push(ge[Qe][rt]);ge=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var dt=0,mt=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,De=/\bprettyprinted\b/,at=/pre|xmp/i,ht=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,st={};function Ue(){for(var Me=E.PR_SHOULD_USE_CONTINUATION?ut.now()+250:Infinity;dt<Oe.length&&ut.now()<Me;dt++){for(var Ne=Oe[dt],xe=st,Se=Ne;Se=Se.previousSibling;){var Ae=Se.nodeType,Le=(Ae===7||Ae===8)&&Se.nodeValue;if(Le?!/^\??prettify\b/.test(Le):Ae!==3||/\S/.test(Se.nodeValue))break;if(Le){xe={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(sn,Rr,mn){xe[Rr]=mn});break}}var Je=Ne.className;if((xe!==st||He.test(Je))&&!De.test(Je)){for(var Ve=!1,gt=Ne.parentNode;gt;gt=gt.parentNode){var yt=gt.tagName;if(Ze.test(yt)&&gt.className&&He.test(gt.className)){Ve=!0;break}}if(!Ve){Ne.className+=" prettyprinted";var Bt=xe.lang;if(!Bt){Bt=Je.match(mt);var Nt;!Bt&&(Nt=he(Ne))&&ht.test(Nt.tagName)&&(Bt=Nt.className.match(mt)),Bt&&(Bt=Bt[1])}var mr;if(at.test(Ne.tagName))mr=1;else{var hr=Ne.currentStyle,St=Q.defaultView,$r=hr?hr.whiteSpace:St&&St.getComputedStyle?St.getComputedStyle(Ne,null).getPropertyValue("white-space"):0;mr=$r&&$r.substring(0,3)==="pre"}var Xr=xe.linenums;(Xr=Xr==="true"||+Xr)||(Xr=Je.match(/\blinenums\b(?::(\d+))?/),Xr=Xr?Xr[1]&&Xr[1].length?+Xr[1]:!0:!1),Xr&&ve(Ne,Xr,mr);var Ur={langExtension:Bt,sourceNode:Ne,numberLines:Xr,pre:mr,sourceCode:null,basePos:null,spans:null,decorations:null};re(Ur)}}}dt<Oe.length?E.setTimeout(Ue,250):typeof te=="function"&&te()}Ue()}var ee=E.PR={createSimpleLexer:pe,registerLangHandler:ue,sourceDecorator:Re,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:z,PR_COMMENT:O,PR_DECLARATION:N,PR_KEYWORD:k,PR_LITERAL:v,PR_NOCODE:H,PR_PLAIN:w,PR_PUNCTUATION:g,PR_SOURCE:I,PR_STRING:o,PR_TAG:M,PR_TYPE:b,prettyPrintOne:T?E.prettyPrintOne=fe:p=fe,prettyPrint:C=T?E.prettyPrint=q:C=q},Ce=E.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return ee})})()},Sjjz:function(j,Z,L){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("5NDa"),D=L("5rEg"),u=L("miYZ"),p=L("tsqr"),C=L("tJVT"),E=L("q1tI"),l=L.n(E),s=L("4i/N");function n(h){var f=h.isjoin,c=h.setJoin,m=h.JoinTeams,_=Object(E.useState)(""),y=Object(C.a)(_,2),i=y[0],a=y[1];return l.a.createElement(d.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),l.a.createElement(s.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:f,closable:!1,destroyOnClose:!0,onOk:function(){if(!i){p.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}m(i)},onCancel:function(){return c(!1)}},l.a.createElement("div",null,l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},l.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",l.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(S){return a(S.target.value)}}))))}Z.a=n},"VrN/":function(j,Z,L){(function(P,d){j.exports=d()})(this,function(){"use strict";var P=navigator.userAgent,d=navigator.platform,T=/gecko\/\d/i.test(P),D=/MSIE \d/.test(P),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),p=/Edge\/(\d+)/.exec(P),C=D||u||p,E=C&&(D?document.documentMode||6:+(p||u)[1]),l=!p&&/WebKit\//.test(P),s=l&&/Qt\/\d+\.\d+/.test(P),n=!p&&/Chrome\//.test(P),h=/Opera\//.test(P),f=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),m=/PhantomJS/.test(P),_=!p&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),y=/Android/.test(P),i=_||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),a=_||/Mac/.test(d),t=/\bCrOS\b/.test(P),S=/win/i.test(d),x=h&&P.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,l=!0);var o=a&&(s||h&&(x==null||x<12.11)),k=T||C&&E>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,r){var R=e.className,A=O(r).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function v(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function g(e,r){return v(e).appendChild(r)}function w(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 Y=0;Y<r.length;++Y)F.appendChild(r[Y]);return F}function M(e,r,R,A){var F=w(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 G(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function H(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 K=function(e){e.select()};_?K=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(K=function(e){try{e.select()}catch(r){}});function U(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function B(e,r,R){r||(r={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!r.hasOwnProperty(A))&&(r[A]=e[A]);return r}function V(e,r,R,A,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var Y=A||0,ie=F||0;;){var de=e.indexOf(" ",Y);if(de<0||de>=r)return ie+(r-Y);ie+=de-Y,ie+=R-ie%R,Y=de+1}}var ae=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ae.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 he(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var pe=50,Re={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},ve={origin:"*mouse"},Te={origin:"+move"};function be(e,r,R){for(var A=0,F=0;;){var Y=e.indexOf(" ",A);Y==-1&&(Y=e.length);var ie=Y-A;if(Y==e.length||F+ie>=r)return A+Math.min(ie,r-F);if(F+=Y-A,F+=R-F%R,A=Y+1,F>=r)return A}}var ue=[""];function le(e){for(;ue.length<=e;)ue.push(re(ue)+" ");return ue[e]}function re(e){return e[e.length-1]}function fe(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 ee(){}function Ce(e,r){var R;return Object.create?R=Object.create(e):(ee.prototype=e,R=new ee),r&&B(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 Q(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Ee=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ge(e){return e.charCodeAt(0)>=768&&Ee.test(e)}function Oe(e,r,R){for(;(R<0?r>0:r<e.length)&&ge(e.charAt(r));)r+=R;return r}function Qe(e,r,R){for(var A=r>R?-1:1;;){if(r==R)return r;var F=(r+R)/2,Y=A<0?Math.ceil(F):Math.floor(F);if(Y==r)return e(Y)?r:R;e(Y)?R=Y:r=Y+A}}function rt(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,Y=0;Y<e.length;++Y){var ie=e[Y];(ie.from<R&&ie.to>r||r==R&&ie.to==r)&&(A(Math.max(ie.from,r),Math.min(ie.to,R),ie.level==1?"rtl":"ltr",Y),F=!0)}F||A(r,R,"ltr")}var nt=null;function ut(e,r,R){var A;nt=null;for(var F=0;F<e.length;++F){var Y=e[F];if(Y.from<r&&Y.to>r)return F;Y.to==r&&(Y.from!=Y.to&&R=="before"?A=F:nt=F),Y.from==r&&(Y.from!=Y.to&&R!="before"?A=F:nt=F)}return A!=null?A:nt}var dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(_e){return _e<=247?e.charAt(_e):1424<=_e&&_e<=1524?"R":1536<=_e&&_e<=1785?r.charAt(_e-1536):1774<=_e&&_e<=2220?"r":8192<=_e&&_e<=8203?"w":_e==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,Y=/[LRr]/,ie=/[Lb1n]/,de=/[1n]/;function me(_e,Be,$e){this.level=_e,this.from=Be,this.to=$e}return function(_e,Be){var $e=Be=="ltr"?"L":"R";if(_e.length==0||Be=="ltr"&&!A.test(_e))return!1;for(var lt=_e.length,it=[],Tt=0;Tt<lt;++Tt)it.push(R(_e.charCodeAt(Tt)));for(var Ut=0,Yt=$e;Ut<lt;++Ut){var rr=it[Ut];rr=="m"?it[Ut]=Yt:Yt=rr}for(var Er=0,nr=$e;Er<lt;++Er){var Sr=it[Er];Sr=="1"&&nr=="r"?it[Er]="n":Y.test(Sr)&&(nr=Sr,Sr=="r"&&(it[Er]="R"))}for(var Vr=1,Hr=it[0];Vr<lt-1;++Vr){var gn=it[Vr];gn=="+"&&Hr=="1"&&it[Vr+1]=="1"?it[Vr]="1":gn==","&&Hr==it[Vr+1]&&(Hr=="1"||Hr=="n")&&(it[Vr]=Hr),Hr=gn}for(var Kn=0;Kn<lt;++Kn){var Ci=it[Kn];if(Ci==",")it[Kn]="N";else if(Ci=="%"){var ei=void 0;for(ei=Kn+1;ei<lt&&it[ei]=="%";++ei);for(var ea=Kn&&it[Kn-1]=="!"||ei<lt&&it[ei]=="1"?"1":"N",Ji=Kn;Ji<ei;++Ji)it[Ji]=ea;Kn=ei-1}}for(var hi=0,Qi=$e;hi<lt;++hi){var Pi=it[hi];Qi=="L"&&Pi=="1"?it[hi]="L":Y.test(Pi)&&(Qi=Pi)}for(var Ei=0;Ei<lt;++Ei)if(F.test(it[Ei])){var fi=void 0;for(fi=Ei+1;fi<lt&&F.test(it[fi]);++fi);for(var ii=(Ei?it[Ei-1]:$e)=="L",Zi=(fi<lt?it[fi]:$e)=="L",lo=ii==Zi?ii?"L":"R":$e,Ua=Ei;Ua<fi;++Ua)it[Ua]=lo;Ei=fi-1}for(var ji=[],_a,Si=0;Si<lt;)if(ie.test(it[Si])){var ps=Si;for(++Si;Si<lt&&ie.test(it[Si]);++Si);ji.push(new me(0,ps,Si))}else{var ka=Si,Ga=ji.length,Va=Be=="rtl"?1:0;for(++Si;Si<lt&&it[Si]!="L";++Si);for(var Ki=ka;Ki<Si;)if(de.test(it[Ki])){ka<Ki&&(ji.splice(Ga,0,new me(1,ka,Ki)),Ga+=Va);var uo=Ki;for(++Ki;Ki<Si&&de.test(it[Ki]);++Ki);ji.splice(Ga,0,new me(2,uo,Ki)),Ga+=Va,ka=Ki}else++Ki;ka<Si&&ji.splice(Ga,0,new me(1,ka,Si))}return Be=="ltr"&&(ji[0].level==1&&(_a=_e.match(/^\s+/))&&(ji[0].from=_a[0].length,ji.unshift(new me(0,0,_a[0].length))),re(ji).level==1&&(_a=_e.match(/\s+$/))&&(re(ji).to-=_a[0].length,ji.push(new me(0,lt-_a[0].length,lt)))),Be=="rtl"?ji.reverse():ji}}();function mt(e,r){var R=e.order;return R==null&&(R=e.order=dt(e.text,r)),R}var He=[],De=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]||He).concat(R)}};function at(e,r){return e._handlers&&e._handlers[r]||He}function ht(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 Y=he(F,R);Y>-1&&(A[r]=F.slice(0,Y).concat(F.slice(Y+1)))}}}function Ze(e,r){var R=at(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 st(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,R||r.type,e,r),Ae(r)||r.codemirrorIgnore}function Ue(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)he(R,r[A])==-1&&R.push(r[A])}function Me(e,r){return at(e,r).length>0}function Ne(e){e.prototype.on=function(r,R){De(this,r,R)},e.prototype.off=function(r,R){ht(this,r,R)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){xe(e),Se(e)}function Je(e){return e.target||e.srcElement}function Ve(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),a&&e.ctrlKey&&r==1&&(r=3),r}var gt=function(){if(C&&E<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),yt;function Bt(e){if(yt==null){var r=w("span","\u200B");g(e,w("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(yt=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&E<8))}var R=yt?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Nt;function mr(e){if(Nt!=null)return Nt;var r=g(e,document.createTextNode("A\u062EA")),R=N(r,0,1).getBoundingClientRect(),A=N(r,1,2).getBoundingClientRect();return v(e),!R||R.left==R.right?!1:Nt=A.right-R.right<3}var hr=`
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 Y=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),ie=Y.indexOf("\r");ie!=-1?(R.push(Y.slice(0,ie)),r+=ie+1):(R.push(Y),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},St=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},$r=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Xr=null;function Ur(e){if(Xr!=null)return Xr;var r=g(e,w("span","x")),R=r.getBoundingClientRect(),A=N(r,0,1).getBoundingClientRect();return Xr=Math.abs(R.left-A.left)>1}var sn={},Rr={};function mn(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),sn[e]=r}function vn(e,r){Rr[e]=r}function Gt(e){if(typeof e=="string"&&Rr.hasOwnProperty(e))e=Rr[e];else if(e&&typeof e.name=="string"&&Rr.hasOwnProperty(e.name)){var r=Rr[e.name];typeof r=="string"&&(r={name:r}),e=Ce(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Gt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Gt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,r){r=Gt(r);var R=sn[r.name];if(!R)return Cn(e,"text/plain");var A=R(e,r);if(yn.hasOwnProperty(r.name)){var F=yn[r.name];for(var Y in F){if(!F.hasOwnProperty(Y))continue;A.hasOwnProperty(Y)&&(A["_"+Y]=A[Y]),A[Y]=F[Y]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var ie in r.modeProps)A[ie]=r.modeProps[ie];return A}var yn={};function Sn(e,r){var R=yn.hasOwnProperty(e)?yn[e]:yn[e]={};B(r,R)}function xn(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 xi(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 Ti(e,r,R){return e.startState?e.startState(r,R):!0}var hn=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};hn.prototype.eol=function(){return this.pos>=this.string.length},hn.prototype.sol=function(){return this.pos==this.lineStart},hn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},hn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},hn.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},hn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},hn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},hn.prototype.skipToEnd=function(){this.pos=this.string.length},hn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},hn.prototype.backUp=function(e){this.pos-=e},hn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},hn.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},hn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(ie){return R?ie.toLowerCase():ie},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return r!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?null:(Y&&r!==!1&&(this.pos+=Y[0].length),Y)}},hn.prototype.current=function(){return this.string.slice(this.start,this.pos)},hn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},hn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},hn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function cr(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],Y=F.chunkSize();if(r<Y){R=F;break}r-=Y}return R.lines[r]}function Gn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(Y){var ie=Y.text;F==R.line&&(ie=ie.slice(0,R.ch)),F==r.line&&(ie=ie.slice(r.ch)),A.push(ie),++F}),A}function pi(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function Vn(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function Yr(e){if(e.parent==null)return null;for(var r=e.parent,R=he(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 Un(e,r){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],Y=F.height;if(r<Y){e=F;continue e}r-=Y,R+=F.chunkSize()}return R}while(!e.lines);for(var ie=0;ie<e.lines.length;++ie){var de=e.lines[ie],me=de.height;if(r<me)break;r-=me}return R+ie}function ui(e,r){return r>=e.first&&r<e.first+e.size}function ci(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function jt(e,r,R){if(R===void 0&&(R=null),!(this instanceof jt))return new jt(e,r,R);this.line=e,this.ch=r,this.sticky=R}function _r(e,r){return e.line-r.line||e.ch-r.ch}function ai(e,r){return e.sticky==r.sticky&&_r(e,r)==0}function Oi(e){return jt(e.line,e.ch)}function Ai(e,r){return _r(e,r)<0?r:e}function Ri(e,r){return _r(e,r)<0?e:r}function se(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function W(e,r){if(r.line<e.first)return jt(e.first,0);var R=e.first+e.size-1;return r.line>R?jt(R,cr(e,R).text.length):$(r,cr(e,r.line).text.length)}function $(e,r){var R=e.ch;return R==null||R>r?jt(e.line,r):R<0?jt(e.line,0):e}function ne(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=W(e,r[A]);return R}var ce=function(e,r){this.state=e,this.lookAhead=r},oe=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};oe.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},oe.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}},oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oe.fromSaved=function(e,r,R){return r instanceof ce?new oe(e,xn(e.mode,r.state),R,r.lookAhead):new oe(e,xn(e.mode,r),R)},oe.prototype.save=function(e){var r=e!==!1?xn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(r,this.maxLookAhead):r};function Ke(e,r,R,A){var F=[e.state.modeGen],Y={};mi(e,r.text,e.doc.mode,R,function(_e,Be){return F.push(_e,Be)},Y,A);for(var ie=R.state,de=function(_e){R.baseTokens=F;var Be=e.state.overlays[_e],$e=1,lt=0;R.state=!0,mi(e,r.text,Be.mode,R,function(it,Tt){for(var Ut=$e;lt<it;){var Yt=F[$e];Yt>it&&F.splice($e,1,it,F[$e+1],Yt),$e+=2,lt=Math.min(it,Yt)}if(!Tt)return;if(Be.opaque)F.splice(Ut,$e-Ut,it,"overlay "+Tt),$e=Ut+2;else for(;Ut<$e;Ut+=2){var rr=F[Ut+1];F[Ut+1]=(rr?rr+" ":"")+"overlay "+Tt}},Y),R.state=ie,R.baseTokens=null,R.baseTokenPos=1},me=0;me<e.state.overlays.length;++me)de(me);return{styles:F,classes:Y.bgClass||Y.textClass?Y:null}}function At(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=Vt(e,Yr(r)),F=r.text.length>e.options.maxHighlightLength&&xn(e.doc.mode,A.state),Y=Ke(e,r,A);F&&(A.state=F),r.stateAfter=A.save(!F),r.styles=Y.styles,Y.classes?r.styleClasses=Y.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 Vt(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new oe(A,!0,r);var Y=Rn(e,r,R),ie=Y>A.first&&cr(A,Y-1).stateAfter,de=ie?oe.fromSaved(A,ie,Y):new oe(A,Ti(A.mode),Y);return A.iter(Y,r,function(me){vr(e,me.text,de);var _e=de.line;me.stateAfter=_e==r-1||_e%5==0||_e>=F.viewFrom&&_e<F.viewTo?de.save():null,de.nextLine()}),R&&(A.modeFrontier=de.line),de}function vr(e,r,R,A){var F=e.doc.mode,Y=new hn(r,e.options.tabSize,R);for(Y.start=Y.pos=A||0,r==""&&Pt(F,R.state);!Y.eol();)Br(F,Y,R.state),Y.start=Y.pos}function Pt(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=xi(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function Br(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=xi(e,R).mode);var Y=e.token(r,R);if(r.pos>r.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var jr=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,Y=F.mode,ie;r=W(F,r);var de=cr(F,r.line),me=Vt(e,r.line,R),_e=new hn(de.text,e.options.tabSize,me),Be;for(A&&(Be=[]);(A||_e.pos<r.ch)&&!_e.eol();)_e.start=_e.pos,ie=Br(Y,_e,me.state),A&&Be.push(new jr(_e,ie,xn(F.mode,me.state)));return A?Be:new jr(_e,ie,me.state)}function ti(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 mi(e,r,R,A,F,Y,ie){var de=R.flattenSpans;de==null&&(de=e.options.flattenSpans);var me=0,_e=null,Be=new hn(r,e.options.tabSize,A),$e,lt=e.options.addModeClass&&[null];for(r==""&&ti(Pt(R,A.state),Y);!Be.eol();){if(Be.pos>e.options.maxHighlightLength?(de=!1,ie&&vr(e,r,A,Be.pos),Be.pos=r.length,$e=null):$e=ti(Br(R,Be,A.state,lt),Y),lt){var it=lt[0].name;it&&($e="m-"+($e?it+" "+$e:it))}if(!de||_e!=$e){for(;me<Be.start;)me=Math.min(Be.start,me+5e3),F(me,_e);_e=$e}Be.start=Be.pos}for(;me<Be.pos;){var Tt=Math.min(Be.pos,me+5e3);F(Tt,_e),me=Tt}}function Rn(e,r,R){for(var A,F,Y=e.doc,ie=R?-1:r-(e.doc.mode.innerMode?1e3:100),de=r;de>ie;--de){if(de<=Y.first)return Y.first;var me=cr(Y,de-1),_e=me.stateAfter;if(_e&&(!R||de+(_e instanceof ce?_e.lookAhead:0)<=Y.modeFrontier))return de;var Be=V(me.text,null,e.options.tabSize);(F==null||A>Be)&&(F=de-1,A=Be)}return F}function Li(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=cr(e,A).stateAfter;if(F&&(!(F instanceof ce)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var qi=!1,Qn=!1;function _i(){qi=!0}function vi(){Qn=!0}function Fi(e,r,R){this.marker=e,this.from=r,this.to=R}function gi(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function Gi(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function Mi(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function oa(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var Y=e[F],ie=Y.marker,de=Y.from==null||(ie.inclusiveLeft?Y.from<=r:Y.from<r);if(de||Y.from==r&&ie.type=="bookmark"&&(!R||!Y.marker.insertLeft)){var me=Y.to==null||(ie.inclusiveRight?Y.to>=r:Y.to>r);(A||(A=[])).push(new Fi(ie,Y.from,me?null:Y.to))}}return A}function sa(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var Y=e[F],ie=Y.marker,de=Y.to==null||(ie.inclusiveRight?Y.to>=r:Y.to>r);if(de||Y.from==r&&ie.type=="bookmark"&&(!R||Y.marker.insertLeft)){var me=Y.from==null||(ie.inclusiveLeft?Y.from<=r:Y.from<r);(A||(A=[])).push(new Fi(ie,me?null:Y.from-r,Y.to==null?null:Y.to-r))}}return A}function Ii(e,r){if(r.full)return null;var R=ui(e,r.from.line)&&cr(e,r.from.line).markedSpans,A=ui(e,r.to.line)&&cr(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,Y=r.to.ch,ie=_r(r.from,r.to)==0,de=oa(R,F,ie),me=sa(A,Y,ie),_e=r.text.length==1,Be=re(r.text).length+(_e?F:0);if(de)for(var $e=0;$e<de.length;++$e){var lt=de[$e];if(lt.to==null){var it=gi(me,lt.marker);it?_e&&(lt.to=it.to==null?null:it.to+Be):lt.to=F}}if(me)for(var Tt=0;Tt<me.length;++Tt){var Ut=me[Tt];if(Ut.to!=null&&(Ut.to+=Be),Ut.from==null){var Yt=gi(de,Ut.marker);Yt||(Ut.from=Be,_e&&(de||(de=[])).push(Ut))}else Ut.from+=Be,_e&&(de||(de=[])).push(Ut)}de&&(de=Xn(de)),me&&me!=de&&(me=Xn(me));var rr=[de];if(!_e){var Er=r.text.length-2,nr;if(Er>0&&de)for(var Sr=0;Sr<de.length;++Sr)de[Sr].to==null&&(nr||(nr=[])).push(new Fi(de[Sr].marker,null,null));for(var Vr=0;Vr<Er;++Vr)rr.push(nr);rr.push(me)}return rr}function Xn(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 Vi(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function(it){if(it.markedSpans)for(var Tt=0;Tt<it.markedSpans.length;++Tt){var Ut=it.markedSpans[Tt].marker;Ut.readOnly&&(!A||he(A,Ut)==-1)&&(A||(A=[])).push(Ut)}}),!A)return null;for(var F=[{from:r,to:R}],Y=0;Y<A.length;++Y)for(var ie=A[Y],de=ie.find(0),me=0;me<F.length;++me){var _e=F[me];if(_r(_e.to,de.from)<0||_r(_e.from,de.to)>0)continue;var Be=[me,1],$e=_r(_e.from,de.from),lt=_r(_e.to,de.to);($e<0||!ie.inclusiveLeft&&!$e)&&Be.push({from:_e.from,to:de.from}),(lt>0||!ie.inclusiveRight&&!lt)&&Be.push({from:de.to,to:_e.to}),F.splice.apply(F,Be),me+=Be.length-3}return F}function ta(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 Ct(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function tt(e){return e.inclusiveLeft?-1:0}function pt(e){return e.inclusiveRight?1:0}function _t(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),Y=_r(A.from,F.from)||tt(e)-tt(r);if(Y)return-Y;var ie=_r(A.to,F.to)||pt(e)-pt(r);return ie||r.id-e.id}function Mt(e,r){var R=Qn&&e.markedSpans,A;if(R)for(var F=void 0,Y=0;Y<R.length;++Y)F=R[Y],F.marker.collapsed&&(r?F.from:F.to)==null&&(!A||_t(A,F.marker)<0)&&(A=F.marker);return A}function Dt(e){return Mt(e,!0)}function Ht(e){return Mt(e,!1)}function Wt(e,r){var R=Qn&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var Y=R[F];Y.marker.collapsed&&(Y.from==null||Y.from<r)&&(Y.to==null||Y.to>r)&&(!A||_t(A,Y.marker)<0)&&(A=Y.marker)}return A}function ct(e,r,R,A,F){var Y=cr(e,r),ie=Qn&&Y.markedSpans;if(ie)for(var de=0;de<ie.length;++de){var me=ie[de];if(!me.marker.collapsed)continue;var _e=me.marker.find(0),Be=_r(_e.from,R)||tt(me.marker)-tt(F),$e=_r(_e.to,A)||pt(me.marker)-pt(F);if(Be>=0&&$e<=0||Be<=0&&$e>=0)continue;if(Be<=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?_r(_e.to,R)>=0:_r(_e.to,R)>0)||Be>=0&&(me.marker.inclusiveRight&&F.inclusiveLeft?_r(_e.from,A)<=0:_r(_e.from,A)<0))return!0}}function Ot(e){for(var r;r=Dt(e);)e=r.find(-1,!0).line;return e}function Rt(e){for(var r;r=Ht(e);)e=r.find(1,!0).line;return e}function fr(e){for(var r,R;r=Ht(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function qt(e,r){var R=cr(e,r),A=Ot(R);return R==A?r:Yr(A)}function Qt(e,r){if(r>e.lastLine())return r;var R=cr(e,r),A;if(!Kt(e,R))return r;for(;A=Ht(R);)R=A.find(1,!0).line;return Yr(R)+1}function Kt(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&&tr(e,r,A))return!0}}function tr(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return tr(e,A.line,gi(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var F=void 0,Y=0;Y<r.markedSpans.length;++Y)if(F=r.markedSpans[Y],F.marker.collapsed&&!F.marker.widgetNode&&F.from==R.to&&(F.to==null||F.to!=R.from)&&(F.marker.inclusiveLeft||R.marker.inclusiveRight)&&tr(e,r,F))return!0}function or(e){e=Ot(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 Y=R.parent;Y;R=Y,Y=R.parent)for(var ie=0;ie<Y.children.length;++ie){var de=Y.children[ie];if(de==R)break;r+=de.height}return r}function ot(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=Dt(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=Ht(A);){var Y=R.find(0,!0);r-=A.text.length-Y.from.ch,A=Y.to.line,r+=A.text.length-Y.to.ch}return r}function Dr(e){var r=e.display,R=e.doc;r.maxLine=cr(R,R.first),r.maxLineLength=ot(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=ot(A);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var Ir=function(e,r,R){this.text=e,Ct(this,r),this.height=R?R(this):1};Ir.prototype.lineNo=function(){return Yr(this)},Ne(Ir);function yr(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ta(e),Ct(e,R);var F=A?A(e):1;F!=e.height&&Vn(e,F)}function er(e){e.parent=null,ta(e)}var Et={},wt={};function xt(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?wt:Et;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,r){var R=M("span",null,null,l?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var Y=F?r.rest[F-1]:r.line,ie=void 0;A.pos=0,A.addToken=sr,mr(e.display.measure)&&(ie=mt(Y,e.doc.direction))&&(A.addToken=Tr(A.addToken,ie)),A.map=[];var de=r!=e.display.externalMeasured&&Yr(Y);et(Y,A,At(e,Y,de)),Y.styleClasses&&(Y.styleClasses.bgClass&&(A.bgClass=H(Y.styleClasses.bgClass,A.bgClass||"")),Y.styleClasses.textClass&&(A.textClass=H(Y.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Bt(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(l){var me=A.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=H(A.pre.className,A.textClass||"")),A}function ur(e){var r=w("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function sr(e,r,R,A,F,Y,ie){if(!r)return;var de=e.splitSpaces?lr(r,e.trailingSpace):r,me=e.cm.state.specialChars,_e=!1,Be;if(!me.test(r))e.col+=r.length,Be=document.createTextNode(de),e.map.push(e.pos,e.pos+r.length,Be),C&&E<9&&(_e=!0),e.pos+=r.length;else{Be=document.createDocumentFragment();for(var $e=0;;){me.lastIndex=$e;var lt=me.exec(r),it=lt?lt.index-$e:r.length-$e;if(it){var Tt=document.createTextNode(de.slice($e,$e+it));C&&E<9?Be.appendChild(w("span",[Tt])):Be.appendChild(Tt),e.map.push(e.pos,e.pos+it,Tt),e.col+=it,e.pos+=it}if(!lt)break;$e+=it+1;var Ut=void 0;if(lt[0]==" "){var Yt=e.cm.options.tabSize,rr=Yt-e.col%Yt;Ut=Be.appendChild(w("span",le(rr),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),e.col+=rr}else lt[0]=="\r"||lt[0]==`
`?(Ut=Be.appendChild(w("span",lt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ut.setAttribute("cm-text",lt[0]),e.col+=1):(Ut=e.cm.options.specialCharPlaceholder(lt[0]),Ut.setAttribute("cm-text",lt[0]),C&&E<9?Be.appendChild(w("span",[Ut])):Be.appendChild(Ut),e.col+=1);e.map.push(e.pos,e.pos+1,Ut),e.pos++}}if(e.trailingSpace=de.charCodeAt(r.length-1)==32,R||A||F||_e||Y||ie){var Er=R||"";A&&(Er+=A),F&&(Er+=F);var nr=w("span",[Be],Er,Y);if(ie)for(var Sr in ie)ie.hasOwnProperty(Sr)&&Sr!="style"&&Sr!="class"&&nr.setAttribute(Sr,ie[Sr]);return e.content.appendChild(nr)}e.content.appendChild(Be)}function lr(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,A="",F=0;F<e.length;F++){var Y=e.charAt(F);Y==" "&&R&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(Y="\xA0"),A+=Y,R=Y==" "}return A}function Tr(e,r){return function(R,A,F,Y,ie,de,me){F=F?F+" cm-force-border":"cm-force-border";for(var _e=R.pos,Be=_e+A.length;;){for(var $e=void 0,lt=0;lt<r.length&&!($e=r[lt],$e.to>_e&&$e.from<=_e);lt++);if($e.to>=Be)return e(R,A,F,Y,ie,de,me);e(R,A.slice(0,$e.to-_e),F,Y,null,de,me),Y=null,A=A.slice($e.to-_e),_e=$e.to}}}function Zr(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 et(e,r,R){var A=e.markedSpans,F=e.text,Y=0;if(!A){for(var ie=1;ie<R.length;ie+=2)r.addToken(r,F.slice(Y,Y=R[ie]),xt(R[ie+1],r.cm.options));return}for(var de=F.length,me=0,_e=1,Be="",$e,lt,it=0,Tt,Ut,Yt,rr,Er;;){if(it==me){Tt=Ut=Yt=lt="",Er=null,rr=null,it=Infinity;for(var nr=[],Sr=void 0,Vr=0;Vr<A.length;++Vr){var Hr=A[Vr],gn=Hr.marker;if(gn.type=="bookmark"&&Hr.from==me&&gn.widgetNode)nr.push(gn);else if(Hr.from<=me&&(Hr.to==null||Hr.to>me||gn.collapsed&&Hr.to==me&&Hr.from==me)){if(Hr.to!=null&&Hr.to!=me&&it>Hr.to&&(it=Hr.to,Ut=""),gn.className&&(Tt+=" "+gn.className),gn.css&&(lt=(lt?lt+";":"")+gn.css),gn.startStyle&&Hr.from==me&&(Yt+=" "+gn.startStyle),gn.endStyle&&Hr.to==it&&(Sr||(Sr=[])).push(gn.endStyle,Hr.to),gn.title&&((Er||(Er={})).title=gn.title),gn.attributes)for(var Kn in gn.attributes)(Er||(Er={}))[Kn]=gn.attributes[Kn];gn.collapsed&&(!rr||_t(rr.marker,gn)<0)&&(rr=Hr)}else Hr.from>me&&it>Hr.from&&(it=Hr.from)}if(Sr)for(var Ci=0;Ci<Sr.length;Ci+=2)Sr[Ci+1]==it&&(Ut+=" "+Sr[Ci]);if(!rr||rr.from==me)for(var ei=0;ei<nr.length;++ei)Zr(r,0,nr[ei]);if(rr&&(rr.from||0)==me){if(Zr(r,(rr.to==null?de+1:rr.to)-me,rr.marker,rr.from==null),rr.to==null)return;rr.to==me&&(rr=!1)}}if(me>=de)break;for(var ea=Math.min(de,it);;){if(Be){var Ji=me+Be.length;if(!rr){var hi=Ji>ea?Be.slice(0,ea-me):Be;r.addToken(r,hi,$e?$e+Tt:Tt,Yt,me+hi.length==it?Ut:"",lt,Er)}if(Ji>=ea){Be=Be.slice(ea-me),me=ea;break}me=Ji,Yt=""}Be=F.slice(Y,Y=R[_e++]),$e=xt(R[_e++],r.cm.options)}}}function ir(e,r,R){this.line=r,this.rest=fr(r),this.size=this.rest?Yr(re(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Kt(e,r)}function Lr(e,r,R){for(var A=[],F,Y=r;Y<R;Y=F){var ie=new ir(e.doc,cr(e.doc,Y),Y);F=Y+ie.size,A.push(ie)}return A}var Jr=null;function gr(e){Jr?Jr.ops.push(e):e.ownsGroup=Jr={ops:[e],delayedCallbacks:[]}}function pr(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 Or(e,r){var R=e.ownsGroup;if(!R)return;try{pr(R)}finally{Jr=null,r(R)}}var Ft=null;function Jt(e,r){var R=at(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;Jr?F=Jr.delayedCallbacks:Ft?F=Ft:(F=Ft=[],setTimeout(br,0));for(var Y=function(de){F.push(function(){return R[de].apply(null,A)})},ie=0;ie<R.length;++ie)Y(ie)}function br(){var e=Ft;Ft=null;for(var r=0;r<e.length;++r)e[r]()}function Zt(e,r,R,A){for(var F=0;F<r.changes.length;F++){var Y=r.changes[F];Y=="text"?Lt(e,r):Y=="gutter"?rn(e,r,R,A):Y=="class"?kr(e,r):Y=="widget"&&an(e,r,A)}r.changes=null}function vt(e){return e.node==e.text&&(e.node=w("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&E<8&&(e.node.style.zIndex=2)),e.node}function bt(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=vt(r);r.background=A.insertBefore(w("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function zt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):$t(e,r)}function Lt(e,r){var R=r.text.className,A=zt(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,kr(e,r)):R&&(r.text.className=R)}function kr(e,r){bt(e,r),r.line.wrapClass?vt(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var R=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=R||""}function rn(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=vt(r);r.gutterBackground=w("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 Y=r.line.gutterMarkers;if(e.options.lineNumbers||Y){var ie=vt(r),de=r.gutter=w("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),ie.insertBefore(de,r.text),r.line.gutterClass&&(de.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(r.lineNumber=de.appendChild(w("div",ci(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var me=0;me<e.display.gutterSpecs.length;++me){var _e=e.display.gutterSpecs[me].className,Be=Y.hasOwnProperty(_e)&&Y[_e];Be&&de.appendChild(w("div",[Be],"CodeMirror-gutter-elt","left: "+A.gutterLeft[_e]+"px; width: "+A.gutterWidth[_e]+"px"))}}}function an(e,r,R){r.alignable&&(r.alignable=null);for(var A=O("CodeMirror-linewidget"),F=r.node.firstChild,Y=void 0;F;F=Y)Y=F.nextSibling,A.test(F.className)&&r.node.removeChild(F);qr(e,r,R)}function Ar(e,r,R,A){var F=zt(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),kr(e,r),rn(e,r,R,A),qr(e,r,A),r.node}function qr(e,r,R){if(Nr(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)Nr(e,r.rest[A],r,R,!1)}function Nr(e,r,R,A,F){if(!r.widgets)return;for(var Y=vt(R),ie=0,de=r.widgets;ie<de.length;++ie){var me=de[ie],_e=w("div",[me.node],"CodeMirror-linewidget"+(me.className?" "+me.className:""));me.handleMouseEvents||_e.setAttribute("cm-ignore-events","true"),un(me,_e,R,A),e.display.input.setUneditable(_e),F&&me.above?Y.insertBefore(_e,R.gutter||R.text):Y.appendChild(_e),Jt(me,"redraw")}}function un(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 zr(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;"),g(r.display.measure,w("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function cn(e,r){for(var R=Je(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 $n(e){return e.lineSpace.offsetTop}function Ie(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=g(e.measure,w("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 Ye(e){return pe-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-Ye(e)-e.display.barWidth}function ye(e){return e.display.scroller.clientHeight-Ye(e)-e.display.barHeight}function Pe(e,r,R){var A=e.options.lineWrapping,F=A&&Fe(e);if(!r.measure.heights||A&&r.measure.width!=F){var Y=r.measure.heights=[];if(A){r.measure.width=F;for(var ie=r.text.firstChild.getClientRects(),de=0;de<ie.length-1;de++){var me=ie[de],_e=ie[de+1];Math.abs(me.bottom-_e.bottom)>2&&Y.push((me.bottom+_e.top)/2-R.top)}}Y.push(R.bottom-R.top)}}function we(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(Yr(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function je(e,r){r=Ot(r);var R=Yr(r),A=e.display.externalMeasured=new ir(e.doc,r,R);A.lineN=R;var F=A.built=$t(e,A);return A.text=F.pre,g(e.display.lineMeasure,F.pre),A}function ze(e,r,R,A){return qe(e,We(e,r),R,A)}function Xe(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[In(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function We(e,r){var R=Yr(r),A=Xe(e,R);A&&!A.text?A=null:A&&A.changes&&(Zt(e,A,R,Hn(e)),e.curOp.forceUpdate=!0),A||(A=je(e,r));var F=we(A,r,R);return{line:r,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function qe(e,r,R,A,F){r.before&&(R=-1);var Y=R+(A||""),ie;return r.cache.hasOwnProperty(Y)?ie=r.cache[Y]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Pe(e,r.view,r.rect),r.hasHeights=!0),ie=Xt(e,r,R,A),ie.bogus||(r.cache[Y]=ie)),{left:ie.left,right:ie.right,top:F?ie.rtop:ie.top,bottom:F?ie.rbottom:ie.bottom}}var ft={left:0,right:0,top:0,bottom:0};function kt(e,r,R){for(var A,F,Y,ie,de,me,_e=0;_e<e.length;_e+=3)if(de=e[_e],me=e[_e+1],r<de?(F=0,Y=1,ie="left"):r<me?(F=r-de,Y=F+1):(_e==e.length-3||r==me&&e[_e+3]>r)&&(Y=me-de,F=Y-1,r>=me&&(ie="right")),F!=null){if(A=e[_e+2],de==me&&R==(A.insertLeft?"left":"right")&&(ie=R),R=="left"&&F==0)for(;_e&&e[_e-2]==e[_e-3]&&e[_e-1].insertLeft;)A=e[(_e-=3)+2],ie="left";if(R=="right"&&F==me-de)for(;_e<e.length-3&&e[_e+3]==e[_e+4]&&!e[_e+5].insertLeft;)A=e[(_e+=3)+2],ie="right";break}return{node:A,start:F,end:Y,collapse:ie,coverStart:de,coverEnd:me}}function It(e,r){var R=ft;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 Xt(e,r,R,A){var F=kt(r.map,R,A),Y=F.node,ie=F.start,de=F.end,me=F.collapse,_e;if(Y.nodeType==3){for(var Be=0;Be<4;Be++){for(;ie&&ge(r.line.text.charAt(F.coverStart+ie));)--ie;for(;F.coverStart+de<F.coverEnd&&ge(r.line.text.charAt(F.coverStart+de));)++de;if(C&&E<9&&ie==0&&de==F.coverEnd-F.coverStart?_e=Y.parentNode.getBoundingClientRect():_e=It(N(Y,ie,de).getClientRects(),A),_e.left||_e.right||ie==0)break;de=ie,ie=ie-1,me="right"}C&&E<11&&(_e=Pr(e.display.measure,_e))}else{ie>0&&(me=A="right");var $e;e.options.lineWrapping&&($e=Y.getClientRects()).length>1?_e=$e[A=="right"?$e.length-1:0]:_e=Y.getBoundingClientRect()}if(C&&E<9&&!ie&&(!_e||!_e.left&&!_e.right)){var lt=Y.parentNode.getClientRects()[0];lt?_e={left:lt.left,right:lt.left+ri(e.display),top:lt.top,bottom:lt.bottom}:_e=ft}for(var it=_e.top-r.rect.top,Tt=_e.bottom-r.rect.top,Ut=(it+Tt)/2,Yt=r.view.measure.heights,rr=0;rr<Yt.length-1&&!(Ut<Yt[rr]);rr++);var Er=rr?Yt[rr-1]:0,nr=Yt[rr],Sr={left:(me=="right"?_e.right:_e.left)-r.rect.left,right:(me=="left"?_e.left:_e.right)-r.rect.left,top:Er,bottom:nr};return!_e.left&&!_e.right&&(Sr.bogus=!0),e.options.singleCursorHeightPerLine||(Sr.rtop=it,Sr.rbottom=Tt),Sr}function Pr(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ur(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 Gr(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 Kr(e){e.display.externalMeasure=null,v(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Gr(e.display.view[r])}function Qr(e){Kr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Wr(){return n&&y?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function en(){return n&&y?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function tn(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=zr(e.widgets[R]));return r}function pn(e,r,R,A,F){if(!F){var Y=tn(r);R.top+=Y,R.bottom+=Y}if(A=="line")return R;A||(A="local");var ie=or(r);if(A=="local"?ie+=$n(e.display):ie-=e.display.viewOffset,A=="page"||A=="window"){var de=e.display.lineSpace.getBoundingClientRect();ie+=de.top+(A=="window"?0:en());var me=de.left+(A=="window"?0:Wr());R.left+=me,R.right+=me}return R.top+=ie,R.bottom+=ie,R}function on(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=Wr(),F-=en();else if(R=="local"||!R){var Y=e.display.sizer.getBoundingClientRect();A+=Y.left,F+=Y.top}var ie=e.display.lineSpace.getBoundingClientRect();return{left:A-ie.left,top:F-ie.top}}function kn(e,r,R,A,F){return A||(A=cr(e.doc,r.line)),pn(e,A,ze(e,A,r.ch,F),R)}function ln(e,r,R,A,F,Y){A=A||cr(e.doc,r.line),F||(F=We(e,A));function ie(Tt,Ut){var Yt=qe(e,F,Tt,Ut?"right":"left",Y);return Ut?Yt.left=Yt.right:Yt.right=Yt.left,pn(e,A,Yt,R)}var de=mt(A,e.doc.direction),me=r.ch,_e=r.sticky;if(me>=A.text.length?(me=A.text.length,_e="before"):me<=0&&(me=0,_e="after"),!de)return ie(_e=="before"?me-1:me,_e=="before");function Be(Tt,Ut,Yt){var rr=de[Ut],Er=rr.level==1;return ie(Yt?Tt-1:Tt,Er!=Yt)}var $e=ut(de,me,_e),lt=nt,it=Be(me,$e,_e=="before");return lt!=null&&(it.other=Be(me,lt,_e!="before")),it}function Mr(e,r){var R=0;r=W(e.doc,r),e.options.lineWrapping||(R=ri(e.display)*r.ch);var A=cr(e.doc,r.line),F=or(A)+$n(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Fr(e,r,R,A,F){var Y=jt(e,r,R);return Y.xRel=F,A&&(Y.outside=A),Y}function nn(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Fr(A.first,0,null,-1,-1);var F=Un(A,R),Y=A.first+A.size-1;if(F>Y)return Fr(A.first+A.size-1,cr(A,Y).text.length,null,1,1);r<0&&(r=0);for(var ie=cr(A,F);;){var de=Wn(e,ie,F,r,R),me=Wt(ie,de.ch+(de.xRel>0||de.outside>0?1:0));if(!me)return de;var _e=me.find(1);if(_e.line==F)return _e;ie=cr(A,F=_e.line)}}function dn(e,r,R,A){A-=tn(r);var F=r.text.length,Y=Qe(function(ie){return qe(e,R,ie-1).bottom<=A},F,0);return F=Qe(function(ie){return qe(e,R,ie).top>A},Y,F),{begin:Y,end:F}}function wr(e,r,R,A){R||(R=We(e,r));var F=pn(e,r,qe(e,R,A),"line").top;return dn(e,r,R,F)}function bn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function Wn(e,r,R,A,F){F-=or(r);var Y=We(e,r),ie=tn(r),de=0,me=r.text.length,_e=!0,Be=mt(r,e.doc.direction);if(Be){var $e=(e.options.lineWrapping?Mn:wn)(e,r,R,Y,Be,A,F);_e=$e.level!=1,de=_e?$e.from:$e.to-1,me=_e?$e.to:$e.from-1}var lt=null,it=null,Tt=Qe(function(Vr){var Hr=qe(e,Y,Vr);return Hr.top+=ie,Hr.bottom+=ie,bn(Hr,A,F,!1)?(Hr.top<=F&&Hr.left<=A&&(lt=Vr,it=Hr),!0):!1},de,me),Ut,Yt,rr=!1;if(it){var Er=A-it.left<it.right-A,nr=Er==_e;Tt=lt+(nr?0:1),Yt=nr?"after":"before",Ut=Er?it.left:it.right}else{!_e&&(Tt==me||Tt==de)&&Tt++,Yt=Tt==0?"after":Tt==r.text.length?"before":qe(e,Y,Tt-(_e?1:0)).bottom+ie<=F==_e?"after":"before";var Sr=ln(e,jt(R,Tt,Yt),"line",r,Y);Ut=Sr.left,rr=F<Sr.top?-1:F>=Sr.bottom?1:0}return Tt=Oe(r.text,Tt,1),Fr(R,Tt,Yt,rr,A-Ut)}function wn(e,r,R,A,F,Y,ie){var de=Qe(function($e){var lt=F[$e],it=lt.level!=1;return bn(ln(e,jt(R,it?lt.to:lt.from,it?"before":"after"),"line",r,A),Y,ie,!0)},0,F.length-1),me=F[de];if(de>0){var _e=me.level!=1,Be=ln(e,jt(R,_e?me.from:me.to,_e?"after":"before"),"line",r,A);bn(Be,Y,ie,!0)&&Be.top>ie&&(me=F[de-1])}return me}function Mn(e,r,R,A,F,Y,ie){var de=dn(e,r,A,ie),me=de.begin,_e=de.end;/\s/.test(r.text.charAt(_e-1))&&_e--;for(var Be=null,$e=null,lt=0;lt<F.length;lt++){var it=F[lt];if(it.from>=_e||it.to<=me)continue;var Tt=it.level!=1,Ut=qe(e,A,Tt?Math.min(_e,it.to)-1:Math.max(me,it.from)).right,Yt=Ut<Y?Y-Ut+1e9:Ut-Y;(!Be||$e>Yt)&&(Be=it,$e=Yt)}return Be||(Be=F[F.length-1]),Be.from<me&&(Be={from:me,to:Be.to,level:Be.level}),Be.to>_e&&(Be={from:Be.from,to:_e,level:Be.level}),Be}var Tn;function Yn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Tn==null){Tn=w("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Tn.appendChild(document.createTextNode("x")),Tn.appendChild(w("br"));Tn.appendChild(document.createTextNode("x"))}g(e.measure,Tn);var R=Tn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),v(e.measure),R||1}function ri(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=w("span","xxxxxxxxxx"),R=w("pre",[r],"CodeMirror-line-like");g(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Hn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,Y=r.gutters.firstChild,ie=0;Y;Y=Y.nextSibling,++ie){var de=e.display.gutterSpecs[ie].className;R[de]=Y.offsetLeft+Y.clientLeft+F,A[de]=Y.clientWidth}return{fixedPos:di(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var r=Yn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/ri(e.display)-3);return function(F){if(Kt(e.doc,F))return 0;var Y=0;if(F.widgets)for(var ie=0;ie<F.widgets.length;ie++)F.widgets[ie].height&&(Y+=F.widgets[ie].height);return R?Y+(Math.ceil(F.text.length/A)||1)*r:Y+r}}function wi(e){var r=e.doc,R=Xi(e);r.iter(function(A){var F=R(A);F!=A.height&&Vn(A,F)})}function ni(e,r,R,A){var F=e.display;if(!R&&Je(r).getAttribute("cm-not-content")=="true")return null;var Y,ie,de=F.lineSpace.getBoundingClientRect();try{Y=r.clientX-de.left,ie=r.clientY-de.top}catch($e){return null}var me=nn(e,Y,ie),_e;if(A&&me.xRel>0&&(_e=cr(e.doc,me.line).text).length==me.ch){var Be=V(_e,_e.length,e.options.tabSize)-_e.length;me=jt(me.line,Math.max(0,Math.round((Y-Ge(e.display).left)/ri(e.display))-Be))}return me}function In(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(r-=R[A].size,r<0)return A}function Nn(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&&qt(e.doc,r)<F.viewTo&&Bn(e);else if(R<=F.viewFrom)Qn&&Qt(e.doc,R+A)>F.viewFrom?Bn(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Bn(e);else if(r<=F.viewFrom){var Y=Zn(e,R,R+A,1);Y?(F.view=F.view.slice(Y.index),F.viewFrom=Y.lineN,F.viewTo+=A):Bn(e)}else if(R>=F.viewTo){var ie=Zn(e,r,r,-1);ie?(F.view=F.view.slice(0,ie.index),F.viewTo=ie.lineN):Bn(e)}else{var de=Zn(e,r,r,-1),me=Zn(e,R,R+A,1);de&&me?(F.view=F.view.slice(0,de.index).concat(Lr(e,de.lineN,me.lineN)).concat(F.view.slice(me.index)),F.viewTo+=A):Bn(e)}var _e=F.externalMeasured;_e&&(R<_e.lineN?_e.lineN+=A:r<_e.lineN+_e.size&&(F.externalMeasured=null))}function zn(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 Y=A.view[In(e,r)];if(Y.node==null)return;var ie=Y.changes||(Y.changes=[]);he(ie,R)==-1&&ie.push(R)}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,r,R,A){var F=In(e,r),Y,ie=e.display.view;if(!Qn||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var de=e.display.viewFrom,me=0;me<F;me++)de+=ie[me].size;if(de!=r){if(A>0){if(F==ie.length-1)return null;Y=de+ie[F].size-r,F++}else Y=de-r;r+=Y,R+=Y}for(;qt(e.doc,R)!=R;){if(F==(A<0?0:ie.length-1))return null;R+=A*ie[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function Di(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=Lr(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=Lr(e,r,A.viewFrom).concat(A.view):A.viewFrom<r&&(A.view=A.view.slice(In(e,r))),A.viewFrom=r,A.viewTo<R?A.view=A.view.concat(Lr(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,In(e,R)))),A.viewTo=R}function ra(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 An(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ui(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),Y=A.selection=document.createDocumentFragment(),ie=0;ie<R.sel.ranges.length;ie++){if(!r&&ie==R.sel.primIndex)continue;var de=R.sel.ranges[ie];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var me=de.empty();(me||e.options.showCursorWhenSelecting)&&Bi(e,de.head,F),me||On(e,de,Y)}return A}function Bi(e,r,R){var A=ln(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=R.appendChild(w("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 Y=R.appendChild(w("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=A.other.left+"px",Y.style.top=A.other.top+"px",Y.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function Pn(e,r){return e.top-r.top||e.left-r.left}function On(e,r,R){var A=e.display,F=e.doc,Y=document.createDocumentFragment(),ie=Ge(e.display),de=ie.left,me=Math.max(A.sizerWidth,Fe(e)-A.sizer.offsetLeft)-ie.right,_e=F.direction=="ltr";function Be(nr,Sr,Vr,Hr){Sr<0&&(Sr=0),Sr=Math.round(Sr),Hr=Math.round(Hr),Y.appendChild(w("div",null,"CodeMirror-selected","position: absolute; left: "+nr+`px;
top: `+Sr+"px; width: "+(Vr==null?me-nr:Vr)+`px;
height: `+(Hr-Sr)+"px"))}function $e(nr,Sr,Vr){var Hr=cr(F,nr),gn=Hr.text.length,Kn,Ci;function ei(hi,Qi){return kn(e,jt(nr,hi),"div",Hr,Qi)}function ea(hi,Qi,Pi){var Ei=wr(e,Hr,null,hi),fi=Qi=="ltr"==(Pi=="after")?"left":"right",ii=Pi=="after"?Ei.begin:Ei.end-(/\s/.test(Hr.text.charAt(Ei.end-1))?2:1);return ei(ii,fi)[fi]}var Ji=mt(Hr,F.direction);return rt(Ji,Sr||0,Vr==null?gn:Vr,function(hi,Qi,Pi,Ei){var fi=Pi=="ltr",ii=ei(hi,fi?"left":"right"),Zi=ei(Qi-1,fi?"right":"left"),lo=Sr==null&&hi==0,Ua=Vr==null&&Qi==gn,ji=Ei==0,_a=!Ji||Ei==Ji.length-1;if(Zi.top-ii.top<=3){var Si=(_e?lo:Ua)&&ji,ps=(_e?Ua:lo)&&_a,ka=Si?de:(fi?ii:Zi).left,Ga=ps?me:(fi?Zi:ii).right;Be(ka,ii.top,Ga-ka,ii.bottom)}else{var Va,Ki,uo,ms;fi?(Va=_e&&lo&&ji?de:ii.left,Ki=_e?me:ea(hi,Pi,"before"),uo=_e?de:ea(Qi,Pi,"after"),ms=_e&&Ua&&_a?me:Zi.right):(Va=_e?ea(hi,Pi,"before"):de,Ki=!_e&&lo&&ji?me:ii.right,uo=!_e&&Ua&&_a?de:Zi.left,ms=_e?ea(Qi,Pi,"after"):me),Be(Va,ii.top,Ki-Va,ii.bottom),ii.bottom<Zi.top&&Be(de,ii.bottom,null,Zi.top),Be(uo,Zi.top,ms-uo,Zi.bottom)}(!Kn||Pn(ii,Kn)<0)&&(Kn=ii),Pn(Zi,Kn)<0&&(Kn=Zi),(!Ci||Pn(ii,Ci)<0)&&(Ci=ii),Pn(Zi,Ci)<0&&(Ci=Zi)}),{start:Kn,end:Ci}}var lt=r.from(),it=r.to();if(lt.line==it.line)$e(lt.line,lt.ch,it.ch);else{var Tt=cr(F,lt.line),Ut=cr(F,it.line),Yt=Ot(Tt)==Ot(Ut),rr=$e(lt.line,lt.ch,Yt?Tt.text.length+1:null).end,Er=$e(it.line,Yt?0:null,it.ch).start;Yt&&(rr.top<Er.top-2?(Be(rr.right,rr.top,null,rr.bottom),Be(de,Er.top,Er.left,Er.bottom)):Be(rr.right,rr.top,Er.left-rr.right,rr.bottom)),rr.bottom<Er.top&&Be(de,rr.bottom,null,Er.top)}R.appendChild(Y)}function qn(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()||ua(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),la(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ua(e))},100)}function la(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,r),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),qn(e)}function ua(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,r),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pa(e){for(var r=e.display,R=r.lineDiv.offsetTop,A=0;A<r.view.length;A++){var F=r.view[A],Y=e.options.lineWrapping,ie=void 0,de=0;if(F.hidden)continue;if(C&&E<8){var me=F.node.offsetTop+F.node.offsetHeight;ie=me-R,R=me}else{var _e=F.node.getBoundingClientRect();ie=_e.bottom-_e.top,!Y&&F.text.firstChild&&(de=F.text.firstChild.getBoundingClientRect().right-_e.left-1)}var Be=F.line.height-ie;if((Be>.005||Be<-.005)&&(Vn(F.line,ie),Ca(F.line),F.rest))for(var $e=0;$e<F.rest.length;$e++)Ca(F.rest[$e]);if(de>e.display.sizerWidth){var lt=Math.ceil(de/ri(e.display));lt>e.display.maxLineLength&&(e.display.maxLineLength=lt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function Ca(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 La(e,r,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-$n(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,Y=Un(r,A),ie=Un(r,F);if(R&&R.ensure){var de=R.ensure.from.line,me=R.ensure.to.line;de<Y?(Y=de,ie=Un(r,or(cr(r,de))+e.wrapper.clientHeight)):Math.min(me,r.lastLine())>=ie&&(Y=Un(r,or(cr(r,me))-e.wrapper.clientHeight),ie=me)}return{from:Y,to:Math.max(ie,Y+1)}}function Wa(e,r){if(st(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&&!m){var Y=w("div","\u200B",null,`position: absolute;
top: `+(r.top-R.viewOffset-$n(e.display))+`px;
height: `+(r.bottom-r.top+Ye(e)+R.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(F),e.display.lineSpace.removeChild(Y)}}function Xa(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?jt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?jt(r.line,r.ch+1,"before"):r);for(var Y=0;Y<5;Y++){var ie=!1,de=ln(e,r),me=!R||R==r?de:ln(e,R);F={left:Math.min(de.left,me.left),top:Math.min(de.top,me.top)-A,right:Math.max(de.left,me.left),bottom:Math.max(de.bottom,me.bottom)+A};var _e=ca(e,F),Be=e.doc.scrollTop,$e=e.doc.scrollLeft;if(_e.scrollTop!=null&&(ha(e,_e.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(ie=!0)),_e.scrollLeft!=null&&($i(e,_e.scrollLeft),Math.abs(e.doc.scrollLeft-$e)>1&&(ie=!0)),!ie)break}return F}function Ma(e,r){var R=ca(e,r);R.scrollTop!=null&&ha(e,R.scrollTop),R.scrollLeft!=null&&$i(e,R.scrollLeft)}function ca(e,r){var R=e.display,A=Yn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,Y=ye(e),ie={};r.bottom-r.top>Y&&(r.bottom=r.top+Y);var de=e.doc.height+Ie(R),me=r.top<A,_e=r.bottom>de-A;if(r.top<F)ie.scrollTop=me?0:r.top;else if(r.bottom>F+Y){var Be=Math.min(r.top,(_e?de:r.bottom)-Y);Be!=F&&(ie.scrollTop=Be)}var $e=e.options.fixedGutter?0:R.gutters.offsetWidth,lt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-$e,it=Fe(e)-R.gutters.offsetWidth,Tt=r.right-r.left>it;return Tt&&(r.right=r.left+it),r.left<10?ie.scrollLeft=0:r.left<lt?ie.scrollLeft=Math.max(0,r.left+$e-(Tt?0:10)):r.right>it+lt-3&&(ie.scrollLeft=r.right+(Tt?0:10)-it),ie}function Sa(e,r){if(r==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function ba(e){Ea(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function da(e,r,R){(r!=null||R!=null)&&Ea(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){Ea(e),e.curOp.scrollToPos=r}function Ea(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=Mr(e,r.from),A=Mr(e,r.to);Ta(e,R,A,r.margin)}}function Ta(e,r,R,A){var F=ca(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});da(e,F.scrollLeft,F.scrollTop)}function ha(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;T||za(e,{top:r}),fa(e,r,!0),T&&za(e),Ha(e,100)}function fa(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 $i(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,_n(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function na(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+Ie(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+Ye(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var xr=function(e,r,R){this.cm=R;var A=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),De(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),De(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&E<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.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 Y=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"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}},xr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var e=a&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},xr.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),Y=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);Y!=e?e.style.pointerEvents="none":r.set(1e3,A)}r.set(1e3,A)},xr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Cr=function(){};Cr.prototype.update=function(){return{bottom:0,right:0}},Cr.prototype.setScrollLeft=function(){},Cr.prototype.setScrollTop=function(){},Cr.prototype.clear=function(){};function ar(e,r){r||(r=na(e));var R=e.display.barWidth,A=e.display.barHeight;En(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&Pa(e),En(e,na(e)),R=e.display.barWidth,A=e.display.barHeight}function En(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 dr={native:xr,null:Cr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new dr[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),De(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"?$i(e,r):ha(e,r)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var $a=0;function jn(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:++$a},gr(e.curOp)}function Oa(e){var r=e.curOp;r&&Or(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 Y=0;Y<r.length;Y++)ho(r[Y]);for(var ie=0;ie<r.length;ie++)qo(r[ie])}function Jo(e){var r=e.cm,R=r.display;ko(r),e.updateMaxLine&&Dr(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 ia(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&Pa(r),e.barMeasure=na(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=ze(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+Ye(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Fe(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&$i(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==G();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&ar(r,e.barMeasure),e.updatedDisplay&&Ln(r,e.barMeasure),e.selectionChanged&&qn(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Ba(e.cm)}function qo(e){var r=e.cm,R=r.display,A=r.doc;if(e.updatedDisplay&&Ya(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&fa(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&$i(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=Xa(r,W(A,e.scrollToPos.from),W(A,e.scrollToPos.to),e.scrollToPos.margin);Wa(r,F)}var Y=e.maybeHiddenMarkers,ie=e.maybeUnhiddenMarkers;if(Y)for(var de=0;de<Y.length;++de)Y[de].lines.length||Ze(Y[de],"hide");if(ie)for(var me=0;me<ie.length;++me)ie[me].lines.length&&Ze(ie[me],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Wi(e,r){if(e.curOp)return r();jn(e);try{return r()}finally{Oa(e)}}function oi(e,r){return function(){if(e.curOp)return r.apply(e,arguments);jn(e);try{return r.apply(e,arguments)}finally{Oa(e)}}}function ki(e){return function(){if(this.curOp)return e.apply(this,arguments);jn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function si(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);jn(r);try{return e.apply(this,arguments)}finally{Oa(r)}}}function Ha(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,U(es,e))}function es(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Vt(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(Y){if(A.line>=e.display.viewFrom){var ie=Y.styles,de=Y.text.length>e.options.maxHighlightLength?xn(r.mode,A.state):null,me=Ke(e,Y,A,!0);de&&(A.state=de),Y.styles=me.styles;var _e=Y.styleClasses,Be=me.classes;Be?Y.styleClasses=Be:_e&&(Y.styleClasses=null);for(var $e=!ie||ie.length!=Y.styles.length||_e!=Be&&(!_e||!Be||_e.bgClass!=Be.bgClass||_e.textClass!=Be.textClass),lt=0;!$e&&lt<ie.length;++lt)$e=ie[lt]!=Y.styles[lt];$e&&F.push(A.line),Y.stateAfter=A.save(),A.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&vr(e,Y.text,A),Y.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Ha(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Wi(e,function(){for(var Y=0;Y<F.length;Y++)zn(e,F[Y],"text")})}var ia=function(e,r,R){var A=e.display;this.viewport=r,this.visible=La(A,e.doc,r),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=R,this.dims=Hn(e),this.events=[]};ia.prototype.signal=function(e,r){Me(e,r)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function ko(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Ye(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Ye(e)+"px",r.scrollbarsClipped=!0)}function Po(e){if(e.hasFocus())return null;var r=G();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 Lo(e){if(!e||!e.activeElt||e.activeElt==G())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 Aa(e,r){var R=e.display,A=e.doc;if(r.editorIsHidden)return Bn(e),!1;if(!r.force&&r.visible.from>=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ra(e)==0)return!1;yi(e)&&(Bn(e),r.dims=Hn(e));var F=A.first+A.size,Y=Math.max(r.visible.from-e.options.viewportMargin,A.first),ie=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFrom<Y&&Y-R.viewFrom<20&&(Y=Math.max(A.first,R.viewFrom)),R.viewTo>ie&&R.viewTo-ie<20&&(ie=Math.min(F,R.viewTo)),Qn&&(Y=qt(e.doc,Y),ie=Qt(e.doc,ie));var de=Y!=R.viewFrom||ie!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Di(e,Y,ie),R.viewOffset=or(cr(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var me=ra(e);if(!de&&me==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var _e=Po(e);return me>4&&(R.lineDiv.style.display="none"),Mo(e,R.updateLineNumbers,r.dims),me>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Lo(_e),v(R.cursorDiv),v(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,de&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ha(e,400)),R.updateLineNumbers=null,!0}function Ya(e,r){for(var R=r.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||r.oldDisplayWidth==Fe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Ie(e.display)-ye(e),R.top)}),r.visible=La(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else A&&(r.visible=La(e.display,e.doc,R));if(!Aa(e,r))break;Pa(e);var F=na(e);An(e),ar(e,F),Ln(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,r){var R=new ia(e,r);if(Aa(e,R)){Pa(e),Ya(e,R);var A=na(e);An(e),ar(e,A),Ln(e,A),R.finish()}}function Mo(e,r,R){var A=e.display,F=e.options.lineNumbers,Y=A.lineDiv,ie=Y.firstChild;function de(Tt){var Ut=Tt.nextSibling;return l&&a&&e.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Ut}for(var me=A.view,_e=A.viewFrom,Be=0;Be<me.length;Be++){var $e=me[Be];if(!$e.hidden)if(!$e.node||$e.node.parentNode!=Y){var lt=Ar(e,$e,_e,R);Y.insertBefore(lt,ie)}else{for(;ie!=$e.node;)ie=de(ie);var it=F&&r!=null&&r<=_e&&$e.lineNumber;$e.changes&&(he($e.changes,"gutter")>-1&&(it=!1),Zt(e,$e,_e,R)),it&&(v($e.lineNumber),$e.lineNumber.appendChild(document.createTextNode(ci(e.options,_e)))),ie=$e.node.nextSibling}_e+=$e.size}for(;ie;)ie=de(ie)}function Ja(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ln(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Ye(e)+"px"}function _n(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=di(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,Y=A+"px",ie=0;ie<R.length;ie++)if(!R[ie].hidden){e.options.fixedGutter&&(R[ie].gutter&&(R[ie].gutter.style.left=Y),R[ie].gutterBackground&&(R[ie].gutterBackground.style.left=Y));var de=R[ie].alignable;if(de)for(var me=0;me<de.length;me++)de[me].style.left=Y}e.options.fixedGutter&&(r.gutters.style.left=A+F+"px")}function yi(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=ci(e.options,r.first+r.size-1),A=e.display;if(R.length!=A.lineNumChars){var F=A.measure.appendChild(w("div",[w("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=F.firstChild.offsetWidth,ie=F.offsetWidth-Y;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(Y,A.lineGutter.offsetWidth-ie)+1,A.lineNumWidth=A.lineNumInnerWidth+ie,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ja(e.display),!0}return!1}function Hi(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var Y=e[F],ie=null;if(typeof Y!="string"&&(ie=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:Y,style:ie})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function Ia(e){var r=e.gutters,R=e.gutterSpecs;v(r),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],Y=F.className,ie=F.style,de=r.appendChild(w("div",null,"CodeMirror-gutter "+Y));ie&&(de.style.cssText=ie),Y=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ja(e)}function ma(e){Ia(e.display),Nn(e),_n(e)}function Ka(e,r,R,A){var F=this;this.input=R,F.scrollbarFiller=w("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=w("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=M("div",null,"CodeMirror-code"),F.selectionDiv=w("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=w("div",null,"CodeMirror-cursors"),F.measure=w("div",null,"CodeMirror-measure"),F.lineMeasure=w("div",null,"CodeMirror-measure"),F.lineSpace=M("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var Y=M("div",[F.lineSpace],"CodeMirror-lines");F.mover=w("div",[Y],null,"position: relative"),F.sizer=w("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=w("div",null,null,"position: absolute; height: "+pe+"px; width: 1px;"),F.gutters=w("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=w("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=w("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),C&&E<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!l&&!(T&&i)&&(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=Hi(A.gutters,A.lineNumbers),Ia(F),R.init(F)}var xa=0,bi=null;C?bi=-.53:T?bi=15:n?bi=-.7:f&&(bi=-1/3);function Qa(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 fo(e){var r=Qa(e);return r.x*=bi,r.y*=bi,r}function po(e,r){var R=Qa(r),A=R.x,F=R.y,Y=e.display,ie=Y.scroller,de=ie.scrollWidth>ie.clientWidth,me=ie.scrollHeight>ie.clientHeight;if(!(A&&de||F&&me))return;if(F&&a&&l){e:for(var _e=r.target,Be=Y.view;_e!=ie;_e=_e.parentNode)for(var $e=0;$e<Be.length;$e++)if(Be[$e].node==_e){e.display.currentWheelTarget=_e;break e}}if(A&&!T&&!h&&bi!=null){F&&me&&ha(e,Math.max(0,ie.scrollTop+F*bi)),$i(e,Math.max(0,ie.scrollLeft+A*bi)),(!F||F&&me)&&xe(r),Y.wheelStartX=null;return}if(F&&bi!=null){var lt=F*bi,it=e.doc.scrollTop,Tt=it+Y.wrapper.clientHeight;lt<0?it=Math.max(0,it+lt-50):Tt=Math.min(e.doc.height,Tt+lt+50),za(e,{top:it,bottom:Tt})}xa<20&&(Y.wheelStartX==null?(Y.wheelStartX=ie.scrollLeft,Y.wheelStartY=ie.scrollTop,Y.wheelDX=A,Y.wheelDY=F,setTimeout(function(){if(Y.wheelStartX==null)return;var Ut=ie.scrollLeft-Y.wheelStartX,Yt=ie.scrollTop-Y.wheelStartY,rr=Yt&&Y.wheelDY&&Yt/Y.wheelDY||Ut&&Y.wheelDX&&Ut/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!rr)return;bi=(bi*xa+rr)/(xa+1),++xa},200)):(Y.wheelDX+=A,Y.wheelDY+=F))}var zi=function(e,r){this.ranges=e,this.primIndex=r};zi.prototype.primary=function(){return this.ranges[this.primIndex]},zi.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(!ai(R.anchor,A.anchor)||!ai(R.head,A.head))return!1}return!0},zi.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Dn(Oi(this.ranges[r].anchor),Oi(this.ranges[r].head));return new zi(e,this.primIndex)},zi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},zi.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(_r(r,A.from())>=0&&_r(e,A.to())<=0)return R}return-1};var Dn=function(e,r){this.anchor=e,this.head=r};Dn.prototype.from=function(){return Ri(this.anchor,this.head)},Dn.prototype.to=function(){return Ai(this.anchor,this.head)},Dn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(lt,it){return _r(lt.from(),it.from())}),R=he(r,F);for(var Y=1;Y<r.length;Y++){var ie=r[Y],de=r[Y-1],me=_r(de.to(),ie.from());if(A&&!ie.empty()?me>0:me>=0){var _e=Ri(de.from(),ie.from()),Be=Ai(de.to(),ie.to()),$e=de.empty()?ie.from()==ie.head:de.from()==de.head;Y<=R&&--R,r.splice(--Y,2,new Dn($e?Be:_e,$e?_e:Be))}}return new zi(r,R)}function va(e,r){return new zi([new Dn(e,r||e)],0)}function ga(e){return e.text?jt(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(_r(e,r.from)<0)return e;if(_r(e,r.to)<=0)return ga(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+=ga(r).ch-r.to.ch),jt(R,A)}function Za(e,r){for(var R=[],A=0;A<e.sel.ranges.length;A++){var F=e.sel.ranges[A];R.push(new Dn(mo(F.anchor,r),mo(F.head,r)))}return aa(e.cm,R,e.sel.primIndex)}function Io(e,r,R){return e.line==r.line?jt(R.line,e.ch-r.ch+R.ch):jt(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=jt(e.first,0),Y=F,ie=0;ie<r.length;ie++){var de=r[ie],me=Io(de.from,F,Y),_e=Io(ga(de),F,Y);if(F=de.to,Y=_e,R=="around"){var Be=e.sel.ranges[ie],$e=_r(Be.head,Be.anchor)<0;A[ie]=new Dn($e?_e:me,$e?me:_e)}else A[ie]=new Dn(me,me)}return new zi(A,e.sel.primIndex)}function Ra(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,Ha(e,100),e.state.modeGen++,e.curOp&&Nn(e)}function vs(e,r){return r.from.ch==0&&r.to.ch==0&&re(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,r,R,A){function F(Er){return R?R[Er]:null}function Y(Er,nr,Sr){yr(Er,nr,Sr,A),Jt(Er,"change",Er,r)}function ie(Er,nr){for(var Sr=[],Vr=Er;Vr<nr;++Vr)Sr.push(new Ir(_e[Vr],F(Vr),A));return Sr}var de=r.from,me=r.to,_e=r.text,Be=cr(e,de.line),$e=cr(e,me.line),lt=re(_e),it=F(_e.length-1),Tt=me.line-de.line;if(r.full)e.insert(0,ie(0,_e.length)),e.remove(_e.length,e.size-_e.length);else if(vs(e,r)){var Ut=ie(0,_e.length-1);Y($e,$e.text,it),Tt&&e.remove(de.line,Tt),Ut.length&&e.insert(de.line,Ut)}else if(Be==$e)if(_e.length==1)Y(Be,Be.text.slice(0,de.ch)+lt+Be.text.slice(me.ch),it);else{var Yt=ie(1,_e.length-1);Yt.push(new Ir(lt+Be.text.slice(me.ch),it,A)),Y(Be,Be.text.slice(0,de.ch)+_e[0],F(0)),e.insert(de.line+1,Yt)}else if(_e.length==1)Y(Be,Be.text.slice(0,de.ch)+_e[0]+$e.text.slice(me.ch),F(0)),e.remove(de.line+1,Tt);else{Y(Be,Be.text.slice(0,de.ch)+_e[0],F(0)),Y($e,lt+$e.text.slice(me.ch),it);var rr=ie(1,_e.length-1);Tt>1&&e.remove(de.line+1,Tt-1),e.insert(de.line+1,rr)}Jt(e,"change",e,r)}function Na(e,r,R){function A(F,Y,ie){if(F.linked)for(var de=0;de<F.linked.length;++de){var me=F.linked[de];if(me.doc==Y)continue;var _e=ie&&me.sharedHist;if(R&&!_e)continue;r(me.doc,_e),A(me.doc,F,_e)}}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,wi(e),Ra(e),ys(e),e.options.lineWrapping||Dr(e),e.options.mode=r.modeOption,Nn(e)}function ys(e){(e.doc.direction=="rtl"?z:b)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Wi(e,function(){ys(e),Nn(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:Oi(r.from),to:ga(r),text:Gn(e,r.from,r.to)};return xs(e,R,r.from.line,r.to.line+1),Na(e,function(A){return xs(A,R,r.from.line,r.to.line+1)},!0),R}function bs(e){for(;e.length;){var r=re(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),re(e.done);if(e.done.length&&!re(e.done).ranges)return re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var Y=+new Date,ie,de;if((F.lastOp==A||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ie=ml(F,F.lastOp==A)))de=re(ie.changes),_r(r.from,r.to)==0&&_r(r.from,de.to)==0?de.to=ga(r):ie.changes.push(rs(e,r));else{var me=re(F.done);for((!me||!me.ranges)&&Fo(e.sel,F.done),ie={changes:[rs(e,r)],generation:F.generation},F.done.push(ie);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=Y,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,de||Ze(e,"historyAdded")}function vl(e,r,R,A){var F=r.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,A){var F=e.history,Y=A&&A.origin;R==F.lastSelOp||Y&&F.lastSelOrigin==Y&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==Y||vl(e,Y,re(F.done),r))?F.done[F.done.length-1]=r:Fo(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=Y,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,r){var R=re(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],Y=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(ie){ie.markedSpans&&((F||(F=r["spans_"+e.id]={}))[Y]=ie.markedSpans),++Y})}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=Ii(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var Y=R[F],ie=A[F];if(Y&&ie){e:for(var de=0;de<ie.length;++de){for(var me=ie[de],_e=0;_e<Y.length;++_e)if(Y[_e].marker==me.marker)continue e;Y.push(me)}}else ie&&(R[F]=ie)}return R}function qa(e,r,R){for(var A=[],F=0;F<e.length;++F){var Y=e[F];if(Y.ranges){A.push(R?zi.prototype.deepCopy.call(Y):Y);continue}var ie=Y.changes,de=[];A.push({changes:de});for(var me=0;me<ie.length;++me){var _e=ie[me],Be=void 0;if(de.push({from:_e.from,to:_e.to,text:_e.text}),r)for(var $e in _e)(Be=$e.match(/^spans_(\d+)$/))&&(he(r,Number(Be[1]))>-1&&(re(de)[$e]=_e[$e],delete _e[$e]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var Y=_r(r,F)<0;Y!=_r(R,F)<0?(F=r,r=R):Y!=_r(r,R)<0&&(r=R)}return new Dn(F,r)}else return new Dn(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ni(e,new zi([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),Y=0;Y<e.sel.ranges.length;Y++)A[Y]=ns(e.sel.ranges[Y],r[Y],null,F);var ie=aa(e.cm,A,e.sel.primIndex);Ni(e,ie,R)}function is(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,Ni(e,aa(e.cm,F,e.sel.primIndex),A)}function Cs(e,r,R,A){Ni(e,va(r,R),A)}function El(e,r,R){var A={ranges:r.ranges,update:function(F){this.ranges=[];for(var Y=0;Y<F.length;Y++)this.ranges[Y]=new Dn(W(e,F[Y].anchor),W(e,F[Y].head))},origin:R&&R.origin};return Ze(e,"beforeSelectionChange",e,A),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=r.ranges?aa(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=re(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):Ni(e,r,R)}function Ni(e,r,R){Bo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,r,R){(Me(e,"beforeSelectionChange")||e.cm&&Me(e.cm,"beforeSelectionChange"))&&(r=El(e,r,R));var A=R&&R.bias||(_r(r.primary().head,e.sel.primary().head)<0?-1:1);Ts(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&ba(e.cm)}function Ts(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ue(e.cm)),Jt(e,"cursorActivity",e)}function Os(e){Ts(e,As(e,e.sel,null,!1))}function As(e,r,R,A){for(var F,Y=0;Y<r.ranges.length;Y++){var ie=r.ranges[Y],de=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],me=Wo(e,ie.anchor,de&&de.anchor,R,A),_e=Wo(e,ie.head,de&&de.head,R,A);(F||me!=ie.anchor||_e!=ie.head)&&(F||(F=r.ranges.slice(0,Y)),F[Y]=new Dn(me,_e))}return F?aa(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var Y=cr(e,r.line);if(Y.markedSpans)for(var ie=0;ie<Y.markedSpans.length;++ie){var de=Y.markedSpans[ie],me=de.marker,_e="selectLeft"in me?!me.selectLeft:me.inclusiveLeft,Be="selectRight"in me?!me.selectRight:me.inclusiveRight;if((de.from==null||(_e?de.from<=r.ch:de.from<r.ch))&&(de.to==null||(Be?de.to>=r.ch:de.to>r.ch))){if(F&&(Ze(me,"beforeCursorEnter"),me.explicitlyCleared))if(Y.markedSpans){--ie;continue}else break;if(!me.atomic)continue;if(R){var $e=me.find(A<0?1:-1),lt=void 0;if((A<0?Be:_e)&&($e=Rs(e,$e,-A,$e&&$e.line==r.line?Y:null)),$e&&$e.line==r.line&&(lt=_r($e,R))&&(A<0?lt<0:lt>0))return eo(e,$e,r,A,F)}var it=me.find(A<0?-1:1);return(A<0?_e:Be)&&(it=Rs(e,it,A,it.line==r.line?Y:null)),it?eo(e,it,r,A,F):null}}return r}function Wo(e,r,R,A,F){var Y=A||1,ie=eo(e,r,R,Y,F)||!F&&eo(e,r,R,Y,!0)||eo(e,r,R,-Y,F)||!F&&eo(e,r,R,-Y,!0);return ie||(e.cantEdit=!0,jt(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?W(e,jt(r.line-1)):null:R>0&&r.ch==(A||cr(e,r.line)).text.length?r.line<e.first+e.size-1?jt(r.line+1,0):null:new jt(r.line,r.ch+R)}function Ds(e){e.setSelection(jt(e.firstLine(),0),jt(e.lastLine()),ke)}function ks(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,Y,ie,de){F&&(A.from=W(e,F)),Y&&(A.to=W(e,Y)),ie&&(A.text=ie),de!==void 0&&(A.origin=de)}),Ze(e,"beforeChange",e,A),e.cm&&Ze(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function to(e,r,R){if(e.cm){if(!e.cm.curOp)return oi(e.cm,to)(e,r,R);if(e.cm.state.suppressEdits)return}if((Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"))&&(r=ks(e,r,!0),!r))return;var A=qi&&!R&&Vi(e,r.from,r.to);if(A)for(var F=A.length-1;F>=0;--F)Ps(e,{from:A[F].from,to:A[F].to,text:F?[""]:r.text,origin:r.origin});else Ps(e,r)}function Ps(e,r){if(r.text.length==1&&r.text[0]==""&&_r(r.from,r.to)==0)return;var R=Za(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),go(e,r,R,Ii(e,r));var A=[];Na(e,function(F,Y){!Y&&he(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),go(F,r,null,Ii(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,Y,ie=e.sel,de=r=="undo"?F.done:F.undone,me=r=="undo"?F.undone:F.done,_e=0;_e<de.length&&!(Y=de[_e],R?Y.ranges&&!Y.equals(e.sel):!Y.ranges);_e++);if(_e==de.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(Y=de.pop(),Y.ranges){if(Fo(Y,me),R&&!Y.equals(e.sel)){Ni(e,Y,{clearRedo:!1});return}ie=Y}else if(A){de.push(Y);return}else break;var Be=[];Fo(ie,me),me.push({changes:Be,generation:F.generation}),F.generation=Y.generation||++F.maxGeneration;for(var $e=Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"),lt=function(Ut){var Yt=Y.changes[Ut];if(Yt.origin=r,$e&&!ks(e,Yt,!1))return de.length=0,{};Be.push(rs(e,Yt));var rr=Ut?Za(e,Yt):re(de);go(e,Yt,rr,_s(e,Yt)),!Ut&&e.cm&&e.cm.scrollIntoView({from:Yt.from,to:ga(Yt)});var Er=[];Na(e,function(nr,Sr){!Sr&&he(Er,nr.history)==-1&&(Ns(nr.history,Yt),Er.push(nr.history)),go(nr,Yt,null,_s(nr,Yt))})},it=Y.changes.length-1;it>=0;--it){var Tt=lt(it);if(Tt)return Tt.v}}function Ls(e,r){if(r==0)return;if(e.first+=r,e.sel=new zi(fe(e.sel.ranges,function(F){return new Dn(jt(F.anchor.line+r,F.anchor.ch),jt(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){Nn(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)zn(e.cm,A,"gutter")}}function go(e,r,R,A){if(e.cm&&!e.cm.curOp)return oi(e.cm,go)(e,r,R,A);if(r.to.line<e.first){Ls(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);Ls(e,F),r={from:jt(e.first,0),to:jt(r.to.line+F,r.to.ch),text:[re(r.text)],origin:r.origin}}var Y=e.lastLine();r.to.line>Y&&(r={from:r.from,to:jt(Y,cr(e,Y).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Gn(e,r.from,r.to),R||(R=Za(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,ke),e.cantEdit&&Wo(e,jt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,Y=r.from,ie=r.to,de=!1,me=Y.line;e.options.lineWrapping||(me=Yr(Ot(cr(A,Y.line))),A.iter(me,ie.line+1,function(it){if(it==F.maxLine)return de=!0,!0})),A.sel.contains(r.from,r.to)>-1&&Ue(e),ts(A,r,R,Xi(e)),e.options.lineWrapping||(A.iter(me,Y.line+r.text.length,function(it){var Tt=ot(it);Tt>F.maxLineLength&&(F.maxLine=it,F.maxLineLength=Tt,F.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),Li(A,Y.line),Ha(e,400);var _e=r.text.length-(ie.line-Y.line)-1;r.full?Nn(e):Y.line==ie.line&&r.text.length==1&&!vs(e.doc,r)?zn(e,Y.line,"text"):Nn(e,Y.line,ie.line+1,_e);var Be=Me(e,"changes"),$e=Me(e,"change");if($e||Be){var lt={from:Y,to:ie,text:r.text,removed:r.removed,origin:r.origin};$e&&Jt(e,"change",e,lt),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(lt)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var Y;A||(A=R),_r(A,R)<0&&(Y=[A,R],R=Y[0],A=Y[1]),typeof r=="string"&&(r=e.splitLines(r)),to(e,{from:R,to:A,text:r,origin:F})}function Ms(e,r,R,A){R<e.line?e.line+=A:r<e.line&&(e.line=r,e.ch=0)}function Is(e,r,R,A){for(var F=0;F<e.length;++F){var Y=e[F],ie=!0;if(Y.ranges){Y.copied||(Y=e[F]=Y.deepCopy(),Y.copied=!0);for(var de=0;de<Y.ranges.length;de++)Ms(Y.ranges[de].anchor,r,R,A),Ms(Y.ranges[de].head,r,R,A);continue}for(var me=0;me<Y.changes.length;++me){var _e=Y.changes[me];if(R<_e.from.line)_e.from=jt(_e.from.line+A,_e.from.ch),_e.to=jt(_e.to.line+A,_e.to.ch);else if(r<=_e.to.line){ie=!1;break}}ie||(e.splice(0,F+1),F=0)}}function Ns(e,r){var R=r.from.line,A=r.to.line,F=r.text.length-(A-R)-1;Is(e.done,R,A,F),Is(e.undone,R,A,F)}function yo(e,r,R,A){var F=r,Y=r;return typeof r=="number"?Y=cr(e,se(e,r)):F=Yr(r),F==null?null:(A(Y,F)&&e.cm&&zn(e.cm,F,R),Y)}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,er(F),Jt(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 Y=Math.min(r,F-e),ie=A.height;if(A.removeInner(e,Y),this.height-=ie-A.height,F==Y&&(this.children.splice(R--,1),A.parent=null),(r-=Y)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var de=[];this.collapse(de),this.children=[new bo(de)],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],Y=F.chunkSize();if(e<=Y){if(F.insertInner(e,r,R),F.lines&&F.lines.length>50){for(var ie=F.lines.length%25+25,de=ie;de<F.lines.length;){var me=new bo(F.lines.slice(de,de+=25));F.height-=me.height,this.children.splice(++A,0,me),me.parent=this}F.lines=F.lines.slice(0,ie),this.maybeSpill()}break}e-=Y}},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=he(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],Y=F.chunkSize();if(e<Y){var ie=Math.min(r,Y-e);if(F.iterN(e,ie,R))return!0;if((r-=ie)==0)break;e=0}else e-=Y}}};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=Yr(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 Y=zr(this);Vn(R,Math.max(0,R.height-Y)),e&&(Wi(e,function(){js(e,R,-Y),zn(e,A,"widget")}),Jt(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=zr(this)-r;if(!F)return;Kt(this.doc,A)||Vn(A,A.height+F),R&&Wi(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Jt(R,"lineWidgetChanged",R,e,Yr(A))})},Ne(xo);function js(e,r,R){or(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,R)}function _l(e,r,R,A){var F=new xo(e,R,A),Y=e.cm;return Y&&F.noHScroll&&(Y.display.alignWidgets=!0),yo(e,r,"widget",function(ie){var de=ie.widgets||(ie.widgets=[]);if(F.insertAt==null?de.push(F):de.splice(Math.min(de.length-1,Math.max(0,F.insertAt)),0,F),F.line=ie,Y&&!Kt(e,ie)){var me=or(ie)<e.scrollTop;Vn(ie,ie.height+zr(F)),me&&Sa(Y,F.height),Y.curOp.forceUpdate=!0}return!0}),Y&&Jt(Y,"lineWidgetAdded",Y,F,typeof r=="number"?r:Yr(r)),F}var Fs=0,ja=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&jn(e),Me(this,"clear")){var R=this.find();R&&Jt(this,"clear",R.from,R.to)}for(var A=null,F=null,Y=0;Y<this.lines.length;++Y){var ie=this.lines[Y],de=gi(ie.markedSpans,this);e&&!this.collapsed?zn(e,Yr(ie),"text"):e&&(de.to!=null&&(F=Yr(ie)),de.from!=null&&(A=Yr(ie))),ie.markedSpans=Gi(ie.markedSpans,de),de.from==null&&this.collapsed&&!Kt(this.doc,ie)&&e&&Vn(ie,Yn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var me=0;me<this.lines.length;++me){var _e=Ot(this.lines[me]),Be=ot(_e);Be>e.display.maxLineLength&&(e.display.maxLine=_e,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Nn(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&&Jt(e,"markerCleared",e,this,A,F),r&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F<this.lines.length;++F){var Y=this.lines[F],ie=gi(Y.markedSpans,this);if(ie.from!=null&&(R=jt(r?Y:Yr(Y),ie.from),e==-1))return R;if(ie.to!=null&&(A=jt(r?Y:Yr(Y),ie.to),e==1))return A}return R&&{from:R,to:A}},ja.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,A=this.doc.cm;if(!r||!A)return;Wi(A,function(){var F=r.line,Y=Yr(r.line),ie=Xe(A,Y);if(ie&&(Gr(ie),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Kt(R.doc,F)&&R.height!=null){var de=R.height;R.height=null;var me=zr(R)-de;me&&Vn(F,F.height+me)}Jt(A,"markerChanged",A,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||he(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(he(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Ne(ja);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 oi(e.cm,no)(e,r,R,A,F);var Y=new ja(e,F),ie=_r(r,R);if(A&&B(A,Y,!1),ie>0||ie==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=M("span",[Y.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(ct(e,r.line,r,R,Y)||r.line!=R.line&&ct(e,R.line,r,R,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");vi()}Y.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var de=r.line,me=e.cm,_e;if(e.iter(de,R.line+1,function($e){me&&Y.collapsed&&!me.options.lineWrapping&&Ot($e)==me.display.maxLine&&(_e=!0),Y.collapsed&&de!=r.line&&Vn($e,0),Mi($e,new Fi(Y,de==r.line?r.ch:null,de==R.line?R.ch:null)),++de}),Y.collapsed&&e.iter(r.line,R.line+1,function($e){Kt(e,$e)&&Vn($e,0)}),Y.clearOnEnter&&De(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(_i(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Fs,Y.atomic=!0),me){if(_e&&(me.curOp.updateMaxLine=!0),Y.collapsed)Nn(me,r.line,R.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var Be=r.line;Be<=R.line;Be++)zn(me,Be,"text");Y.atomic&&Os(me.doc),Jt(me,"markerAdded",me,Y)}return Y}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();Jt(this,"clear")},_o.prototype.find=function(e,r){return this.primary.find(e,r)},Ne(_o);function wl(e,r,R,A,F){A=B(A),A.shared=!1;var Y=[no(e,r,R,A,F)],ie=Y[0],de=A.widgetNode;return Na(e,function(me){de&&(A.widgetNode=de.cloneNode(!0)),Y.push(no(me,W(me,r),W(me,R),A,F));for(var _e=0;_e<me.linked.length;++_e)if(me.linked[_e].isParent)return;ie=re(Y)}),new _o(Y,ie)}function Us(e){return e.findMarks(jt(e.first,0),e.clipPos(jt(e.lastLine())),function(r){return r.parent})}function Cl(e,r){for(var R=0;R<r.length;R++){var A=r[R],F=A.find(),Y=e.clipPos(F.from),ie=e.clipPos(F.to);if(_r(Y,ie)){var de=no(e,Y,ie,A.primary,A.primary.type);A.markers.push(de),de.parent=A}}}function Sl(e){for(var r=function(A){var F=e[A],Y=[F.primary.doc];Na(F.primary.doc,function(me){return Y.push(me)});for(var ie=0;ie<F.markers.length;ie++){var de=F.markers[ie];he(Y,de.doc)==-1&&(de.parent=null,F.markers.splice(ie--,1))}},R=0;R<e.length;R++)r(R)}var Tl=0,Yi=function(e,r,R,A,F){if(!(this instanceof Yi))return new Yi(e,r,R,A,F);R==null&&(R=0),Eo.call(this,[new bo([new Ir("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var Y=jt(R,0);this.sel=va(Y),this.history=new jo(null),this.id=++Tl,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:Y,to:Y,text:e}),Ni(this,va(Y),ke)};Yi.prototype=Ce(Eo.prototype,{constructor:Yi,iter:function(e,r,R){R?this.iterN(e-this.first,r-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var R=0,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=pi(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:si(function(e){var r=jt(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:jt(R,cr(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&da(this.cm,0,0),Ni(this,va(r),ke)}),replaceRange:function(e,r,R,A){r=W(this,r),R=R?W(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=Gn(this,W(this,e),W(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(ui(this,e))return cr(this,e)},getLineNumber:function(e){return Yr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=cr(this,e)),Ot(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return W(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:si(function(e,r,R){Cs(this,W(this,typeof e=="number"?jt(e,r||0):e),null,R)}),setSelection:si(function(e,r,R){Cs(this,W(this,e),W(this,r||e),R)}),extendSelection:si(function(e,r,R){Uo(this,W(this,e),r&&W(this,r),R)}),extendSelections:si(function(e,r){ws(this,ne(this,e),r)}),extendSelectionsBy:si(function(e,r){var R=fe(this.sel.ranges,e);ws(this,ne(this,R),r)}),setSelections:si(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new Dn(W(this,e[F].anchor),W(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ni(this,aa(this.cm,A,r),R)}),addSelection:si(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new Dn(W(this,e),W(this,r||e))),Ni(this,aa(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=Gn(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=Gn(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:si(function(e,r,R){for(var A=[],F=this.sel,Y=0;Y<F.ranges.length;Y++){var ie=F.ranges[Y];A[Y]={from:ie.from(),to:ie.to(),text:this.splitLines(e[Y]),origin:R}}for(var de=r&&r!="end"&&No(this,A,r),me=A.length-1;me>=0;me--)to(this,A[me]);de?Ss(this,de):this.cm&&ba(this.cm)}),undo:si(function(){Ho(this,"undo")}),redo:si(function(){Ho(this,"redo")}),undoSelection:si(function(){Ho(this,"undo",!0)}),redoSelection:si(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),Na(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:qa(this.history.done),undone:qa(this.history.undone)}},setHistory:function(e){var r=this.history=new jo(this.history.maxGeneration);r.done=qa(e.done.slice(0),null,!0),r.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:si(function(e,r,R){return yo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[r]=R,!R&&Q(F)&&(A.gutterMarkers=null),!0})}),clearGutter:si(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&yo(r,R,"gutter",function(){return R.gutterMarkers[e]=null,Q(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!ui(this,e))return null;if(r=e,e=cr(this,e),!e)return null}else if(r=Yr(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:si(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:si(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",Y=A[F];if(Y)if(R==null)A[F]=null;else{var ie=Y.match(O(R));if(!ie)return!1;var de=ie.index+ie[0].length;A[F]=Y.slice(0,ie.index)+(!ie.index||de==Y.length?"":" ")+Y.slice(de)||null}else return!1;return!0})}),addLineWidget:si(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,W(this,e),W(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=W(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=W(this,e);var r=[],R=cr(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=W(this,e),r=W(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(Y){var ie=Y.markedSpans;if(ie)for(var de=0;de<ie.length;de++){var me=ie[de];!(me.to!=null&&F==e.line&&e.ch>=me.to||me.from==null&&F!=e.line||me.from!=null&&F==r.line&&me.from>=r.ch)&&(!R||R(me.marker))&&A.push(me.marker.parent||me.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 Y=F.text.length+A;if(Y>e)return r=e,!0;e-=Y,++R}),W(this,jt(R,r))},indexFromPos:function(e){e=W(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 Yi(pi(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 Yi(pi(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}],Cl(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof Jn&&(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];Na(e,function(F){return A.push(F.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,A),e.history.undone=qa(this.history.undone,A)}},iterLinkedDocs:function(e){Na(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):hr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:si(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&pl(this.cm)})}),Yi.prototype.eachLine=Yi.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),st(r,e)||cn(r.display,e))return;xe(e),C&&(Bs=+new Date);var R=ni(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,Y=Array(F),ie=0,de=function(){++ie==F&&oi(r,function(){R=W(r.doc,R);var it={from:R,to:R,text:r.doc.splitLines(Y.filter(function(Tt){return Tt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,it),Ss(r.doc,va(W(r.doc,R),W(r.doc,ga(it))))})()},me=function(it,Tt){if(r.options.allowDropFileTypes&&he(r.options.allowDropFileTypes,it.type)==-1){de();return}var Ut=new FileReader;Ut.onerror=function(){return de()},Ut.onload=function(){var Yt=Ut.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Yt)){de();return}Y[Tt]=Yt,de()},Ut.readAsText(it)},_e=0;_e<A.length;_e++)me(A[_e],_e);else{if(r.state.draggingText&&r.doc.sel.contains(R)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var $e;if(r.state.draggingText&&!r.state.draggingText.copy&&($e=r.listSelections()),Bo(r.doc,va(R,R)),$e)for(var lt=0;lt<$e.length;++lt)ro(r.doc,"",$e[lt].anchor,$e[lt].head,"drag");r.replaceSelection(Be,"around","paste"),r.display.input.focus()}}catch(it){}}}function Al(e,r){if(C&&(!e.state.draggingText||+new Date-Bs<100)){Le(r);return}if(st(e,r)||cn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!f){var R=w("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),h&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=ni(e,r);if(!R)return;var A=document.createDocumentFragment();Bi(e,R,A),e.display.dragCursor||(e.display.dragCursor=w("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),g(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 Y=0;Y<R.length;Y++)e(R[Y])})}var zs=!1;function Dl(){if(zs)return;kl(),zs=!0}function kl(){var e;De(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Pl)},100))}),De(window,"blur",function(){return Hs(ua)})}function Pl(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var Fa={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++)Fa[wo+48]=Fa[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)Fa[zo]=String.fromCharCode(zo);for(var Co=1;Co<=12;Co++)Fa[Co+111]=Fa[Co+63235]="F"+Co;var Da={};Da.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"},Da.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"},Da.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"},Da.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"]},Da.default=a?Da.macDefault:Da.pcDefault;function Ll(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,Y,ie=0;ie<r.length-1;ie++){var de=r[ie];if(/^(cmd|meta|m)$/i.test(de))Y=!0;else if(/^a(lt)?$/i.test(de))R=!0;else if(/^(c|ctrl|control)$/i.test(de))A=!0;else if(/^s(hift)?$/i.test(de))F=!0;else throw new Error("Unrecognized modifier name: "+de)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Ml(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=fe(R.split(" "),Ll),Y=0;Y<F.length;Y++){var ie=void 0,de=void 0;Y==F.length-1?(de=F.join(" "),ie=A):(de=F.slice(0,Y+1).join(" "),ie="...");var me=r[de];if(!me)r[de]=ie;else if(me!=ie)throw new Error("Inconsistent bindings for "+de)}delete e[R]}for(var _e in r)e[_e]=r[_e];return e}function io(e,r,R,A){r=Ko(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 io(e,r.fallthrough,R,A);for(var Y=0;Y<r.fallthrough.length;Y++){var ie=io(e,r.fallthrough[Y],R,A);if(ie)return ie}}}function Ks(e){var r=typeof e=="string"?e:Fa[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),(o?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(o?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Vs(e,r){if(h&&e.keyCode==34&&e.char)return!1;var R=Fa[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,r))}function Ko(e){return typeof e=="string"?Da[e]:e}function ao(e,r){for(var R=e.doc.sel.ranges,A=[],F=0;F<R.length;F++){for(var Y=r(R[F]);A.length&&_r(Y.from,re(A).to)<=0;){var ie=A.pop();if(_r(ie.from,Y.from)<0){Y.from=ie.from;break}}A.push(Y)}Wi(e,function(){for(var de=A.length-1;de>=0;de--)ro(e.doc,"",A[de].from,A[de].to,"+delete");ba(e)})}function as(e,r,R){var A=Oe(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=as(e,r.ch,R);return A==null?null:new jt(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var Y=mt(R,r.doc.direction);if(Y){var ie=F<0?re(Y):Y[0],de=F<0==(ie.level==1),me=de?"after":"before",_e;if(ie.level>0||r.doc.direction=="rtl"){var Be=We(r,R);_e=F<0?R.text.length-1:0;var $e=qe(r,Be,_e).top;_e=Qe(function(lt){return qe(r,Be,lt).top==$e},F<0==(ie.level==1)?ie.from:ie.to-1,_e),me=="before"&&(_e=as(R,_e,1))}else _e=F<0?ie.to:ie.from;return new jt(A,_e,me)}}return new jt(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,r,R,A){var F=mt(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 Y=ut(F,R.ch,R.sticky),ie=F[Y];if(e.doc.direction=="ltr"&&ie.level%2==0&&(A>0?ie.to>R.ch:ie.from<R.ch))return os(r,R,A);var de=function(rr,Er){return as(r,rr instanceof jt?rr.ch:rr,Er)},me,_e=function(rr){return e.options.lineWrapping?(me=me||We(e,r),wr(e,r,me,rr)):{begin:0,end:r.text.length}},Be=_e(R.sticky=="before"?de(R,-1):R.ch);if(e.doc.direction=="rtl"||ie.level==1){var $e=ie.level==1==A<0,lt=de(R,$e?1:-1);if(lt!=null&&($e?lt<=ie.to&&lt<=Be.end:lt>=ie.from&&lt>=Be.begin)){var it=$e?"before":"after";return new jt(R.line,lt,it)}}var Tt=function(rr,Er,nr){for(var Sr=function(Kn,Ci){return Ci?new jt(R.line,de(Kn,1),"before"):new jt(R.line,Kn,"after")};rr>=0&&rr<F.length;rr+=Er){var Vr=F[rr],Hr=Er>0==(Vr.level!=1),gn=Hr?nr.begin:de(nr.end,-1);if(Vr.from<=gn&&gn<Vr.to)return Sr(gn,Hr);if(gn=Hr?Vr.from:de(Vr.to,-1),nr.begin<=gn&&gn<nr.end)return Sr(gn,Hr)}},Ut=Tt(Y+A,A,Be);if(Ut)return Ut;var Yt=A>0?Be.end:de(Be.begin,-1);return Yt!=null&&!(A>0&&Yt==r.text.length)&&(Ut=Tt(A>0?0:F.length-1,A,_e(Yt)),Ut)?Ut:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return ao(e,function(r){if(r.empty()){var R=cr(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:jt(r.head.line+1,0)}:{from:r.head,to:jt(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return ao(e,function(r){return{from:jt(r.from().line,0),to:W(e.doc,jt(r.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(r){return{from:jt(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return ao(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 ao(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(jt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(jt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Xs(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")},Te)},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")},Te)},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},Te)},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 Y=R[F].from(),ie=V(e.getLine(Y.line),Y.ch,A);r.push(le(A-ie%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Wi(e,function(){for(var r=e.listSelections(),R=[],A=0;A<r.length;A++){if(!r[A].empty())continue;var F=r[A].head,Y=cr(e.doc,F.line).text;if(Y){if(F.ch==Y.length&&(F=new jt(F.line,F.ch-1)),F.ch>0)F=new jt(F.line,F.ch+1),e.replaceRange(Y.charAt(F.ch-1)+Y.charAt(F.ch-2),jt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var ie=cr(e.doc,F.line-1).text;ie&&(F=new jt(F.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),jt(F.line-1,ie.length-1),F,"+transpose"))}}R.push(new Dn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Wi(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);ba(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,r){var R=cr(e.doc,r),A=Ot(R);return A!=R&&(r=Yr(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=cr(e.doc,r),A=Rt(R);return A!=R&&(r=Yr(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Xs(e,r.line),A=cr(e.doc,R.line),F=mt(A,e.doc.direction);if(!F||F[0].level==0){var Y=Math.max(R.ch,A.text.search(/\S/)),ie=r.line==R.line&&r.ch<=Y&&r.ch;return jt(R.line,ie?0:Y,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)!=Re}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=io(r,e.state.keyMaps[A],R,e);if(F)return F}return e.options.extraKeys&&io(r,e.options.extraKeys,R,e)||io(r,e.options.keyMap,R,e)}var Fl=new ae;function To(e,r,R,A){var F=e.state.keySeq;if(F){if(Ks(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"&&Jt(e,"keyHandled",e,r,R),(F=="handled"||F=="multi")&&(xe(R),qn(e)),!!F}function Js(e,r){var R=Vs(r,!0);return R?r.shiftKey&&!e.state.keySeq?To(e,"Shift-"+R,r,function(A){return Go(e,A,!0)})||To(e,R,r,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):To(e,R,r,function(A){return Go(e,A)}):!1}function Ul(e,r,R){return To(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=G(),st(r,e))return;C&&E<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);h&&(ls=A?R:null,!A&&R==88&&!$r&&(a?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),T&&!a&&!A&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Bl(r)}function Bl(e){var r=e.display.lineDiv;z(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(b(r,"CodeMirror-crosshair"),ht(document,"keyup",R),ht(document,"mouseover",R))}De(document,"keyup",R),De(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(cn(r.display,e)||st(r,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(h&&R==ls){ls=null,xe(e);return}if(h&&(!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&&_r(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(st(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,cn(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=ni(r,e),F=Ve(e),Y=A?Hl(A,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),A&&zl(r,F,A,Y,e))return;F==1?A?Gl(r,A,Y,e):Je(e)==R.scroller&&xe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(k?r.display.input.onContextMenu(e):wa(r))}function zl(e,r,R,A,F){var Y="Click";return A=="double"?Y="Double"+Y:A=="triple"&&(Y="Triple"+Y),Y=(r==1?"Left":r==2?"Middle":"Right")+Y,To(e,Gs(Y,F),F,function(ie){if(typeof ie=="string"&&(ie=So[ie]),!ie)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ie(e,R)!=Re}finally{e.state.suppressEdits=!1}return de})}function Kl(e,r,R){var A=e.getOption("configureMouse"),F=A?A(e,r,R):{};if(F.unit==null){var Y=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=Y?"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=a?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(a?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){C?setTimeout(U(Ba,e),0):e.curOp.focus=G();var F=Kl(e,R,A),Y=e.doc.sel,ie;e.options.dragDrop&&gt&&!e.isReadOnly()&&R=="single"&&(ie=Y.contains(r))>-1&&(_r((ie=Y.ranges[ie]).from(),r)<0||r.xRel>0)&&(_r(ie.to(),r)>0||r.xRel<0)?Vl(e,A,r,F):Xl(e,A,r,F)}function Vl(e,r,R,A){var F=e.display,Y=!1,ie=oi(e,function(_e){l&&(F.scroller.draggable=!1),e.state.draggingText=!1,ht(F.wrapper.ownerDocument,"mouseup",ie),ht(F.wrapper.ownerDocument,"mousemove",de),ht(F.scroller,"dragstart",me),ht(F.scroller,"drop",ie),Y||(xe(_e),A.addNew||Uo(e.doc,R,null,null,A.extend),l&&!f||C&&E==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),de=function(_e){Y=Y||Math.abs(r.clientX-_e.clientX)+Math.abs(r.clientY-_e.clientY)>=10},me=function(){return Y=!0};l&&(F.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),De(F.wrapper.ownerDocument,"mouseup",ie),De(F.wrapper.ownerDocument,"mousemove",de),De(F.scroller,"dragstart",me),De(F.scroller,"drop",ie),wa(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new Dn(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new Dn(jt(r.line,0),W(e.doc,jt(r.line+1,0)));var A=R(e,r);return new Dn(A.from,A.to)}function Xl(e,r,R,A){var F=e.display,Y=e.doc;xe(r);var ie,de,me=Y.sel,_e=me.ranges;if(A.addNew&&!A.extend?(de=Y.sel.contains(R),de>-1?ie=_e[de]:ie=new Dn(R,R)):(ie=Y.sel.primary(),de=Y.sel.primIndex),A.unit=="rectangle")A.addNew||(ie=new Dn(R,R)),R=ni(e,r,!0,!0),de=-1;else{var Be=rl(e,R,A.unit);A.extend?ie=ns(ie,Be.anchor,Be.head,A.extend):ie=Be}A.addNew?de==-1?(de=_e.length,Ni(Y,aa(e,_e.concat([ie]),de),{scroll:!1,origin:"*mouse"})):_e.length>1&&_e[de].empty()&&A.unit=="char"&&!A.extend?(Ni(Y,aa(e,_e.slice(0,de).concat(_e.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),me=Y.sel):is(Y,de,ie,ve):(de=0,Ni(Y,new zi([ie],0),ve),me=Y.sel);var $e=R;function lt(nr){if(_r($e,nr)==0)return;if($e=nr,A.unit=="rectangle"){for(var Sr=[],Vr=e.options.tabSize,Hr=V(cr(Y,R.line).text,R.ch,Vr),gn=V(cr(Y,nr.line).text,nr.ch,Vr),Kn=Math.min(Hr,gn),Ci=Math.max(Hr,gn),ei=Math.min(R.line,nr.line),ea=Math.min(e.lastLine(),Math.max(R.line,nr.line));ei<=ea;ei++){var Ji=cr(Y,ei).text,hi=be(Ji,Kn,Vr);Kn==Ci?Sr.push(new Dn(jt(ei,hi),jt(ei,hi))):Ji.length>hi&&Sr.push(new Dn(jt(ei,hi),jt(ei,be(Ji,Ci,Vr))))}Sr.length||Sr.push(new Dn(R,R)),Ni(Y,aa(e,me.ranges.slice(0,de).concat(Sr),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(nr)}else{var Qi=ie,Pi=rl(e,nr,A.unit),Ei=Qi.anchor,fi;_r(Pi.anchor,Ei)>0?(fi=Pi.head,Ei=Ri(Qi.from(),Pi.anchor)):(fi=Pi.anchor,Ei=Ai(Qi.to(),Pi.head));var ii=me.ranges.slice(0);ii[de]=$l(e,new Dn(W(Y,Ei),fi)),Ni(Y,aa(e,ii,de),ve)}}var it=F.wrapper.getBoundingClientRect(),Tt=0;function Ut(nr){var Sr=++Tt,Vr=ni(e,nr,!0,A.unit=="rectangle");if(!Vr)return;if(_r(Vr,$e)!=0){e.curOp.focus=G(),lt(Vr);var Hr=La(F,Y);(Vr.line>=Hr.to||Vr.line<Hr.from)&&setTimeout(oi(e,function(){Tt==Sr&&Ut(nr)}),150)}else{var gn=nr.clientY<it.top?-20:nr.clientY>it.bottom?20:0;gn&&setTimeout(oi(e,function(){if(Tt!=Sr)return;F.scroller.scrollTop+=gn,Ut(nr)}),50)}}function Yt(nr){e.state.selectingText=!1,Tt=Infinity,nr&&(xe(nr),F.input.focus()),ht(F.wrapper.ownerDocument,"mousemove",rr),ht(F.wrapper.ownerDocument,"mouseup",Er),Y.history.lastSelOrigin=null}var rr=oi(e,function(nr){nr.buttons===0||!Ve(nr)?Yt(nr):Ut(nr)}),Er=oi(e,Yt);e.state.selectingText=Er,De(F.wrapper.ownerDocument,"mousemove",rr),De(F.wrapper.ownerDocument,"mouseup",Er)}function $l(e,r){var R=r.anchor,A=r.head,F=cr(e.doc,R.line);if(_r(R,A)==0&&R.sticky==A.sticky)return r;var Y=mt(F);if(!Y)return r;var ie=ut(Y,R.ch,R.sticky),de=Y[ie];if(de.from!=R.ch&&de.to!=R.ch)return r;var me=ie+(de.from==R.ch==(de.level!=1)?0:1);if(me==0||me==Y.length)return r;var _e;if(A.line!=R.line)_e=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=ut(Y,A.ch,A.sticky),$e=Be-ie||(A.ch-R.ch)*(de.level==1?-1:1);Be==me-1||Be==me?_e=$e<0:_e=$e>0}var lt=Y[me+(_e?-1:0)],it=_e==(lt.level==1),Tt=it?lt.from:lt.to,Ut=it?"after":"before";return R.ch==Tt&&R.sticky==Ut?r:new Dn(new jt(R.line,Tt,Ut),A)}function nl(e,r,R,A){var F,Y;if(r.touches)F=r.touches[0].clientX,Y=r.touches[0].clientY;else try{F=r.clientX,Y=r.clientY}catch(lt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&xe(r);var ie=e.display,de=ie.lineDiv.getBoundingClientRect();if(Y>de.bottom||!Me(e,R))return Ae(r);Y-=de.top-ie.viewOffset;for(var me=0;me<e.display.gutterSpecs.length;++me){var _e=ie.gutters.childNodes[me];if(_e&&_e.getBoundingClientRect().right>=F){var Be=Un(e.doc,Y),$e=e.display.gutterSpecs[me];return Ze(e,R,e,Be,$e.className,r),Ae(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function il(e,r){if(cn(e.display,r)||Yl(e,r))return;if(st(e,r,"contextmenu"))return;k||e.display.input.onContextMenu(r)}function Yl(e,r){return Me(e,"gutterContextMenu")?nl(e,r,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Qr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var r=e.optionHandlers;function R(A,F,Y,ie){e.defaults[A]=F,Y&&(r[A]=ie?function(de,me,_e){_e!=oo&&Y(de,me,_e)}:Y)}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,Ra(A)},!0),R("indentUnit",2,Ra,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),Qr(A),Nn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var Y=[],ie=A.doc.first;A.doc.iter(function(me){for(var _e=0;;){var Be=me.text.indexOf(F,_e);if(Be==-1)break;_e=Be+F.length,Y.push(jt(ie,Be))}ie++});for(var de=Y.length-1;de>=0;de--)ro(A.doc,F,Y[de],jt(Y[de].line,Y[de].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,Y){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),Y!=oo&&A.refresh()}),R("specialCharPlaceholder",ur,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",i?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!S),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){al(A),ma(A)},!0),R("keyMap","default",function(A,F,Y){var ie=Ko(F),de=Y!=oo&&Ko(Y);de&&de.detach&&de.detach(A,ie),ie.attach&&ie.attach(A,de||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Hi(F,A.options.lineNumbers),ma(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?di(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return ar(A)},!0),R("scrollbarStyle","native",function(A){pa(A),ar(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=Hi(A.options.gutters,F),ma(A)},!0),R("firstLineNumber",1,ma,!0),R("lineNumberFormatter",function(A){return A},ma,!0),R("showCursorWhenSelecting",!1,An,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ua(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,An,!0),R("singleCursorHeightPerLine",!0,An,!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,Y=r?De:ht;Y(e.display.scroller,"dragstart",F.start),Y(e.display.scroller,"dragenter",F.enter),Y(e.display.scroller,"dragover",F.over),Y(e.display.scroller,"dragleave",F.leave),Y(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Dr(e)),wi(e),Nn(e),Qr(e),setTimeout(function(){return ar(e)},100)}function Jn(e,r){var R=this;if(!(this instanceof Jn))return new Jn(e,r);this.options=r=r?B(r):{},B(ol,r,!1);var A=r.value;typeof A=="string"?A=new Yi(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Jn.inputStyles[r.inputStyle](this),Y=this.display=new Ka(e,A,F,r);Y.wrapper.CodeMirror=this,al(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(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 ae,keySeq:null,specialChars:null},r.autofocus&&!i&&Y.input.focus(),C&&E<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),jn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!i||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&la(R)},20):ua(this);for(var ie in Vo)Vo.hasOwnProperty(ie)&&Vo[ie](this,r[ie],oo);yi(this),r.finishInit&&r.finishInit(this);for(var de=0;de<ds.length;++de)ds[de](this);Oa(this),l&&r.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}Jn.defaults=ol,Jn.optionHandlers=Vo;function ql(e){var r=e.display;De(r.scroller,"mousedown",oi(e,tl)),C&&E<11?De(r.scroller,"dblclick",oi(e,function(me){if(st(e,me))return;var _e=ni(e,me);if(!_e||cs(e,me)||cn(e.display,me))return;xe(me);var Be=e.findWordAt(_e);Uo(e.doc,Be.anchor,Be.head)})):De(r.scroller,"dblclick",function(me){return st(e,me)||xe(me)}),De(r.scroller,"contextmenu",function(me){return il(e,me)}),De(r.input.getField(),"contextmenu",function(me){r.scroller.contains(me.target)||il(e,me)});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 Y(me){if(me.touches.length!=1)return!1;var _e=me.touches[0];return _e.radiusX<=1&&_e.radiusY<=1}function ie(me,_e){if(_e.left==null)return!0;var Be=_e.left-me.left,$e=_e.top-me.top;return Be*Be+$e*$e>20*20}De(r.scroller,"touchstart",function(me){if(!st(e,me)&&!Y(me)&&!cs(e,me)){r.input.ensurePolled(),clearTimeout(R);var _e=+new Date;r.activeTouch={start:_e,moved:!1,prev:_e-A.end<=300?A:null},me.touches.length==1&&(r.activeTouch.left=me.touches[0].pageX,r.activeTouch.top=me.touches[0].pageY)}}),De(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),De(r.scroller,"touchend",function(me){var _e=r.activeTouch;if(_e&&!cn(r,me)&&_e.left!=null&&!_e.moved&&new Date-_e.start<300){var Be=e.coordsChar(r.activeTouch,"page"),$e;!_e.prev||ie(_e,_e.prev)?$e=new Dn(Be,Be):!_e.prev.prev||ie(_e,_e.prev.prev)?$e=e.findWordAt(Be):$e=new Dn(jt(Be.line,0),W(e.doc,jt(Be.line+1,0))),e.setSelection($e.anchor,$e.head),e.focus(),xe(me)}F()}),De(r.scroller,"touchcancel",F),De(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ha(e,r.scroller.scrollTop),$i(e,r.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),De(r.scroller,"mousewheel",function(me){return po(e,me)}),De(r.scroller,"DOMMouseScroll",function(me){return po(e,me)}),De(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(me){st(e,me)||Le(me)},over:function(me){st(e,me)||(Rl(e,me),Le(me))},start:function(me){return Al(e,me)},drop:oi(e,Ol),leave:function(me){st(e,me)||Ws(e)}};var de=r.input.getField();De(de,"keyup",function(me){return Zs.call(e,me)}),De(de,"keydown",oi(e,Qs)),De(de,"keypress",oi(e,el)),De(de,"focus",function(me){return la(e,me)}),De(de,"blur",function(me){return ua(e,me)})}var ds=[];Jn.defineInitHook=function(e){return ds.push(e)};function Ro(e,r,R,A){var F=e.doc,Y;R==null&&(R="add"),R=="smart"&&(F.mode.indent?Y=Vt(e,r).state:R="prev");var ie=e.options.tabSize,de=cr(F,r),me=V(de.text,null,ie);de.stateAfter&&(de.stateAfter=null);var _e=de.text.match(/^\s*/)[0],Be;if(!A&&!/\S/.test(de.text))Be=0,R="not";else if(R=="smart"&&(Be=F.mode.indent(Y,de.text.slice(_e.length),de.text),Be==Re||Be>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Be=V(cr(F,r-1).text,null,ie):Be=0:R=="add"?Be=me+e.options.indentUnit:R=="subtract"?Be=me-e.options.indentUnit:typeof R=="number"&&(Be=me+R),Be=Math.max(0,Be);var $e="",lt=0;if(e.options.indentWithTabs)for(var it=Math.floor(Be/ie);it;--it)lt+=ie,$e+=" ";if(lt<Be&&($e+=le(Be-lt)),$e!=_e)return ro(F,$e,jt(r,0),jt(r,_e.length),"+input"),de.stateAfter=null,!0;for(var Tt=0;Tt<F.sel.ranges.length;Tt++){var Ut=F.sel.ranges[Tt];if(Ut.head.line==r&&Ut.head.ch<_e.length){var Yt=jt(r,_e.length);is(F,Tt,new Dn(Yt,Yt));break}}}var ya=null;function Xo(e){ya=e}function hs(e,r,R,A,F){var Y=e.doc;e.display.shift=!1,A||(A=Y.sel);var ie=+new Date-200,de=F=="paste"||e.state.pasteIncoming>ie,me=hr(r),_e=null;if(de&&A.ranges.length>1)if(ya&&ya.text.join(`
`)==r){if(A.ranges.length%ya.text.length==0){_e=[];for(var Be=0;Be<ya.text.length;Be++)_e.push(Y.splitLines(ya.text[Be]))}}else me.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(_e=fe(me,function(rr){return[rr]}));for(var $e=e.curOp.updateInput,lt=A.ranges.length-1;lt>=0;lt--){var it=A.ranges[lt],Tt=it.from(),Ut=it.to();it.empty()&&(R&&R>0?Tt=jt(Tt.line,Tt.ch-R):e.state.overwrite&&!de?Ut=jt(Ut.line,Math.min(cr(Y,Ut.line).text.length,Ut.ch+re(me).length)):de&&ya&&ya.lineWise&&ya.text.join(`
`)==me.join(`
`)&&(Tt=Ut=jt(Tt.line,0)));var Yt={from:Tt,to:Ut,text:_e?_e[lt%_e.length]:me,origin:F||(de?"paste":e.state.cutIncoming>ie?"cut":"+input")};to(e.doc,Yt),Jt(e,"inputRead",e,Yt)}r&&!de&&ll(e,r),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=$e),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&&Wi(r,function(){return hs(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 Y=e.getModeAt(F.head),ie=!1;if(Y.electricChars){for(var de=0;de<Y.electricChars.length;de++)if(r.indexOf(Y.electricChars.charAt(de))>-1){ie=Ro(e,F.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(cr(e.doc,F.head.line).text.slice(0,F.head.ch))&&(ie=Ro(e,F.head.line,"smart")));ie&&Jt(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,Y={anchor:jt(F,0),head:jt(F+1,0)};R.push(Y),r.push(e.getRange(Y.anchor,Y.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=w("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=w("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),_&&(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 Y=this.options,ie=Y[A];if(Y[A]==F&&A!="mode")return;Y[A]=F,r.hasOwnProperty(A)&&oi(this,r[A])(this,F,ie),Ze(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,F){this.state.keyMaps[F?"push":"unshift"](Ko(A))},removeKeyMap:function(A){for(var F=this.state.keyMaps,Y=0;Y<F.length;++Y)if(F[Y]==A||F[Y].name==A)return F.splice(Y,1),!0},addOverlay:ki(function(A,F){var Y=A.token?A:e.getMode(this.options,A);if(Y.startState)throw new Error("Overlays may not be stateful.");q(this.state.overlays,{mode:Y,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Nn(this)}),removeOverlay:ki(function(A){for(var F=this.state.overlays,Y=0;Y<F.length;++Y){var ie=F[Y].modeSpec;if(ie==A||typeof A=="string"&&ie.name==A){F.splice(Y,1),this.state.modeGen++,Nn(this);return}}}),indentLine:ki(function(A,F,Y){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),ui(this.doc,A)&&Ro(this,A,F,Y)}),indentSelection:ki(function(A){for(var F=this.doc.sel.ranges,Y=-1,ie=0;ie<F.length;ie++){var de=F[ie];if(de.empty())de.head.line>Y&&(Ro(this,de.head.line,A,!0),Y=de.head.line,ie==this.doc.sel.primIndex&&ba(this));else{var me=de.from(),_e=de.to(),Be=Math.max(Y,me.line);Y=Math.min(this.lastLine(),_e.line-(_e.ch?0:1))+1;for(var $e=Be;$e<Y;++$e)Ro(this,$e,A);var lt=this.doc.sel.ranges;me.ch==0&&F.length==lt.length&&lt[ie].from().ch>0&&is(this.doc,ie,new Dn(me,lt[ie].to()),ke)}}}),getTokenAt:function(A,F){return fn(this,A,F)},getLineTokens:function(A,F){return fn(this,jt(A),F,!0)},getTokenTypeAt:function(A){A=W(this.doc,A);var F=At(this,cr(this.doc,A.line)),Y=0,ie=(F.length-1)/2,de=A.ch,me;if(de==0)me=F[2];else for(;;){var _e=Y+ie>>1;if((_e?F[_e*2-1]:0)>=de)ie=_e;else if(F[_e*2+1]<de)Y=_e+1;else{me=F[_e*2+2];break}}var Be=me?me.indexOf("overlay "):-1;return Be<0?me:Be==0?null:me.slice(0,Be-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 Y=[];if(!R.hasOwnProperty(F))return Y;var ie=R[F],de=this.getModeAt(A);if(typeof de[F]=="string")ie[de[F]]&&Y.push(ie[de[F]]);else if(de[F])for(var me=0;me<de[F].length;me++){var _e=ie[de[F][me]];_e&&Y.push(_e)}else de.helperType&&ie[de.helperType]?Y.push(ie[de.helperType]):ie[de.name]&&Y.push(ie[de.name]);for(var Be=0;Be<ie._global.length;Be++){var $e=ie._global[Be];$e.pred(de,this)&&he(Y,$e.val)==-1&&Y.push($e.val)}return Y},getStateAfter:function(A,F){var Y=this.doc;return A=se(Y,A==null?Y.first+Y.size-1:A),Vt(this,A+1,F).state},cursorCoords:function(A,F){var Y,ie=this.doc.sel.primary();return A==null?Y=ie.head:typeof A=="object"?Y=W(this.doc,A):Y=A?ie.from():ie.to(),ln(this,Y,F||"page")},charCoords:function(A,F){return kn(this,W(this.doc,A),F||"page")},coordsChar:function(A,F){return A=on(this,A,F||"page"),nn(this,A.left,A.top)},lineAtHeight:function(A,F){return A=on(this,{top:A,left:0},F||"page").top,Un(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,Y){var ie=!1,de;if(typeof A=="number"){var me=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>me&&(A=me,ie=!0),de=cr(this.doc,A)}else de=A;return pn(this,de,{top:0,left:0},F||"page",Y||ie).top+(ie?this.doc.height-or(de):0)},defaultTextHeight:function(){return Yn(this.display)},defaultCharWidth:function(){return ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,Y,ie,de){var me=this.display;A=ln(this,W(this.doc,A));var _e=A.bottom,Be=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),me.sizer.appendChild(F),ie=="over")_e=A.top;else if(ie=="above"||ie=="near"){var $e=Math.max(me.wrapper.clientHeight,this.doc.height),lt=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(ie=="above"||A.bottom+F.offsetHeight>$e)&&A.top>F.offsetHeight?_e=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=$e&&(_e=A.bottom),Be+F.offsetWidth>lt&&(Be=lt-F.offsetWidth)}F.style.top=_e+"px",F.style.left=F.style.right="",de=="right"?(Be=me.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(de=="left"?Be=0:de=="middle"&&(Be=(me.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Be+"px"),Y&&Ma(this,{left:Be,top:_e,right:Be+F.offsetWidth,bottom:_e+F.offsetHeight})},triggerOnKeyDown:ki(Qs),triggerOnKeyPress:ki(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ki(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:ki(function(A){ll(this,A)}),findPosH:function(A,F,Y,ie){var de=1;F<0&&(de=-1,F=-F);for(var me=W(this.doc,A),_e=0;_e<F&&!(me=fs(this.doc,me,de,Y,ie),me.hitSide);++_e);return me},moveH:ki(function(A,F){var Y=this;this.extendSelectionsBy(function(ie){return Y.display.shift||Y.doc.extend||ie.empty()?fs(Y.doc,ie.head,A,F,Y.options.rtlMoveVisually):A<0?ie.from():ie.to()},Te)}),deleteH:ki(function(A,F){var Y=this.doc.sel,ie=this.doc;Y.somethingSelected()?ie.replaceSelection("",null,"+delete"):ao(this,function(de){var me=fs(ie,de.head,A,F,!1);return A<0?{from:me,to:de.head}:{from:de.head,to:me}})}),findPosV:function(A,F,Y,ie){var de=1,me=ie;F<0&&(de=-1,F=-F);for(var _e=W(this.doc,A),Be=0;Be<F;++Be){var $e=ln(this,_e,"div");if(me==null?me=$e.left:$e.left=me,_e=hl(this,$e,de,Y),_e.hitSide)break}return _e},moveV:ki(function(A,F){var Y=this,ie=this.doc,de=[],me=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Be){if(me)return A<0?Be.from():Be.to();var $e=ln(Y,Be.head,"div");Be.goalColumn!=null&&($e.left=Be.goalColumn),de.push($e.left);var lt=hl(Y,$e,A,F);return F=="page"&&Be==ie.sel.primary()&&Sa(Y,kn(Y,lt,"div").top-$e.top),lt},Te),de.length)for(var _e=0;_e<ie.sel.ranges.length;_e++)ie.sel.ranges[_e].goalColumn=de[_e]}),findWordAt:function(A){var F=this.doc,Y=cr(F,A.line).text,ie=A.ch,de=A.ch;if(Y){var me=this.getHelper(A,"wordChars");(A.sticky=="before"||de==Y.length)&&ie?--ie:++de;for(var _e=Y.charAt(ie),Be=X(_e,me)?function($e){return X($e,me)}:/\s/.test(_e)?function($e){return/\s/.test($e)}:function($e){return!/\s/.test($e)&&!X($e)};ie>0&&Be(Y.charAt(ie-1));)--ie;for(;de<Y.length&&Be(Y.charAt(de));)++de}return new Dn(jt(A.line,ie),jt(A.line,de))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ki(function(A,F){da(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ye(this)-this.display.barHeight,width:A.scrollWidth-Ye(this)-this.display.barWidth,clientHeight:ye(this),clientWidth:Fe(this)}},scrollIntoView:ki(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:jt(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):Ta(this,A.from,A.to,A.margin)}),setSize:ki(function(A,F){var Y=this,ie=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};A!=null&&(this.display.wrapper.style.width=ie(A)),F!=null&&(this.display.wrapper.style.height=ie(F)),this.options.lineWrapping&&Kr(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(me){if(me.widgets){for(var _e=0;_e<me.widgets.length;_e++)if(me.widgets[_e].noHScroll){zn(Y,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(A){return Wi(this,A)},startOperation:function(){return jn(this)},endOperation:function(){return Oa(this)},refresh:ki(function(){var A=this.display.cachedTextHeight;Nn(this),this.curOp.forceUpdate=!0,Qr(this),da(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(A==null||Math.abs(A-Yn(this.display))>.5||this.options.lineWrapping)&&wi(this),Ze(this,"refresh",this)}),swapDoc:ki(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Qr(this),this.display.input.reset(),da(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Jt(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}},Ne(e),e.registerHelper=function(A,F,Y){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=Y},e.registerGlobalHelper=function(A,F,Y,ie){e.registerHelper(A,F,ie),R[A]._global.push({pred:Y,val:ie})}}function fs(e,r,R,A,F){var Y=r,ie=R,de=cr(e,r.line),me=F&&e.direction=="rtl"?-R:R;function _e(){var Er=r.line+me;return Er<e.first||Er>=e.first+e.size?!1:(r=new jt(Er,r.ch,r.sticky),de=cr(e,Er))}function Be(Er){var nr;if(A=="codepoint"){var Sr=de.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(Sr)?nr=null:nr=new jt(r.line,Math.max(0,Math.min(de.text.length,r.ch+R*(Sr>=55296&&Sr<56320?2:1))),-R)}else F?nr=Il(e.cm,de,r,R):nr=os(de,r,R);if(nr==null)if(!Er&&_e())r=ss(F,e.cm,de,r.line,me);else return!1;else r=nr;return!0}if(A=="char"||A=="codepoint")Be();else if(A=="column")Be(!0);else if(A=="word"||A=="group")for(var $e=null,lt=A=="group",it=e.cm&&e.cm.getHelper(r,"wordChars"),Tt=!0;!(R<0&&!Be(!Tt));Tt=!1){var Ut=de.text.charAt(r.ch)||`
`,Yt=X(Ut,it)?"w":lt&&Ut==`
`?"n":!lt||/\s/.test(Ut)?null:"p";if(lt&&!Tt&&!Yt&&(Yt="s"),$e&&$e!=Yt){R<0&&(R=1,Be(),r.sticky="after");break}if(Yt&&($e=Yt),R>0&&!Be(!Tt))break}var rr=Wo(e,r,Y,ie,!0);return ai(Y,rr)&&(rr.hitSide=!0),rr}function hl(e,r,R,A){var F=e.doc,Y=r.left,ie;if(A=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(de-.5*Yn(e.display),3);ie=(R>0?r.bottom:r.top)+R*me}else A=="line"&&(ie=R>0?r.bottom+3:r.top-3);for(var _e;!(_e=nn(e,Y,ie),!_e.outside);){if(R<0?ie<=0:ie>=F.height){_e.hitSide=!0;break}ie+=R*5}return _e}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.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 Y(de){for(var me=de.target;me;me=me.parentNode){if(me==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}De(F,"paste",function(de){if(!Y(de)||st(A,de)||sl(de,A))return;E<=11&&setTimeout(oi(A,function(){return r.updateFromDOM()}),20)}),De(F,"compositionstart",function(de){r.composing={data:de.data,done:!1}}),De(F,"compositionupdate",function(de){r.composing||(r.composing={data:de.data,done:!1})}),De(F,"compositionend",function(de){r.composing&&(de.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),De(F,"touchstart",function(){return R.forceCompositionEnd()}),De(F,"input",function(){r.composing||r.readFromDOMSoon()});function ie(de){if(!Y(de)||st(A,de))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),de.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var me=ul(A);Xo({lineWise:!0,text:me.text}),de.type=="cut"&&A.operation(function(){A.setSelections(me.ranges,0,ke),A.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var _e=ya.text.join(`
`);if(de.clipboardData.setData("Text",_e),de.clipboardData.getData("Text")==_e){de.preventDefault();return}}var Be=dl(),$e=Be.firstChild;A.display.lineSpace.insertBefore(Be,A.display.lineSpace.firstChild),$e.value=ya.text.join(`
`);var lt=document.activeElement;K($e),setTimeout(function(){A.display.lineSpace.removeChild(Be),lt.focus(),lt==F&&R.showPrimarySelection()},50)}De(F,"copy",ie),De(F,"cut",ie)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=Ui(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.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 Y=$o(r,e.anchorNode,e.anchorOffset),ie=$o(r,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&ie&&!ie.bad&&_r(Ri(Y,ie),A)==0&&_r(Ai(Y,ie),F)==0)return;var de=r.display.view,me=A.line>=r.display.viewFrom&&fl(r,A)||{node:de[0].measure.map[2],offset:0},_e=F.line<r.display.viewTo&&fl(r,F);if(!_e){var Be=de[de.length-1].measure,$e=Be.maps?Be.maps[Be.maps.length-1]:Be.map;_e={node:$e[$e.length-1],offset:$e[$e.length-2]-$e[$e.length-3]}}if(!me||!_e){e.removeAllRanges();return}var lt=e.rangeCount&&e.getRangeAt(0),it;try{it=N(me.node,me.offset,_e.offset,_e.node)}catch(Tt){}it&&(!T&&r.state.focused?(e.collapse(me.node,me.offset),it.collapsed||(e.removeAllRanges(),e.addRange(it))):(e.removeAllRanges(),e.addRange(it)),lt&&e.anchorNode==null?e.addRange(lt):T&&this.startGracePeriod()),this.rememberSelection()},Fn.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)},Fn.prototype.showMultipleSelections=function(e){g(this.cm.display.cursorDiv,e.cursors),g(this.cm.display.selectionDiv,e.selection)},Fn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Fn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return I(this.div,r)},Fn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fn.prototype.blur=function(){this.div.blur()},Fn.prototype.getField=function(){return this.div},Fn.prototype.supportsTouch=function(){return!0},Fn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Wi(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)},Fn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Fn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(y&&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&&Wi(r,function(){Ni(r.doc,va(R,A),ke),(R.bad||A.bad)&&(r.curOp.selectionChanged=!0)})},Fn.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=jt(A.line-1,cr(e.doc,A.line-1).length)),F.ch==cr(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=jt(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var Y,ie,de;A.line==r.viewFrom||(Y=In(e,A.line))==0?(ie=Yr(r.view[0].line),de=r.view[0].node):(ie=Yr(r.view[Y].line),de=r.view[Y-1].node.nextSibling);var me=In(e,F.line),_e,Be;if(me==r.view.length-1?(_e=r.viewTo-1,Be=r.lineDiv.lastChild):(_e=Yr(r.view[me+1].line)-1,Be=r.view[me+1].node.previousSibling),!de)return!1;for(var $e=e.doc.splitLines(ru(e,de,Be,ie,_e)),lt=Gn(e.doc,jt(ie,0),jt(_e,cr(e.doc,_e).text.length));$e.length>1&&lt.length>1;)if(re($e)==re(lt))$e.pop(),lt.pop(),_e--;else if($e[0]==lt[0])$e.shift(),lt.shift(),ie++;else break;for(var it=0,Tt=0,Ut=$e[0],Yt=lt[0],rr=Math.min(Ut.length,Yt.length);it<rr&&Ut.charCodeAt(it)==Yt.charCodeAt(it);)++it;for(var Er=re($e),nr=re(lt),Sr=Math.min(Er.length-($e.length==1?it:0),nr.length-(lt.length==1?it:0));Tt<Sr&&Er.charCodeAt(Er.length-Tt-1)==nr.charCodeAt(nr.length-Tt-1);)++Tt;if($e.length==1&&lt.length==1&&ie==A.line)for(;it&&it>A.ch&&Er.charCodeAt(Er.length-Tt-1)==nr.charCodeAt(nr.length-Tt-1);)it--,Tt++;$e[$e.length-1]=Er.slice(0,Er.length-Tt).replace(/^\u200b+/,""),$e[0]=$e[0].slice(it).replace(/\u200b+$/,"");var Vr=jt(ie,it),Hr=jt(_e,lt.length?re(lt).length-Tt:0);if($e.length>1||$e[0]||_r(Vr,Hr))return ro(e.doc,$e,Vr,Hr,"+input"),!0},Fn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fn.prototype.reset=function(){this.forceCompositionEnd()},Fn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fn.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)},Fn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Nn(e.cm)})},Fn.prototype.setUneditable=function(e){e.contentEditable="false"},Fn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||oi(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Fn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fn.prototype.onContextMenu=function(){},Fn.prototype.resetPosition=function(){},Fn.prototype.needsContentAttribute=!0;function fl(e,r){var R=Xe(e,r.line);if(!R||R.hidden)return null;var A=cr(e.doc,r.line),F=we(R,A,r.line),Y=mt(A,e.doc.direction),ie="left";if(Y){var de=ut(Y,r.ch);ie=de%2?"right":"left"}var me=kt(F.map,r.ch,ie);return me.offset=me.collapse=="right"?me.end:me.start,me}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 Y="",ie=!1,de=e.doc.lineSeparator(),me=!1;function _e(it){return function(Tt){return Tt.id==it}}function Be(){ie&&(Y+=de,me&&(Y+=de),ie=me=!1)}function $e(it){it&&(Be(),Y+=it)}function lt(it){if(it.nodeType==1){var Tt=it.getAttribute("cm-text");if(Tt){$e(Tt);return}var Ut=it.getAttribute("cm-marker"),Yt;if(Ut){var rr=e.findMarks(jt(A,0),jt(F+1,0),_e(+Ut));rr.length&&(Yt=rr[0].find(0))&&$e(Gn(e.doc,Yt.from,Yt.to).join(de));return}if(it.getAttribute("contenteditable")=="false")return;var Er=/^(pre|div|p|li|table|br)$/i.test(it.nodeName);if(!/^br$/i.test(it.nodeName)&&it.textContent.length==0)return;Er&&Be();for(var nr=0;nr<it.childNodes.length;nr++)lt(it.childNodes[nr]);/^(pre|p)$/i.test(it.nodeName)&&(me=!0),Er&&(ie=!0)}else it.nodeType==3&&$e(it.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(lt(r),r==R);)r=r.nextSibling,me=!1;return Y}function $o(e,r,R){var A;if(r==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(jt(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 Y=e.display.view[F];if(Y.node==A)return nu(Y,r,R)}}function nu(e,r,R){var A=e.text.firstChild,F=!1;if(!r||!I(A,r))return so(jt(Yr(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var Y=e.rest?re(e.rest):e.line;return so(jt(Yr(Y),Y.text.length),F)}var ie=r.nodeType==3?r:null,de=r;for(!ie&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(ie=r.firstChild,R&&(R=ie.nodeValue.length));de.parentNode!=A;)de=de.parentNode;var me=e.measure,_e=me.maps;function Be(Yt,rr,Er){for(var nr=-1;nr<(_e?_e.length:0);nr++)for(var Sr=nr<0?me.map:_e[nr],Vr=0;Vr<Sr.length;Vr+=3){var Hr=Sr[Vr+2];if(Hr==Yt||Hr==rr){var gn=Yr(nr<0?e.line:e.rest[nr]),Kn=Sr[Vr]+Er;return(Er<0||Hr!=Yt)&&(Kn=Sr[Vr+(Er?1:0)]),jt(gn,Kn)}}}var $e=Be(ie,de,R);if($e)return so($e,F);for(var lt=de.nextSibling,it=ie?ie.nodeValue.length-R:0;lt;lt=lt.nextSibling){if($e=Be(lt,lt.firstChild,0),$e)return so(jt($e.line,$e.ch-it),F);it+=lt.textContent.length}for(var Tt=de.previousSibling,Ut=R;Tt;Tt=Tt.previousSibling){if($e=Be(Tt,Tt.firstChild,-1),$e)return so(jt($e.line,$e.ch+Ut),F);Ut+=Tt.textContent.length}}var li=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null};li.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),_&&(F.style.width="0px"),De(F,"input",function(){C&&E>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),De(F,"paste",function(ie){if(st(A,ie)||sl(ie,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function Y(ie){if(st(A,ie))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var de=ul(A);Xo({lineWise:!0,text:de.text}),ie.type=="cut"?A.setSelections(de.ranges,null,ke):(R.prevInput="",F.value=de.text.join(`
`),K(F))}else return;ie.type=="cut"&&(A.state.cutIncoming=+new Date)}De(F,"cut",Y),De(F,"copy",Y),De(e.scroller,"paste",function(ie){if(cn(e,ie)||st(A,ie))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var de=new Event("paste");de.clipboardData=ie.clipboardData,F.dispatchEvent(de)}),De(e.lineSpace,"selectstart",function(ie){cn(e,ie)||xe(ie)}),De(F,"compositionstart",function(){var ie=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:ie,range:A.markText(ie,A.getCursor("to"),{className:"CodeMirror-composing"})}}),De(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},li.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},li.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Ui(e);if(e.options.moveInputWithCursor){var F=ln(e,R.sel.primary().head,"div"),Y=r.wrapper.getBoundingClientRect(),ie=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+ie.top-Y.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+ie.left-Y.left))}return A},li.prototype.showSelection=function(e){var r=this.cm,R=r.display;g(R.cursorDiv,e.cursors),g(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},li.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&&K(this.textarea),C&&E>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&E>=9&&(this.hasSelection=null))},li.prototype.getField=function(){return this.textarea},li.prototype.supportsTouch=function(){return!1},li.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!i||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},li.prototype.blur=function(){this.textarea.blur()},li.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},li.prototype.receivedFocus=function(){this.slowPoll()},li.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()})},li.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)},li.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||St(R)&&!A&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=R.value;if(F==A&&!r.somethingSelected())return!1;if(C&&E>=9&&this.hasSelection===F||a&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var Y=F.charCodeAt(0);if(Y==8203&&!A&&(A="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,de=Math.min(A.length,F.length);ie<de&&A.charCodeAt(ie)==F.charCodeAt(ie);)++ie;return Wi(r,function(){hs(r,F.slice(ie),A.length-ie,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},li.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},li.prototype.onKeyPress=function(){C&&E>=9&&(this.hasSelection=null),this.fastPoll()},li.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var Y=ni(R,e),ie=A.scroller.scrollTop;if(!Y||h)return;var de=R.options.resetSelectionOnContextMenu;de&&R.doc.sel.contains(Y)==-1&&oi(R,Ni)(R.doc,va(Y),ke);var me=F.style.cssText,_e=r.wrapper.style.cssText,Be=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px;
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var $e;l&&($e=window.scrollY),A.input.focus(),l&&window.scrollTo(null,$e),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=it,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function lt(){if(F.selectionStart!=null){var Ut=R.somethingSelected(),Yt="\u200B"+(Ut?F.value:"");F.value="\u21DA",F.value=Yt,r.prevInput=Ut?"":"\u200B",F.selectionStart=1,F.selectionEnd=Yt.length,A.selForContextMenu=R.doc.sel}}function it(){if(r.contextMenuPending!=it)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=_e,F.style.cssText=me,C&&E<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=ie),F.selectionStart!=null){(!C||C&&E<9)&&lt();var Ut=0,Yt=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?oi(R,Ds)(R):Ut++<10?A.detectingSelectAll=setTimeout(Yt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Yt,200)}}if(C&&E>=9&&lt(),k){Le(e);var Tt=function(){ht(window,"mouseup",Tt),setTimeout(it,20)};De(window,"mouseup",Tt)}else setTimeout(it,50)},li.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},li.prototype.setUneditable=function(){},li.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?B(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=G();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=de.getValue()}var F;if(e.form&&(De(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var Y=e.form;F=Y.submit;try{var ie=Y.submit=function(){A(),Y.submit=F,Y.submit(),Y.submit=ie}}catch(me){}}r.finishInit=function(me){me.save=A,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,A(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(ht(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var de=Jn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},r);return de}function au(e){e.off=ht,e.on=De,e.wheelEventPixels=fo,e.Doc=Yi,e.splitLines=hr,e.countColumn=V,e.findColumn=be,e.isWordChar=J,e.Pass=Re,e.signal=Ze,e.Line=Ir,e.changeEnd=ga,e.scrollbarModel=dr,e.Pos=jt,e.cmpPos=_r,e.modes=sn,e.mimeModes=Rr,e.resolveMode=Gt,e.getMode=Cn,e.modeExtensions=yn,e.extendMode=Sn,e.copyState=xn,e.startState=Ti,e.innerMode=xi,e.commands=So,e.keyMap=Da,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Ml,e.StringStream=hn,e.SharedTextMarker=_o,e.TextMarker=ja,e.LineWidget=xo,e.e_preventDefault=xe,e.e_stopPropagation=Se,e.e_stop=Le,e.addClass=z,e.contains=I,e.rmClass=b,e.keyNames=Fa}Jl(Jn),eu(Jn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Yi.prototype)Yi.prototype.hasOwnProperty(Yo)&&he(ou,Yo)<0&&(Jn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Yi.prototype[Yo]));return Ne(Yi),Jn.inputStyles={textarea:li,contenteditable:Fn},Jn.defineMode=function(e){!Jn.defaults.mode&&e!="null"&&(Jn.defaults.mode=e),mn.apply(this,arguments)},Jn.defineMIME=vn,Jn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Jn.defineMIME("text/plain","null"),Jn.defineExtension=function(e,r){Jn.prototype[e]=r},Jn.defineDocExtension=function(e,r){Yi.prototype[e]=r},Jn.fromTextArea=iu,au(Jn),Jn.version="5.58.2",Jn})},WYAk:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){(function(){var d=P,T=d.lib,D=T.Base,u=d.enc,p=u.Utf8,C=d.algo,E=C.HMAC=D.extend({init:function(l,s){l=this._hasher=new l.init,typeof s=="string"&&(s=p.parse(s));var n=l.blockSize,h=n*4;s.sigBytes>h&&(s=l.finalize(s)),s.clamp();for(var f=this._oKey=s.clone(),c=this._iKey=s.clone(),m=f.words,_=c.words,y=0;y<n;y++)m[y]^=1549556828,_[y]^=909522486;f.sigBytes=c.sigBytes=h,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var s=this._hasher,n=s.finalize(l);s.reset();var h=s.finalize(this._oKey.clone().concat(n));return h}})})()})},WaYH:function(j,Z,L){"use strict";var P=L("rePB"),d=L("Ff2n"),T=L("VTBJ"),D=L("1OyB"),u=L("vuIU"),p=L("JX7q"),C=L("Ji7U"),E=L("LK+K"),l=L("q1tI"),s=L("TSYQ"),n=L.n(s),h=L("sboe"),f=L("OZM5"),c=function(k){var O=k.prefixCls,b=k.level,v=k.isStart,g=k.isEnd;if(!b)return null;for(var w="".concat(O,"-indent-unit"),M=[],N=0;N<b;N+=1){var I;M.push(l.createElement("span",{key:N,className:n()(w,(I={},Object(P.a)(I,"".concat(w,"-start"),v[N+1]),Object(P.a)(I,"".concat(w,"-end"),g[N+1]),Object(P.a)(I,"".concat(w,"-end-first-level"),!N&&g[0]),I))}))}return l.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},M)},m=c,_=L("815F"),y="open",i="close",a="---",t=function(o){Object(C.a)(O,o);var k=Object(E.a)(O);function O(){var b;return Object(D.a)(this,O),b=k.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(v){var g=b.props.context.onNodeClick;g(v,Object(_.b)(b.props)),b.isSelectable()?b.onSelect(v):b.onCheck(v)},b.onSelectorDoubleClick=function(v){var g=b.props.context.onNodeDoubleClick;g(v,Object(_.b)(b.props))},b.onSelect=function(v){if(b.isDisabled())return;var g=b.props.context.onNodeSelect;v.preventDefault(),g(v,Object(_.b)(b.props))},b.onCheck=function(v){if(b.isDisabled())return;var g=b.props,w=g.disableCheckbox,M=g.checked,N=b.props.context.onNodeCheck;if(!b.isCheckable()||w)return;v.preventDefault();var I=!M;N(v,Object(_.b)(b.props),I)},b.onMouseEnter=function(v){var g=b.props.context.onNodeMouseEnter;g(v,Object(_.b)(b.props))},b.onMouseLeave=function(v){var g=b.props.context.onNodeMouseLeave;g(v,Object(_.b)(b.props))},b.onContextMenu=function(v){var g=b.props.context.onNodeContextMenu;g(v,Object(_.b)(b.props))},b.onDragStart=function(v){var g=b.props.context.onNodeDragStart;v.stopPropagation(),b.setState({dragNodeHighlight:!0}),g(v,Object(p.a)(b));try{v.dataTransfer.setData("text/plain","")}catch(w){}},b.onDragEnter=function(v){var g=b.props.context.onNodeDragEnter;v.preventDefault(),v.stopPropagation(),g(v,Object(p.a)(b))},b.onDragOver=function(v){var g=b.props.context.onNodeDragOver;v.preventDefault(),v.stopPropagation(),g(v,Object(p.a)(b))},b.onDragLeave=function(v){var g=b.props.context.onNodeDragLeave;v.stopPropagation(),g(v,Object(p.a)(b))},b.onDragEnd=function(v){var g=b.props.context.onNodeDragEnd;v.stopPropagation(),b.setState({dragNodeHighlight:!1}),g(v,Object(p.a)(b))},b.onDrop=function(v){var g=b.props.context.onNodeDrop;v.preventDefault(),v.stopPropagation(),b.setState({dragNodeHighlight:!1}),g(v,Object(p.a)(b))},b.onExpand=function(v){var g=b.props.context.onNodeExpand;g(v,Object(_.b)(b.props))},b.setSelectHandle=function(v){b.selectHandle=v},b.getNodeState=function(){var v=b.props.expanded;return b.isLeaf()?null:v?y:i},b.hasChildren=function(){var v=b.props.eventKey,g=b.props.context.keyEntities,w=g[v]||{},M=w.children;return!!(M||[]).length},b.isLeaf=function(){var v=b.props,g=v.isLeaf,w=v.loaded,M=b.props.context.loadData,N=b.hasChildren();return g===!1?!1:g||!M&&!N||M&&w&&!N},b.isDisabled=function(){var v=b.props.disabled,g=b.props.context.disabled;return!!(g||v)},b.isCheckable=function(){var v=b.props.checkable,g=b.props.context.checkable;return!g||v===!1?!1:g},b.syncLoadData=function(v){var g=v.expanded,w=v.loading,M=v.loaded,N=b.props.context,I=N.loadData,G=N.onNodeLoad;if(w)return;I&&g&&!b.isLeaf()&&(!b.hasChildren()&&!M&&G(Object(_.b)(b.props)))},b.renderSwitcher=function(){var v=b.props,g=v.expanded,w=v.switcherIcon,M=b.props.context,N=M.prefixCls,I=M.switcherIcon,G=w||I;if(b.isLeaf())return l.createElement("span",{className:n()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof G=="function"?G(Object(T.a)(Object(T.a)({},b.props),{},{isLeaf:!0})):G);var z=n()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(g?y:i));return l.createElement("span",{onClick:b.onExpand,className:z},typeof G=="function"?G(Object(T.a)(Object(T.a)({},b.props),{},{isLeaf:!1})):G)},b.renderCheckbox=function(){var v=b.props,g=v.checked,w=v.halfChecked,M=v.disableCheckbox,N=b.props.context.prefixCls,I=b.isDisabled(),G=b.isCheckable();if(!G)return null;var z=typeof G!="boolean"?G:null;return l.createElement("span",{className:n()("".concat(N,"-checkbox"),g&&"".concat(N,"-checkbox-checked"),!g&&w&&"".concat(N,"-checkbox-indeterminate"),(I||M)&&"".concat(N,"-checkbox-disabled")),onClick:b.onCheck},z)},b.renderIcon=function(){var v=b.props.loading,g=b.props.context.prefixCls;return l.createElement("span",{className:n()("".concat(g,"-iconEle"),"".concat(g,"-icon__").concat(b.getNodeState()||"docu"),v&&"".concat(g,"-icon_loading"))})},b.renderSelector=function(){var v=b.state.dragNodeHighlight,g=b.props,w=g.title,M=g.selected,N=g.icon,I=g.loading,G=g.data,z=b.props.context,H=z.prefixCls,K=z.showIcon,U=z.icon,B=z.draggable,V=z.loadData,ae=z.titleRender,he=b.isDisabled(),pe="".concat(H,"-node-content-wrapper"),Re;if(K){var ke=N||U;Re=ke?l.createElement("span",{className:n()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof ke=="function"?ke(b.props):ke):b.renderIcon()}else V&&I&&(Re=b.renderIcon());var ve;typeof w=="function"?ve=w(G):ae?ve=ae(G):ve=w;var Te=l.createElement("span",{className:"".concat(H,"-title")},ve);return l.createElement("span",{ref:b.setSelectHandle,title:typeof w=="string"?w:"",className:n()("".concat(pe),"".concat(pe,"-").concat(b.getNodeState()||"normal"),!he&&(M||v)&&"".concat(H,"-node-selected"),!he&&B&&"draggable"),draggable:!he&&B||void 0,"aria-grabbed":!he&&B||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:B?b.onDragStart:void 0},Re,Te)},b}return Object(u.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var v=this.props.selectable,g=this.props.context.selectable;return typeof v=="boolean"?v:g}},{key:"render",value:function(){var v,g=this.props,w=g.eventKey,M=g.className,N=g.style,I=g.dragOver,G=g.dragOverGapTop,z=g.dragOverGapBottom,H=g.isLeaf,K=g.isStart,U=g.isEnd,B=g.expanded,V=g.selected,ae=g.checked,he=g.halfChecked,pe=g.loading,Re=g.domRef,ke=g.active,ve=g.onMouseMove,Te=Object(d.a)(g,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),be=this.props.context,ue=be.prefixCls,le=be.filterTreeNode,re=be.draggable,fe=be.keyEntities,q=this.isDisabled(),ee=Object(f.f)(Te),Ce=fe[w]||{},te=Ce.level,J=U[U.length-1];return l.createElement("div",Object.assign({ref:Re,className:n()(M,"".concat(ue,"-treenode"),(v={},Object(P.a)(v,"".concat(ue,"-treenode-disabled"),q),Object(P.a)(v,"".concat(ue,"-treenode-switcher-").concat(B?"open":"close"),!H),Object(P.a)(v,"".concat(ue,"-treenode-checkbox-checked"),ae),Object(P.a)(v,"".concat(ue,"-treenode-checkbox-indeterminate"),he),Object(P.a)(v,"".concat(ue,"-treenode-selected"),V),Object(P.a)(v,"".concat(ue,"-treenode-loading"),pe),Object(P.a)(v,"".concat(ue,"-treenode-active"),ke),Object(P.a)(v,"".concat(ue,"-treenode-leaf-last"),J),Object(P.a)(v,"drag-over",!q&&I),Object(P.a)(v,"drag-over-gap-top",!q&&G),Object(P.a)(v,"drag-over-gap-bottom",!q&&z),Object(P.a)(v,"filter-node",le&&le(Object(_.b)(this.props))),v)),style:N,onDragEnter:re?this.onDragEnter:void 0,onDragOver:re?this.onDragOver:void 0,onDragLeave:re?this.onDragLeave:void 0,onDrop:re?this.onDrop:void 0,onDragEnd:re?this.onDragEnd:void 0,onMouseMove:ve},ee),l.createElement(m,{prefixCls:ue,level:te,isStart:K,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(l.Component),S=function(k){return l.createElement(h.a.Consumer,null,function(O){return l.createElement(t,Object.assign({},k,{context:O}))})};S.displayName="TreeNode",S.defaultProps={title:a},S.isTreeNode=1;var x=Z.a=S},WdTA:function(j,Z,L){j.exports=L.p+"static/studnetqun.598eeb43.png"},Y1PL:function(j,Z,L){"use strict";L.r(Z),L.d(Z,"ResizableTextArea",function(){return he});var P=L("wx14"),d=L("1OyB"),T=L("vuIU"),D=L("Ji7U"),u=L("LK+K"),p=L("q1tI"),C=L("VTBJ"),E=L("rePB"),l=L("Zm9Q"),s=L("Kwbf"),n=L("c+Xe"),h=L("m+aA"),f=L("bdgK"),c=new Map;function m(ke){ke.forEach(function(ve){var Te,be=ve.target;(Te=c.get(be))===null||Te===void 0||Te.forEach(function(ue){return ue(be)})})}var _=new f.default(m),y=null,i=null;function a(ke,ve){c.has(ke)||(c.set(ke,new Set),_.observe(ke)),c.get(ke).add(ve)}function t(ke,ve){c.has(ke)&&(c.get(ke).delete(ve),c.get(ke).size||(_.unobserve(ke),c.delete(ke)))}var S=function(ke){Object(D.a)(Te,ke);var ve=Object(u.a)(Te);function Te(){return Object(d.a)(this,Te),ve.apply(this,arguments)}return Object(T.a)(Te,[{key:"render",value:function(){return this.props.children}}]),Te}(p.Component),x=p.createContext(null);function o(ke){var ve=ke.children,Te=ke.onBatchResize,be=p.useRef(0),ue=p.useRef([]),le=p.useContext(x),re=p.useCallback(function(fe,q,ee){be.current+=1;var Ce=be.current;ue.current.push({size:fe,element:q,data:ee}),Promise.resolve().then(function(){Ce===be.current&&(Te==null||Te(ue.current),ue.current=[])}),le==null||le(fe,q,ee)},[Te,le]);return p.createElement(x.Provider,{value:re},ve)}function k(ke){var ve=ke.children,Te=ke.disabled,be=p.useRef(null),ue=p.useRef(null),le=p.useContext(x),re=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=p.isValidElement(ve)&&Object(n.c)(ve),q=fe?ve.ref:null,ee=p.useMemo(function(){return Object(n.a)(q,be)},[q,be]),Ce=p.useRef(ke);Ce.current=ke;var te=p.useCallback(function(J){var X=Ce.current,Q=X.onResize,Ee=X.data,ge=J.getBoundingClientRect(),Oe=ge.width,Qe=ge.height,rt=J.offsetWidth,nt=J.offsetHeight,ut=Math.floor(Oe),dt=Math.floor(Qe);if(re.current.width!==ut||re.current.height!==dt||re.current.offsetWidth!==rt||re.current.offsetHeight!==nt){var mt={width:ut,height:dt,offsetWidth:rt,offsetHeight:nt};re.current=mt;var He=rt===Math.round(Oe)?Oe:rt,De=nt===Math.round(Qe)?Qe:nt,at=Object(C.a)(Object(C.a)({},mt),{},{offsetWidth:He,offsetHeight:De});le==null||le(at,J,Ee),Q&&Promise.resolve().then(function(){Q(at,J)})}},[]);return p.useEffect(function(){var J=Object(h.a)(be.current)||Object(h.a)(ue.current);return J&&!Te&&a(J,te),function(){return t(J,te)}},[be.current,Te]),p.createElement(S,{ref:ue},fe?p.cloneElement(ve,{ref:ee}):ve)}var O="rc-observer-key";function b(ke){var ve=ke.children,Te=Object(l.a)(ve);return Te.map(function(be,ue){var le=(be==null?void 0:be.key)||"".concat(O,"-").concat(ue);return p.createElement(k,Object(P.a)({},ke,{key:le}),be)})}b.Collection=o;var v=b,g=L("bT9E"),w=L("TSYQ"),M=L.n(w),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"],G={},z;function H(ke){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(ve&&G[Te])return G[Te];var be=window.getComputedStyle(ke),ue=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),le=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),re=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),fe=I.map(function(ee){return"".concat(ee,":").concat(be.getPropertyValue(ee))}).join(";"),q={sizingStyle:fe,paddingSize:le,borderSize:re,boxSizing:ue};return ve&&Te&&(G[Te]=q),q}function K(ke){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),ke.getAttribute("wrap")?z.setAttribute("wrap",ke.getAttribute("wrap")):z.removeAttribute("wrap");var ue=H(ke,ve),le=ue.paddingSize,re=ue.borderSize,fe=ue.boxSizing,q=ue.sizingStyle;z.setAttribute("style","".concat(q,";").concat(N)),z.value=ke.value||ke.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,te=z.scrollHeight,J;if(fe==="border-box"?te+=re:fe==="content-box"&&(te-=le),Te!==null||be!==null){z.value=" ";var X=z.scrollHeight-le;Te!==null&&(ee=X*Te,fe==="border-box"&&(ee=ee+le+re),te=Math.max(ee,te)),be!==null&&(Ce=X*be,fe==="border-box"&&(Ce=Ce+le+re),J=te>Ce?"":"hidden",te=Math.min(Ce,te))}return{height:te,minHeight:ee,maxHeight:Ce,overflowY:J,resize:"none"}}var U=L("Gytx"),B=L.n(U),V;(function(ke){ke[ke.NONE=0]="NONE",ke[ke.RESIZING=1]="RESIZING",ke[ke.RESIZED=2]="RESIZED"})(V||(V={}));var ae=function(ke){Object(D.a)(Te,ke);var ve=Object(u.a)(Te);function Te(be){var ue;return Object(d.a)(this,Te),ue=ve.call(this,be),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(le){ue.textArea=le},ue.handleResize=function(le){var re=ue.state.resizeStatus,fe=ue.props,q=fe.autoSize,ee=fe.onResize;if(re!==V.NONE)return;typeof ee=="function"&&ee(le),q&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var le=ue.props.autoSize;if(!le||!ue.textArea)return;var re=le.minRows,fe=le.maxRows,q=K(ue.textArea,!1,re,fe);ue.setState({textareaStyles:q,resizeStatus:V.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:V.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var le=ue.props,re=le.prefixCls,fe=re===void 0?"rc-textarea":re,q=le.autoSize,ee=le.onResize,Ce=le.className,te=le.disabled,J=ue.state,X=J.textareaStyles,Q=J.resizeStatus,Ee=Object(g.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=M()(fe,Ce,Object(E.a)({},"".concat(fe,"-disabled"),te));"value"in Ee&&(Ee.value=Ee.value||"");var Oe=Object(C.a)(Object(C.a)(Object(C.a)({},ue.props.style),X),Q===V.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return p.createElement(v,{onResize:ue.handleResize,disabled:!(q||ee)},p.createElement("textarea",Object(P.a)({},Ee,{className:ge,style:Oe,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:V.NONE},ue}return Object(T.a)(Te,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!B()(ue.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 ue=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,le)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Te}(p.Component),he=ae,pe=function(ke){Object(D.a)(Te,ke);var ve=Object(u.a)(Te);function Te(be){var ue;Object(d.a)(this,Te),ue=ve.call(this,be),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(re){ue.resizableTextArea=re},ue.handleChange=function(re){var fe=ue.props.onChange;ue.setValue(re.target.value,function(){ue.resizableTextArea.resizeTextarea()}),fe&&fe(re)},ue.handleKeyDown=function(re){var fe=ue.props,q=fe.onPressEnter,ee=fe.onKeyDown;re.keyCode===13&&q&&q(re),ee&&ee(re)};var le=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return ue.state={value:le},ue}return Object(T.a)(Te,[{key:"setValue",value:function(ue,le){"value"in this.props||this.setState({value:ue},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return p.createElement(he,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Te}(p.Component),Re=Z.default=pe},ZW9T:function(j,Z,L){"use strict";L.d(Z,"a",function(){return S});var P=L("k1fw"),d=L("miYZ"),T=L("tsqr"),D=L("rAM+"),u=L("tJVT"),p=L("PpiC"),C=L("q1tI"),E=L.n(C),l=L("bdgK");function s(x,o,k,O,b){var v=o.getWordUntilPosition(k),g={startLineNumber:k.lineNumber,endLineNumber:k.lineNumber,startColumn:v.startColumn,endColumn:v.endColumn},w=O.map(function(M){return{label:M,kind:x.languages.CompletionItemKind.Keyword,insertText:M,insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:g}});return b.map(function(M){w.push(Object(P.a)(Object(P.a)({},M),{},{range:g}))}),w}var n=function(x){var o={label:"ifelse",kind:x.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},k=["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"];x.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(g,w){var M=s(x,g,w,k,[o]);return{suggestions:M}}});var O=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];x.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(g,w){var M=[{label:"print",kind:x.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=s(x,g,w,O,M);return{suggestions:N}}});var b=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];x.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(g,w){var M=[o,{label:"main",kind:x.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:x.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=s(x,g,w,b,M);return{suggestions:N}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",f=L("LvDl");function c(x){return/^\d+$/.test(x)?"".concat(x,"px"):x}function m(){}var _=!1,y={"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 i(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=x;if(Array.isArray(x)){for(var k=0;k<x.length;k++){var O=y[x[k]];if(O)return O}return o[0]}return y[o]||o}var a=null,t=Z.b=function(x){var o=x.width,k=o===void 0?"100%":o,O=x.height,b=O===void 0?"100%":O,v=x.value,g=x.language,w=g===void 0?"javascript":g,M=x.style,N=M===void 0?{}:M,I=x.options,G=I===void 0?{}:I,z=x.overrideServices,H=z===void 0?{}:z,K=x.theme,U=K===void 0?"vs-dark":K,B=x.onEditBlur,V=x.onSave,ae=x.autoHeight,he=ae===void 0?!1:ae,pe=x.forbidCopy,Re=pe===void 0?!1:pe,ke=x.onChange,ve=ke===void 0?m:ke,Te=x.editorDidMount,be=Te===void 0?m:Te,ue=x.onFocus,le=ue===void 0?m:ue,re=x.filename,fe=re===void 0?"educoder.txt":re,q=Object(p.a)(x,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ee=Object(C.useRef)(),Ce=Object(C.useRef)({}),te=Object(C.useRef)(),J=Object(C.useRef)(!1),X=Object(C.useRef)(),Q=Object(C.useState)(!1),Ee=Object(u.a)(Q,2),ge=Ee[0],Oe=Ee[1];function Qe(){var Ae;return ee.current&&(Ae=new l.default(function(Le){var Je=Object(D.a)(Le),Ve;try{for(Je.s();!(Ve=Je.n()).done;){var gt=Ve.value;(gt.target.offsetHeight>0||gt.target.offsetWidth>0)&&Ce.current.instance.layout()}}catch(yt){Je.e(yt)}finally{Je.f()}}),Ae.observe(ee.current)),Ae}function rt(){T.b.warn(decodeURIComponent(h))}var nt=function(){var Le=Ce.current.instance;if(v!=null&&Le&&ge){var Je=Le.getModel();Je&&v!==Je.getValue()&&(_=!0,Je.setValue(v),Le.layout(),_=!1)}};Object(C.useEffect)(function(){te.current&&clearTimeout(te.current),te.current=setTimeout(function(){nt()},500)},[v,ge,Ce.current]);function ut(){var Ae=Ce.current.instance;if(Ae){var Le=Ae.getSelection(),Je=Ce.current.pastePos||{},Ve=new a.Range(Je.startLineNumber||Le.endLineNumber,Je.startColumn||Le.endColumn,Je.endLineNumber||Le.endLineNumber,Je.endColumn||Le.endColumn);setTimeout(function(){Ae.executeEdits("",[{range:Ve,text:""}])},300)}}function dt(Ae){(window.navigator.platform.match("Mac")?Ae.metaKey:Ae.ctrlKey)&&Ae.keyCode==83&&(Ae.preventDefault(),V())}var mt=function(){if(he&&Ce.current.instance){var Le=Ce.current.instance.getContentHeight();xe(Le<b?b:Le)}else xe(b)};function He(Ae){var Le=document.createEvent("MouseEvents");Le.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ae.dispatchEvent(Le)}function De(Ae,Le){var Je=window.URL||window.webkitURL||window,Ve=new Blob([Le]),gt=document.createElementNS("http://www.w3.org/1999/xhtml","a");gt.href=Je.createObjectURL(Ve),gt.download=Ae,He(gt)}Object(C.useEffect)(function(){mt()},[mt]),Object(C.useEffect)(function(){ee.current&&!ge&&L.e(27).then(L.t.bind(null,"M/lh",7)).then(function(Ae){try{a=Ae,Ce.current.instance=a.editor.create(ee.current,{value:v,language:i(w),theme:U,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},H);var Le=Ce.current.instance;if(be(Le,a),setTimeout(function(){mt(),Ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){De(fe||"educoder.txt",Le.getValue())}})},500),Ce.current.subscription=Le.onDidChangeModelContent(function(Ve){J.current?clearTimeout(X.current):(mt(),ve(Le.getValue(),Ve)),X.current=setTimeout(function(){J.current=!1},500)}),window.Monaco||n(a),Re&&(Le.addCommand(a.KeyMod.CtrlCmd|a.KeyMod.Shift|a.KeyCode.KEY_V,function(){return rt(),null}),Le.addCommand(a.KeyMod.CtrlCmd|a.KeyCode.KEY_C,function(){return rt(),null})),window.Monaco=a,B&&Le.onDidBlurEditorWidget(function(){B(Le.getValue())}),le&&Le.onDidFocusEditorText(function(){le(Le.getValue())}),Re){Le.addCommand(a.KeyMod.CtrlCmd|a.KeyCode.KEY_V,function(){return rt(),null}),Le.onDidPaste(function(Ve){Ce.current.pastePos=Ve});try{window.addEventListener("paste",ut)}catch(Ve){}}var Je=Qe();return Oe(!0),function(){var Ve=Ce.current.instance;Ve.dispose();var gt=Ve.getModel();gt&&gt.dispose(),Ce.current.subscription&&Ce.current.subscription.dispose(),Re&&window.removeEventListener("paste",ut),Je.unobserve(ee.current)}}catch(Ve){}})},[]),Object(C.useEffect)(function(){var Ae=Ce.current.instance;if(Ae&&ge)return document.addEventListener("keydown",dt,!1),function(){document.removeEventListener("keydown",dt)}},[V,ge]),Object(C.useEffect)(function(){var Ae=Ce.current.instance;if(Ae&&ge){var Le=i(w);a.editor.setModelLanguage(Ae.getModel(),Le),console.log("language:",w,Ae.getModel(),Le)}},[w,ge]),Object(C.useEffect)(function(){var Ae=Ce.current.instance;Ae&&ge&&a.editor.setTheme(U)},[U,ge]),Object(C.useEffect)(function(){var Ae=Ce.current.instance;Ae&&ge&&(Ae.updateOptions(Object(P.a)({},G)),setTimeout(function(){Ae.getModel().updateOptions(Object(P.a)({},G))},200))},[JSON.stringify(G),ge]),Object(C.useEffect)(function(){var Ae=Ce.current.instance;Ae&&ge&&Ae.layout()},[k,b,ge]);var at=Object(C.useState)(c(k)),ht=Object(u.a)(at,2),Ze=ht[0],st=ht[1],Ue=Object(C.useState)(c(b)),Me=Object(u.a)(Ue,2),Ne=Me[0],xe=Me[1],Se=Object(P.a)(Object(P.a)({},N),{},{width:Ze,height:Ne});return E.a.createElement("div",{className:"my-monaco-editor",ref:ee,style:Se})};function S(x){var o=x.width,k=o===void 0?"100%":o,O=x.height,b=O===void 0?"100%":O,v=x.original,g=x.modified,w=x.language,M=x.options,N=M===void 0?{}:M,I=Object(C.useRef)(),G=Object(C.useState)(null),z=Object(u.a)(G,2),H=z[0],K=z[1];function U(he){var pe;return I.current&&(pe=new l.default(function(Re){var ke=Object(D.a)(Re),ve;try{for(ke.s();!(ve=ke.n()).done;){var Te=ve.value;(Te.target.offsetHeight>0||Te.target.offsetWidth>0)&&he.layout()}}catch(be){ke.e(be)}finally{ke.f()}}),pe.observe(I.current)),pe}Object(C.useEffect)(function(){I.current&&L.e(27).then(L.t.bind(null,"M/lh",7)).then(function(he){a=he;var pe=a.editor.createDiffEditor(I.current,Object(P.a)(Object(P.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},N),{},{wordWrap:!0}));K(pe);var Re=U(pe);return function(){pe.dispose();var ke=pe.getModel();ke&&ke.dispose(),Re.unobserve(I.current)}})},[]),Object(C.useEffect)(function(){H&&H.setModel({original:a.editor.createModel(v,w),modified:a.editor.createModel(g,w)})},[v,g,w,H]);var B=c(k),V=c(b),ae={width:B,height:V};return E.a.createElement("div",{className:"my-diff-editor",ref:I,style:ae})}},ZpRC:function(j,Z,L){"use strict";function P(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function d(n,h){return(!h||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,h){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var f=getComputedStyle(n,null);return d(f.overflowY,h)||d(f.overflowX,h)||function(c){var m=function(_){if(!_.ownerDocument||!_.ownerDocument.defaultView)return null;try{return _.ownerDocument.defaultView.frameElement}catch(y){return null}}(c);return!!m&&(m.clientHeight<c.scrollHeight||m.clientWidth<c.scrollWidth)}(n)}return!1}function D(n,h,f,c,m,_,y,i){return _<n&&y>h||_>n&&y<h?0:_<=n&&i<=f||y>=h&&i>=f?_-n-c:y>h&&i<f||_<n&&i>f?y-h+m:0}var u=function(n,h){var f=window,c=h.scrollMode,m=h.block,_=h.inline,y=h.boundary,i=h.skipOverflowHiddenElements,a=typeof y=="function"?y:function(X){return X!==y};if(!P(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],x=n;P(x)&&a(x);){if((x=x.parentElement)===t){S.push(x);break}x!=null&&x===document.body&&T(x)&&!T(document.documentElement)||x!=null&&T(x,i)&&S.push(x)}for(var o=f.visualViewport?f.visualViewport.width:innerWidth,k=f.visualViewport?f.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,v=n.getBoundingClientRect(),g=v.height,w=v.width,M=v.top,N=v.right,I=v.bottom,G=v.left,z=m==="start"||m==="nearest"?M:m==="end"?I:M+g/2,H=_==="center"?G+w/2:_==="end"?N:G,K=[],U=0;U<S.length;U++){var B=S[U],V=B.getBoundingClientRect(),ae=V.height,he=V.width,pe=V.top,Re=V.right,ke=V.bottom,ve=V.left;if(c==="if-needed"&&M>=0&&G>=0&&I<=k&&N<=o&&M>=pe&&I<=ke&&G>=ve&&N<=Re)return K;var Te=getComputedStyle(B),be=parseInt(Te.borderLeftWidth,10),ue=parseInt(Te.borderTopWidth,10),le=parseInt(Te.borderRightWidth,10),re=parseInt(Te.borderBottomWidth,10),fe=0,q=0,ee="offsetWidth"in B?B.offsetWidth-B.clientWidth-be-le:0,Ce="offsetHeight"in B?B.offsetHeight-B.clientHeight-ue-re:0;if(t===B)fe=m==="start"?z:m==="end"?z-k:m==="nearest"?D(b,b+k,k,ue,re,b+z,b+z+g,g):z-k/2,q=_==="start"?H:_==="center"?H-o/2:_==="end"?H-o:D(O,O+o,o,be,le,O+H,O+H+w,w),fe=Math.max(0,fe+b),q=Math.max(0,q+O);else{fe=m==="start"?z-pe-ue:m==="end"?z-ke+re+Ce:m==="nearest"?D(pe,ke,ae,ue,re+Ce,z,z+g,g):z-(pe+ae/2)+Ce/2,q=_==="start"?H-ve-be:_==="center"?H-(ve+he/2)+ee/2:_==="end"?H-Re+le+ee:D(ve,Re,he,be,le+ee,H,H+w,w);var te=B.scrollLeft,J=B.scrollTop;z+=J-(fe=Math.max(0,Math.min(J+fe,B.scrollHeight-ae+Ce))),H+=te-(q=Math.max(0,Math.min(te+q,B.scrollWidth-he+ee)))}K.push({el:B,top:fe,left:q})}return K};function p(n){return n===Object(n)&&Object.keys(n).length!==0}function C(n,h){h===void 0&&(h="auto");var f="scrollBehavior"in document.body.style;n.forEach(function(c){var m=c.el,_=c.top,y=c.left;m.scroll&&f?m.scroll({top:_,left:y,behavior:h}):(m.scrollTop=_,m.scrollLeft=y)})}function E(n){return n===!1?{block:"end",inline:"nearest"}:p(n)?n:{block:"start",inline:"nearest"}}function l(n,h){var f=!n.ownerDocument.documentElement.contains(n);if(p(h)&&typeof h.behavior=="function")return h.behavior(f?[]:u(n,h));if(f)return;var c=E(h);return C(u(n,c),c.behavior)}var s=Z.a=l},Zss7:function(j,Z,L){var P;(function(d){var T=/^\s+/,D=/\s+$/,u=0,p=d.round,C=d.min,E=d.max,l=d.random;function s(re,fe){if(re=re||"",fe=fe||{},re instanceof s)return re;if(!(this instanceof s))return new s(re,fe);var q=n(re);this._originalInput=re,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=p(100*this._a)/100,this._format=fe.format||q.format,this._gradientType=fe.gradientType,this._r<1&&(this._r=p(this._r)),this._g<1&&(this._g=p(this._g)),this._b<1&&(this._b=p(this._b)),this._ok=q.ok,this._tc_id=u++}s.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 re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),fe,q,ee,Ce,te,J;return fe=re.r/255,q=re.g/255,ee=re.b/255,fe<=.03928?Ce=fe/12.92:Ce=d.pow((fe+.055)/1.055,2.4),q<=.03928?te=q/12.92:te=d.pow((q+.055)/1.055,2.4),ee<=.03928?J=ee/12.92:J=d.pow((ee+.055)/1.055,2.4),.2126*Ce+.7152*te+.0722*J},setAlpha:function(re){return this._a=K(re),this._roundA=p(100*this._a)/100,this},toHsv:function(){var re=m(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=m(this._r,this._g,this._b),fe=p(re.h*360),q=p(re.s*100),ee=p(re.v*100);return this._a==1?"hsv("+fe+", "+q+"%, "+ee+"%)":"hsva("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var re=f(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=f(this._r,this._g,this._b),fe=p(re.h*360),q=p(re.s*100),ee=p(re.l*100);return this._a==1?"hsl("+fe+", "+q+"%, "+ee+"%)":"hsla("+fe+", "+q+"%, "+ee+"%, "+this._roundA+")"},toHex:function(re){return y(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return i(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:p(this._r),g:p(this._g),b:p(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+p(this._r)+", "+p(this._g)+", "+p(this._b)+")":"rgba("+p(this._r)+", "+p(this._g)+", "+p(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:p(U(this._r,255)*100)+"%",g:p(U(this._g,255)*100)+"%",b:p(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+p(U(this._r,255)*100)+"%, "+p(U(this._g,255)*100)+"%, "+p(U(this._b,255)*100)+"%)":"rgba("+p(U(this._r,255)*100)+"%, "+p(U(this._g,255)*100)+"%, "+p(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[y(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var fe="#"+a(this._r,this._g,this._b,this._a),q=fe,ee=this._gradientType?"GradientType = 1, ":"";if(re){var Ce=s(re);q="#"+a(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+fe+",endColorstr="+q+")"},toString:function(re){var fe=!!re;re=re||this._format;var q=!1,ee=this._a<1&&this._a>=0,Ce=!fe&&ee&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Ce?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(q=this.toRgbString()),re==="prgb"&&(q=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(q=this.toHexString()),re==="hex3"&&(q=this.toHexString(!0)),re==="hex4"&&(q=this.toHex8String(!0)),re==="hex8"&&(q=this.toHex8String()),re==="name"&&(q=this.toName()),re==="hsl"&&(q=this.toHslString()),re==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(re,fe){var q=re.apply(null,[this].concat([].slice.call(fe)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(o,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(re,fe){return re.apply(null,[this].concat([].slice.call(fe)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},s.fromRatio=function(re,fe){if(typeof re=="object"){var q={};for(var ee in re)re.hasOwnProperty(ee)&&(ee==="a"?q[ee]=re[ee]:q[ee]=Re(re[ee]));re=q}return s(re,fe)};function n(re){var fe={r:0,g:0,b:0},q=1,ee=null,Ce=null,te=null,J=!1,X=!1;return typeof re=="string"&&(re=ue(re)),typeof re=="object"&&(be(re.r)&&be(re.g)&&be(re.b)?(fe=h(re.r,re.g,re.b),J=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):be(re.h)&&be(re.s)&&be(re.v)?(ee=Re(re.s),Ce=Re(re.v),fe=_(re.h,ee,Ce),J=!0,X="hsv"):be(re.h)&&be(re.s)&&be(re.l)&&(ee=Re(re.s),te=Re(re.l),fe=c(re.h,ee,te),J=!0,X="hsl"),re.hasOwnProperty("a")&&(q=re.a)),q=K(q),{ok:J,format:re.format||X,r:C(255,E(fe.r,0)),g:C(255,E(fe.g,0)),b:C(255,E(fe.b,0)),a:q}}function h(re,fe,q){return{r:U(re,255)*255,g:U(fe,255)*255,b:U(q,255)*255}}function f(re,fe,q){re=U(re,255),fe=U(fe,255),q=U(q,255);var ee=E(re,fe,q),Ce=C(re,fe,q),te,J,X=(ee+Ce)/2;if(ee==Ce)te=J=0;else{var Q=ee-Ce;J=X>.5?Q/(2-ee-Ce):Q/(ee+Ce);switch(ee){case re:te=(fe-q)/Q+(fe<q?6:0);break;case fe:te=(q-re)/Q+2;break;case q:te=(re-fe)/Q+4;break}te/=6}return{h:te,s:J,l:X}}function c(re,fe,q){var ee,Ce,te;re=U(re,360),fe=U(fe,100),q=U(q,100);function J(Ee,ge,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?Ee+(ge-Ee)*6*Oe:Oe<1/2?ge:Oe<2/3?Ee+(ge-Ee)*(2/3-Oe)*6:Ee}if(fe===0)ee=Ce=te=q;else{var X=q<.5?q*(1+fe):q+fe-q*fe,Q=2*q-X;ee=J(Q,X,re+1/3),Ce=J(Q,X,re),te=J(Q,X,re-1/3)}return{r:ee*255,g:Ce*255,b:te*255}}function m(re,fe,q){re=U(re,255),fe=U(fe,255),q=U(q,255);var ee=E(re,fe,q),Ce=C(re,fe,q),te,J,X=ee,Q=ee-Ce;if(J=ee===0?0:Q/ee,ee==Ce)te=0;else{switch(ee){case re:te=(fe-q)/Q+(fe<q?6:0);break;case fe:te=(q-re)/Q+2;break;case q:te=(re-fe)/Q+4;break}te/=6}return{h:te,s:J,v:X}}function _(re,fe,q){re=U(re,360)*6,fe=U(fe,100),q=U(q,100);var ee=d.floor(re),Ce=re-ee,te=q*(1-fe),J=q*(1-Ce*fe),X=q*(1-(1-Ce)*fe),Q=ee%6,Ee=[q,J,te,te,X,q][Q],ge=[X,q,q,J,te,te][Q],Oe=[te,te,X,q,q,J][Q];return{r:Ee*255,g:ge*255,b:Oe*255}}function y(re,fe,q,ee){var Ce=[pe(p(re).toString(16)),pe(p(fe).toString(16)),pe(p(q).toString(16))];return ee&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0):Ce.join("")}function i(re,fe,q,ee,Ce){var te=[pe(p(re).toString(16)),pe(p(fe).toString(16)),pe(p(q).toString(16)),pe(ke(ee))];return Ce&&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 a(re,fe,q,ee){var Ce=[pe(ke(ee)),pe(p(re).toString(16)),pe(p(fe).toString(16)),pe(p(q).toString(16))];return Ce.join("")}s.equals=function(re,fe){return!re||!fe?!1:s(re).toRgbString()==s(fe).toRgbString()},s.random=function(){return s.fromRatio({r:l(),g:l(),b:l()})};function t(re,fe){fe=fe===0?0:fe||10;var q=s(re).toHsl();return q.s-=fe/100,q.s=B(q.s),s(q)}function S(re,fe){fe=fe===0?0:fe||10;var q=s(re).toHsl();return q.s+=fe/100,q.s=B(q.s),s(q)}function x(re){return s(re).desaturate(100)}function o(re,fe){fe=fe===0?0:fe||10;var q=s(re).toHsl();return q.l+=fe/100,q.l=B(q.l),s(q)}function k(re,fe){fe=fe===0?0:fe||10;var q=s(re).toRgb();return q.r=E(0,C(255,q.r-p(255*-(fe/100)))),q.g=E(0,C(255,q.g-p(255*-(fe/100)))),q.b=E(0,C(255,q.b-p(255*-(fe/100)))),s(q)}function O(re,fe){fe=fe===0?0:fe||10;var q=s(re).toHsl();return q.l-=fe/100,q.l=B(q.l),s(q)}function b(re,fe){var q=s(re).toHsl(),ee=(q.h+fe)%360;return q.h=ee<0?360+ee:ee,s(q)}function v(re){var fe=s(re).toHsl();return fe.h=(fe.h+180)%360,s(fe)}function g(re){var fe=s(re).toHsl(),q=fe.h;return[s(re),s({h:(q+120)%360,s:fe.s,l:fe.l}),s({h:(q+240)%360,s:fe.s,l:fe.l})]}function w(re){var fe=s(re).toHsl(),q=fe.h;return[s(re),s({h:(q+90)%360,s:fe.s,l:fe.l}),s({h:(q+180)%360,s:fe.s,l:fe.l}),s({h:(q+270)%360,s:fe.s,l:fe.l})]}function M(re){var fe=s(re).toHsl(),q=fe.h;return[s(re),s({h:(q+72)%360,s:fe.s,l:fe.l}),s({h:(q+216)%360,s:fe.s,l:fe.l})]}function N(re,fe,q){fe=fe||6,q=q||30;var ee=s(re).toHsl(),Ce=360/q,te=[s(re)];for(ee.h=(ee.h-(Ce*fe>>1)+720)%360;--fe;)ee.h=(ee.h+Ce)%360,te.push(s(ee));return te}function I(re,fe){fe=fe||6;for(var q=s(re).toHsv(),ee=q.h,Ce=q.s,te=q.v,J=[],X=1/fe;fe--;)J.push(s({h:ee,s:Ce,v:te})),te=(te+X)%1;return J}s.mix=function(re,fe,q){q=q===0?0:q||50;var ee=s(re).toRgb(),Ce=s(fe).toRgb(),te=q/100,J={r:(Ce.r-ee.r)*te+ee.r,g:(Ce.g-ee.g)*te+ee.g,b:(Ce.b-ee.b)*te+ee.b,a:(Ce.a-ee.a)*te+ee.a};return s(J)},s.readability=function(re,fe){var q=s(re),ee=s(fe);return(d.max(q.getLuminance(),ee.getLuminance())+.05)/(d.min(q.getLuminance(),ee.getLuminance())+.05)},s.isReadable=function(re,fe,q){var ee=s.readability(re,fe),Ce,te;te=!1,Ce=le(q);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":te=ee>=4.5;break;case"AAlarge":te=ee>=3;break;case"AAAsmall":te=ee>=7;break}return te},s.mostReadable=function(re,fe,q){var ee=null,Ce=0,te,J,X,Q;q=q||{},J=q.includeFallbackColors,X=q.level,Q=q.size;for(var Ee=0;Ee<fe.length;Ee++)te=s.readability(re,fe[Ee]),te>Ce&&(Ce=te,ee=s(fe[Ee]));return s.isReadable(re,ee,{level:X,size:Q})||!J?ee:(q.includeFallbackColors=!1,s.mostReadable(re,["#fff","#000"],q))};var G=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=s.hexNames=H(G);function H(re){var fe={};for(var q in re)re.hasOwnProperty(q)&&(fe[re[q]]=q);return fe}function K(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function U(re,fe){ae(re)&&(re="100%");var q=he(re);return re=C(fe,E(0,parseFloat(re))),q&&(re=parseInt(re*fe,10)/100),d.abs(re-fe)<1e-6?1:re%fe/parseFloat(fe)}function B(re){return C(1,E(0,re))}function V(re){return parseInt(re,16)}function ae(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function he(re){return typeof re=="string"&&re.indexOf("%")!=-1}function pe(re){return re.length==1?"0"+re:""+re}function Re(re){return re<=1&&(re=re*100+"%"),re}function ke(re){return d.round(parseFloat(re)*255).toString(16)}function ve(re){return V(re)/255}var Te=function(){var re="[-\\+]?\\d+%?",fe="[-\\+]?\\d*\\.\\d+%?",q="(?:"+fe+")|(?:"+re+")",ee="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",Ce="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+Ce),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 be(re){return!!Te.CSS_UNIT.exec(re)}function ue(re){re=re.replace(T,"").replace(D,"").toLowerCase();var fe=!1;if(G[re])re=G[re],fe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=Te.rgb.exec(re))?{r:q[1],g:q[2],b:q[3]}:(q=Te.rgba.exec(re))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=Te.hsl.exec(re))?{h:q[1],s:q[2],l:q[3]}:(q=Te.hsla.exec(re))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=Te.hsv.exec(re))?{h:q[1],s:q[2],v:q[3]}:(q=Te.hsva.exec(re))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=Te.hex8.exec(re))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),a:ve(q[4]),format:fe?"name":"hex8"}:(q=Te.hex6.exec(re))?{r:V(q[1]),g:V(q[2]),b:V(q[3]),format:fe?"name":"hex"}:(q=Te.hex4.exec(re))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),a:ve(q[4]+""+q[4]),format:fe?"name":"hex8"}:(q=Te.hex3.exec(re))?{r:V(q[1]+""+q[1]),g:V(q[2]+""+q[2]),b:V(q[3]+""+q[3]),format:fe?"name":"hex"}:!1}function le(re){var fe,q;return re=re||{level:"AA",size:"small"},fe=(re.level||"AA").toUpperCase(),q=(re.size||"small").toLowerCase(),fe!=="AA"&&fe!=="AAA"&&(fe="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:fe,size:q}}j.exports?j.exports=s:!(P=function(){return s}.call(Z,L,Z,j),P!==void 0&&(j.exports=P))})(Math)},bQjk:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.CipherParams,p=T.enc,C=p.Hex,E=T.format,l=E.Hex={stringify:function(s){return s.ciphertext.toString(C)},parse:function(s){var n=C.parse(s);return u.create({ciphertext:n})}}}(),P.format.Hex})},bT9E:function(j,Z,L){"use strict";L.d(Z,"a",function(){return d});var P=L("VTBJ");function d(T,D){var u=Object(P.a)({},T);return Array.isArray(D)&&D.forEach(function(p){delete u[p]}),u}},biw7:function(j,Z,L){"use strict";var P=L("q1tI"),d=L.n(P),T=P.createContext(null);Z.a=T},c5Ni:function(j,Z,L){},cv67:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.WordArray,p=D.Hasher,C=T.algo,E=[];(function(){for(var c=0;c<64;c++)E[c]=d.abs(d.sin(c+1))*4294967296|0})();var l=C.MD5=p.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,m){for(var _=0;_<16;_++){var y=m+_,i=c[y];c[y]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,t=c[m+0],S=c[m+1],x=c[m+2],o=c[m+3],k=c[m+4],O=c[m+5],b=c[m+6],v=c[m+7],g=c[m+8],w=c[m+9],M=c[m+10],N=c[m+11],I=c[m+12],G=c[m+13],z=c[m+14],H=c[m+15],K=a[0],U=a[1],B=a[2],V=a[3];K=s(K,U,B,V,t,7,E[0]),V=s(V,K,U,B,S,12,E[1]),B=s(B,V,K,U,x,17,E[2]),U=s(U,B,V,K,o,22,E[3]),K=s(K,U,B,V,k,7,E[4]),V=s(V,K,U,B,O,12,E[5]),B=s(B,V,K,U,b,17,E[6]),U=s(U,B,V,K,v,22,E[7]),K=s(K,U,B,V,g,7,E[8]),V=s(V,K,U,B,w,12,E[9]),B=s(B,V,K,U,M,17,E[10]),U=s(U,B,V,K,N,22,E[11]),K=s(K,U,B,V,I,7,E[12]),V=s(V,K,U,B,G,12,E[13]),B=s(B,V,K,U,z,17,E[14]),U=s(U,B,V,K,H,22,E[15]),K=n(K,U,B,V,S,5,E[16]),V=n(V,K,U,B,b,9,E[17]),B=n(B,V,K,U,N,14,E[18]),U=n(U,B,V,K,t,20,E[19]),K=n(K,U,B,V,O,5,E[20]),V=n(V,K,U,B,M,9,E[21]),B=n(B,V,K,U,H,14,E[22]),U=n(U,B,V,K,k,20,E[23]),K=n(K,U,B,V,w,5,E[24]),V=n(V,K,U,B,z,9,E[25]),B=n(B,V,K,U,o,14,E[26]),U=n(U,B,V,K,g,20,E[27]),K=n(K,U,B,V,G,5,E[28]),V=n(V,K,U,B,x,9,E[29]),B=n(B,V,K,U,v,14,E[30]),U=n(U,B,V,K,I,20,E[31]),K=h(K,U,B,V,O,4,E[32]),V=h(V,K,U,B,g,11,E[33]),B=h(B,V,K,U,N,16,E[34]),U=h(U,B,V,K,z,23,E[35]),K=h(K,U,B,V,S,4,E[36]),V=h(V,K,U,B,k,11,E[37]),B=h(B,V,K,U,v,16,E[38]),U=h(U,B,V,K,M,23,E[39]),K=h(K,U,B,V,G,4,E[40]),V=h(V,K,U,B,t,11,E[41]),B=h(B,V,K,U,o,16,E[42]),U=h(U,B,V,K,b,23,E[43]),K=h(K,U,B,V,w,4,E[44]),V=h(V,K,U,B,I,11,E[45]),B=h(B,V,K,U,H,16,E[46]),U=h(U,B,V,K,x,23,E[47]),K=f(K,U,B,V,t,6,E[48]),V=f(V,K,U,B,v,10,E[49]),B=f(B,V,K,U,z,15,E[50]),U=f(U,B,V,K,O,21,E[51]),K=f(K,U,B,V,I,6,E[52]),V=f(V,K,U,B,o,10,E[53]),B=f(B,V,K,U,M,15,E[54]),U=f(U,B,V,K,S,21,E[55]),K=f(K,U,B,V,g,6,E[56]),V=f(V,K,U,B,H,10,E[57]),B=f(B,V,K,U,b,15,E[58]),U=f(U,B,V,K,G,21,E[59]),K=f(K,U,B,V,k,6,E[60]),V=f(V,K,U,B,N,10,E[61]),B=f(B,V,K,U,x,15,E[62]),U=f(U,B,V,K,w,21,E[63]),a[0]=a[0]+K|0,a[1]=a[1]+U|0,a[2]=a[2]+B|0,a[3]=a[3]+V|0},_doFinalize:function(){var c=this._data,m=c.words,_=this._nDataBytes*8,y=c.sigBytes*8;m[y>>>5]|=128<<24-y%32;var i=d.floor(_/4294967296),a=_;m[(y+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,m[(y+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c.sigBytes=(m.length+1)*4,this._process();for(var t=this._hash,S=t.words,x=0;x<4;x++){var o=S[x];S[x]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360}return t},clone:function(){var c=p.clone.call(this);return c._hash=this._hash.clone(),c}});function s(c,m,_,y,i,a,t){var S=c+(m&_|~m&y)+i+t;return(S<<a|S>>>32-a)+m}function n(c,m,_,y,i,a,t){var S=c+(m&y|_&~y)+i+t;return(S<<a|S>>>32-a)+m}function h(c,m,_,y,i,a,t){var S=c+(m^_^y)+i+t;return(S<<a|S>>>32-a)+m}function f(c,m,_,y,i,a,t){var S=c+(_^(m|~y))+i+t;return(S<<a|S>>>32-a)+m}T.MD5=p._createHelper(l),T.HmacMD5=p._createHmacHelper(l)}(Math),P.MD5})},dejd:function(j,Z,L){},dmUQ:function(j,Z,L){"use strict";var P=L("Ff2n"),d=L("rePB"),T=L("1OyB"),D=L("vuIU"),u=L("Ji7U"),p=L("md7G"),C=L("foSv"),E=L("q1tI"),l=L.n(E),s=L("TSYQ"),n=L.n(s),h=L("4IlW");function f(g,w){var M=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);w&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),M.push.apply(M,N)}return M}function c(g){for(var w=1;w<arguments.length;w++){var M=arguments[w]!=null?arguments[w]:{};w%2?f(Object(M),!0).forEach(function(N){Object(d.a)(g,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(M)):f(Object(M)).forEach(function(N){Object.defineProperty(g,N,Object.getOwnPropertyDescriptor(M,N))})}return g}function m(g){var w=_();return function(){var N=Object(C.a)(g),I;if(w){var G=Object(C.a)(this).constructor;I=Reflect.construct(N,arguments,G)}else I=N.apply(this,arguments);return Object(p.a)(this,I)}}function _(){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(g){return!1}}function y(){}function i(g){g.preventDefault()}var a=function(w){return w.replace(/[^\w.-]+/g,"")},t=200,S=600,x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,o=function(w){return w!=null},k=function(w,M){return M===w||typeof M=="number"&&typeof w=="number"&&isNaN(M)&&isNaN(w)},O=function(g){Object(u.a)(M,g);var w=m(M);function M(N){var I;Object(T.a)(this,M),I=w.call(this,N),I.onKeyDown=function(H){var K=I.props,U=K.onKeyDown,B=K.onPressEnter;if(H.keyCode===h.a.UP){var V=I.getRatio(H);I.up(H,V,null),I.stop()}else if(H.keyCode===h.a.DOWN){var ae=I.getRatio(H);I.down(H,ae,null),I.stop()}else H.keyCode===h.a.ENTER&&B&&B(H);if(I.recordCursorPosition(),I.lastKeyCode=H.keyCode,U){for(var he=arguments.length,pe=new Array(he>1?he-1:0),Re=1;Re<he;Re++)pe[Re-1]=arguments[Re];U.apply(void 0,[H].concat(pe))}},I.onKeyUp=function(H){var K=I.props.onKeyUp;if(I.stop(),I.recordCursorPosition(),K){for(var U=arguments.length,B=new Array(U>1?U-1:0),V=1;V<U;V++)B[V-1]=arguments[V];K.apply(void 0,[H].concat(B))}},I.onChange=function(H){var K=I.props.onChange;I.state.focused&&(I.inputting=!0),I.rawInput=I.props.parser(I.getValueFromEvent(H)),I.setState({inputValue:I.rawInput}),K(I.toNumber(I.rawInput))},I.onMouseUp=function(){var H=I.props.onMouseUp;I.recordCursorPosition(),H&&H.apply(void 0,arguments)},I.onFocus=function(){var H;I.setState({focused:!0}),(H=I.props).onFocus.apply(H,arguments)},I.onBlur=function(){var H=I.props.onBlur;I.inputting=!1,I.setState({focused:!1});var K=I.getCurrentValidValue(I.state.inputValue),U=I.setValue(K,y);if(H){var B=I.input.value,V=I.getInputDisplayValue({focus:!1,value:U});I.input.value=V&&Number(V),H.apply(void 0,arguments),I.input.value=B}},I.getRatio=function(H){var K=1;return H.metaKey||H.ctrlKey?K=.1:H.shiftKey&&(K=10),K},I.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},I.getPrecision=function(H){if(o(I.props.precision))return I.props.precision;var K=String(H);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var U=0;return K.indexOf(".")>=0&&(U=K.length-K.indexOf(".")-1),U},I.getInputDisplayValue=function(H){var K=H||I.state,U=K.focused,B=K.inputValue,V=K.value,ae;U?ae=B:ae=I.toPrecisionAsStep(V),ae==null&&(ae="");var he=I.formatWrapper(ae);return o(I.props.decimalSeparator)&&(he=he.toString().replace(".",I.props.decimalSeparator)),he},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(H){}},I.restoreByAfter=function(H){if(H===void 0)return!1;var K=I.input.value,U=K.lastIndexOf(H);if(U===-1)return!1;var B=I.cursorBefore.length;return I.lastKeyCode===h.a.DELETE&&I.cursorBefore.charAt(B-1)===H[0]?(I.fixCaret(B,B),!0):U+H.length===K.length?(I.fixCaret(U,U),!0):!1},I.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(K,U){var B=H.substring(U);return I.restoreByAfter(B)})},I.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},I.stop=function(){I.autoStepTimer&&clearTimeout(I.autoStepTimer)},I.down=function(H,K,U){I.pressingUpOrDown=!0,I.step("down",H,K,U)},I.up=function(H,K,U){I.pressingUpOrDown=!0,I.step("up",H,K,U)},I.saveInput=function(H){I.input=H};var G=N.value;G===void 0&&(G=N.defaultValue),I.state={focused:N.autoFocus};var z=I.getValidValue(I.toNumber(G));return I.state=c(c({},I.state),{},{inputValue:I.toPrecisionAsStep(z),value:z}),I}return Object(D.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(I){var G=this.props,z=G.value,H=G.onChange,K=G.max,U=G.min,B=this.state.focused;if(I){if(!k(I.value,z)||!k(I.max,K)||!k(I.min,U)){var V=B?z:this.getValidValue(z),ae;this.pressingUpOrDown?ae=V:this.inputting?ae=this.rawInput:ae=this.toPrecisionAsStep(V),this.setState({value:V,inputValue:ae})}var he="value"in this.props?z:this.state.value;"max"in this.props&&I.max!==K&&typeof he=="number"&&he>K&&H&&H(K),"min"in this.props&&I.min!==U&&typeof he=="number"&&he<U&&H&&H(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var pe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===h.a.BACKSPACE?pe=this.cursorStart-1:this.lastKeyCode===h.a.DELETE&&(pe=this.cursorStart):pe=this.input.value.length,this.fixCaret(pe,pe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case h.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case h.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Re){}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 G=I;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(I){var G=I.target.value.trim().replace(/。/g,".");return o(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(I);return isNaN(H)?I:(H<G&&(H=G),H>z&&(H=z),H)}},{key:"setValue",value:function(I,G){var z=this.props.precision,H=this.isNotCompleteNumber(parseFloat(I))?null:parseFloat(I),K=this.state.value,U=K===void 0?null:K,B=this.state.inputValue,V=B===void 0?null:B,ae=typeof H=="number"?H.toFixed(z):"".concat(H),he=H!==U||ae!=="".concat(V);return"value"in this.props?(V=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:V},G)):this.setState({value:H,inputValue:this.toPrecisionAsStep(I)},G),he&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,H=z.precision,K=z.step;if(o(H))return H;var U=this.getPrecision(G),B=this.getPrecision(K),V=this.getPrecision(I);return I?Math.max(V,U+B):U+B}},{key:"getPrecisionFactor",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(I,G);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(I){return this.props.formatter?this.props.formatter(I):I}},{key:"toPrecisionAsStep",value:function(I){if(this.isNotCompleteNumber(I)||I==="")return I;var G=Math.abs(this.getMaxPrecision(I));return isNaN(G)?I.toString():Number(I).toFixed(G)}},{key:"toNumber",value:function(I){var G=this.props.precision,z=this.state.focused,H=I&&I.length>16&&z;return this.isNotCompleteNumber(I)||H?I:o(G)?Math.round(I*Math.pow(10,G))/Math.pow(10,G):Number(I)}},{key:"upStep",value:function(I,G){var z=this.props.step,H=this.getPrecisionFactor(I,G),K=Math.abs(this.getMaxPrecision(I,G)),U=((H*I+H*z*G)/H).toFixed(K);return this.toNumber(U)}},{key:"downStep",value:function(I,G){var z=this.props.step,H=this.getPrecisionFactor(I,G),K=Math.abs(this.getMaxPrecision(I,G)),U=((H*I-H*z*G)/H).toFixed(K);return this.toNumber(U)}},{key:"step",value:function(I,G){var z=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var B=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(B))return;var V=this["".concat(I,"Step")](B,H),ae=V>U.max||V<U.min;if(V>U.max?V=U.max:V<U.min&&(V=U.min),this.setValue(V,null),this.setState({focused:!0},function(){z.pressingUpOrDown=!1}),ae)return;this.autoStepTimer=setTimeout(function(){z[I](G,H,!0)},K?t:S)}},{key:"fixCaret",value:function(I,G){if(I===void 0||G===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,H=this.input.selectionEnd;(I!==z||G!==H)&&this.input.setSelectionRange(I,G)}catch(K){}}},{key:"render",value:function(){var I,G=this.props,z=G.prefixCls,H=G.disabled,K=G.readOnly,U=G.useTouch,B=G.autoComplete,V=G.upHandler,ae=G.downHandler,he=G.className,pe=G.max,Re=G.min,ke=G.style,ve=G.title,Te=G.onMouseEnter,be=G.onMouseLeave,ue=G.onMouseOver,le=G.onMouseOut,re=G.required,fe=G.onClick,q=G.tabIndex,ee=G.type,Ce=G.placeholder,te=G.id,J=G.inputMode,X=G.pattern,Q=G.step,Ee=G.maxLength,ge=G.autoFocus,Oe=G.name,Qe=G.onPaste,rt=G.onInput,nt=Object(P.a)(G,["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"]),ut=this.state,dt=ut.value,mt=ut.focused,He=n()(z,(I={},Object(d.a)(I,he,!!he),Object(d.a)(I,"".concat(z,"-disabled"),H),Object(d.a)(I,"".concat(z,"-focused"),mt),I)),De={};Object.keys(nt).forEach(function(Le){(Le.substr(0,5)==="data-"||Le.substr(0,5)==="aria-"||Le==="role")&&(De[Le]=nt[Le])});var at=!K&&!H,ht=this.getInputDisplayValue(null),Ze=(dt||dt===0)&&(isNaN(dt)||Number(dt)>=pe),st=(dt||dt===0)&&(isNaN(dt)||Number(dt)<=Re),Ue=Ze||H||K,Me=st||H||K,Ne=n()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(d.a)({},"".concat(z,"-handler-up-disabled"),Ue)),xe=n()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(d.a)({},"".concat(z,"-handler-down-disabled"),Me)),Se=U?{onTouchStart:Ue?y:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=U?{onTouchStart:Me?y:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:He,style:ke,title:ve,onMouseEnter:Te,onMouseLeave:be,onMouseOver:ue,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(z,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ne}),V||l.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:i})),l.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:xe}),ae||l.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:i}))),l.a.createElement("div",{className:"".concat(z,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Re,"aria-valuemax":pe,"aria-valuenow":dt,required:re,type:ee,placeholder:Ce,onPaste:Qe,onClick:fe,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:q,autoComplete:B,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:y,onKeyUp:at?this.onKeyUp:y,autoFocus:ge,maxLength:Ee,readOnly:K,disabled:H,max:pe,min:Re,step:Q,name:Oe,title:ve,id:te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ht),pattern:X,inputMode:J,onInput:rt},De))))}}]),M}(l.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:a,required:!1,autoComplete:"off"};var b=O,v=Z.a=b},e7zE:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Base,u=T.WordArray,p=d.algo,C=p.SHA1,E=p.HMAC,l=p.PBKDF2=D.extend({cfg:D.extend({keySize:128/32,hasher:C,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,n){for(var h=this.cfg,f=E.create(h.hasher,s),c=u.create(),m=u.create([1]),_=c.words,y=m.words,i=h.keySize,a=h.iterations;_.length<i;){var t=f.update(n).finalize(m);f.reset();for(var S=t.words,x=S.length,o=t,k=1;k<a;k++){o=f.finalize(o),f.reset();for(var O=o.words,b=0;b<x;b++)S[b]^=O[b]}c.concat(t),y[0]++}return c.sigBytes=i*4,c}});d.PBKDF2=function(s,n,h){return l.create(h).compute(s,n)}}(),P.PBKDF2})},fyJ8:function(j,Z,L){"use strict";var P=L("rePB"),d=L("VTBJ"),T=L("Ff2n"),D=L("U8pU"),u=L("q1tI"),p=L.n(u),C=L("TSYQ"),E=L.n(C),l=L("c+Xe"),s=L("sR1s");function n(_){return _&&Object(D.a)(_)==="object"&&!Array.isArray(_)&&!u.isValidElement(_)}function h(_){return typeof _=="string"?!0:Object(l.c)(_)}function f(_,y){var i,a=_.prefixCls,t=_.className,S=_.record,x=_.index,o=_.dataIndex,k=_.render,O=_.children,b=_.component,v=b===void 0?"td":b,g=_.colSpan,w=_.rowSpan,M=_.fixLeft,N=_.fixRight,I=_.firstFixLeft,G=_.lastFixLeft,z=_.firstFixRight,H=_.lastFixRight,K=_.appendNode,U=_.additionalProps,B=U===void 0?{}:U,V=_.ellipsis,ae=_.align,he=_.rowType,pe=_.isSticky,Re="".concat(a,"-cell"),ke,ve;if(O)ve=O;else{var Te=Object(s.b)(S,o);if(ve=Te,k){var be=k(Te,S,x);n(be)?(ve=be.children,ke=be.props):ve=be}}Object(D.a)(ve)==="object"&&!Array.isArray(ve)&&!u.isValidElement(ve)&&(ve=null),V&&(G||z)&&(ve=u.createElement("span",{className:"".concat(Re,"-content")},ve));var ue=ke||{},le=ue.colSpan,re=ue.rowSpan,fe=ue.style,q=ue.className,ee=Object(T.a)(ue,["colSpan","rowSpan","style","className"]),Ce=le!==void 0?le:g,te=re!==void 0?re:w;if(Ce===0||te===0)return null;var J={},X=typeof M=="number",Q=typeof N=="number";X&&(J.position="sticky",J.left=M),Q&&(J.position="sticky",J.right=N);var Ee={};ae&&(Ee.textAlign=ae);var ge,Oe=V===!0?{showTitle:!0}:V;Oe&&(Oe.showTitle||he==="header")&&(typeof ve=="string"||typeof ve=="number"?ge=ve.toString():u.isValidElement(ve)&&typeof ve.props.children=="string"&&(ge=ve.props.children));var Qe=Object(d.a)(Object(d.a)(Object(d.a)({title:ge},ee),B),{},{colSpan:Ce&&Ce!==1?Ce:null,rowSpan:te&&te!==1?te:null,className:E()(Re,t,(i={},Object(P.a)(i,"".concat(Re,"-fix-left"),X),Object(P.a)(i,"".concat(Re,"-fix-left-first"),I),Object(P.a)(i,"".concat(Re,"-fix-left-last"),G),Object(P.a)(i,"".concat(Re,"-fix-right"),Q),Object(P.a)(i,"".concat(Re,"-fix-right-first"),z),Object(P.a)(i,"".concat(Re,"-fix-right-last"),H),Object(P.a)(i,"".concat(Re,"-ellipsis"),V),Object(P.a)(i,"".concat(Re,"-with-append"),K),Object(P.a)(i,"".concat(Re,"-fix-sticky"),(X||Q)&&pe),i),B.className,q),style:Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},B.style),Ee),J),fe),ref:h(v)?y:null});return u.createElement(v,Object.assign({},Qe),K,ve)}var c=u.forwardRef(f);c.displayName="Cell";var m=u.memo(c,function(_,y){return y.shouldCellUpdate?!y.shouldCellUpdate(y.record,_.record):!1});Z.a=m},gJ3r:function(j,Z,L){"use strict";L.d(Z,"a",function(){return P});var P=[{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,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.ECB=function(){var d=P.lib.BlockCipherMode.extend();return d.Encryptor=d.extend({processBlock:function(T,D){this._cipher.encryptBlock(T,D)}}),d.Decryptor=d.extend({processBlock:function(T,D){this._cipher.decryptBlock(T,D)}}),d}(),P.mode.ECB})},h78n:function(j,Z,L){"use strict";L.d(Z,"a",function(){return I});var P=L("q1tI"),d=L.n(P),T=L("TSYQ"),D=L.n(T),u={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},p=function(H){var K=H.map(function(){return Object(P.useRef)()}),U=Object(P.useRef)();return Object(P.useEffect)(function(){var B=Date.now(),V=!1;Object.keys(K).forEach(function(ae){var he=K[ae].current;if(!he)return;V=!0;var pe=he.style;pe.transitionDuration=".3s, .3s, .3s, .06s",U.current&&B-U.current<100&&(pe.transitionDuration="0s, 0s")}),V&&(U.current=Date.now())}),[K]};function C(){return C=Object.assign||function(z){for(var H=1;H<arguments.length;H++){var K=arguments[H];for(var U in K)Object.prototype.hasOwnProperty.call(K,U)&&(z[U]=K[U])}return z},C.apply(this,arguments)}function E(z,H){return f(z)||h(z,H)||s(z,H)||l()}function l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(z,H){if(!z)return;if(typeof z=="string")return n(z,H);var K=Object.prototype.toString.call(z).slice(8,-1);if(K==="Object"&&z.constructor&&(K=z.constructor.name),K==="Map"||K==="Set")return Array.from(z);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return n(z,H)}function n(z,H){(H==null||H>z.length)&&(H=z.length);for(var K=0,U=new Array(H);K<H;K++)U[K]=z[K];return U}function h(z,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var K=[],U=!0,B=!1,V=void 0;try{for(var ae=z[Symbol.iterator](),he;!(U=(he=ae.next()).done)&&!(K.push(he.value),H&&K.length===H);U=!0);}catch(pe){B=!0,V=pe}finally{try{!U&&ae.return!=null&&ae.return()}finally{if(B)throw V}}return K}function f(z){if(Array.isArray(z))return z}function c(z,H){if(z==null)return{};var K=m(z,H),U,B;if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(z);for(B=0;B<V.length;B++){if(U=V[B],H.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;K[U]=z[U]}}return K}function m(z,H){if(z==null)return{};var K={},U=Object.keys(z),B,V;for(V=0;V<U.length;V++){if(B=U[V],H.indexOf(B)>=0)continue;K[B]=z[B]}return K}var _=function(H){var K=H.className,U=H.percent,B=H.prefixCls,V=H.strokeColor,ae=H.strokeLinecap,he=H.strokeWidth,pe=H.style,Re=H.trailColor,ke=H.trailWidth,ve=H.transition,Te=c(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Te.gapPosition;var be=Array.isArray(U)?U:[U],ue=Array.isArray(V)?V:[V],le=p(be),re=E(le,1),fe=re[0],q=he/2,ee=100-he/2,Ce="M ".concat(ae==="round"?q:0,",").concat(q,`
L `).concat(ae==="round"?ee:100,",").concat(q),te="0 0 100 ".concat(he),J=0;return d.a.createElement("svg",C({className:D()("".concat(B,"-line"),K),viewBox:te,preserveAspectRatio:"none",style:pe},Te),d.a.createElement("path",{className:"".concat(B,"-line-trail"),d:Ce,strokeLinecap:ae,stroke:Re,strokeWidth:ke||he,fillOpacity:"0"}),be.map(function(X,Q){var Ee={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:ve||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=ue[Q]||ue[ue.length-1];return J+=X,d.a.createElement("path",{key:Q,className:"".concat(B,"-line-path"),d:Ce,strokeLinecap:ae,stroke:ge,strokeWidth:he,fillOpacity:"0",ref:fe[Q],style:Ee})}))};_.defaultProps=u;var y=_;function i(){return i=Object.assign||function(z){for(var H=1;H<arguments.length;H++){var K=arguments[H];for(var U in K)Object.prototype.hasOwnProperty.call(K,U)&&(z[U]=K[U])}return z},i.apply(this,arguments)}function a(z,H){return k(z)||o(z,H)||S(z,H)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(z,H){if(!z)return;if(typeof z=="string")return x(z,H);var K=Object.prototype.toString.call(z).slice(8,-1);if(K==="Object"&&z.constructor&&(K=z.constructor.name),K==="Map"||K==="Set")return Array.from(z);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return x(z,H)}function x(z,H){(H==null||H>z.length)&&(H=z.length);for(var K=0,U=new Array(H);K<H;K++)U[K]=z[K];return U}function o(z,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var K=[],U=!0,B=!1,V=void 0;try{for(var ae=z[Symbol.iterator](),he;!(U=(he=ae.next()).done)&&!(K.push(he.value),H&&K.length===H);U=!0);}catch(pe){B=!0,V=pe}finally{try{!U&&ae.return!=null&&ae.return()}finally{if(B)throw V}}return K}function k(z){if(Array.isArray(z))return z}function O(z,H){if(z==null)return{};var K=b(z,H),U,B;if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(z);for(B=0;B<V.length;B++){if(U=V[B],H.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;K[U]=z[U]}}return K}function b(z,H){if(z==null)return{};var K={},U=Object.keys(z),B,V;for(V=0;V<U.length;V++){if(B=U[V],H.indexOf(B)>=0)continue;K[B]=z[B]}return K}var v=0;function g(z){return+z.replace("%","")}function w(z){return Array.isArray(z)?z:[z]}function M(z,H,K,U){var B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,V=arguments.length>5?arguments[5]:void 0,ae=50-U/2,he=0,pe=-ae,Re=0,ke=-2*ae;switch(V){case"left":he=-ae,pe=0,Re=2*ae,ke=0;break;case"right":he=ae,pe=0,Re=-2*ae,ke=0;break;case"bottom":pe=ae,ke=2*ae;break;default:}var ve="M 50,50 m ".concat(he,",").concat(pe,`
a `).concat(ae,",").concat(ae," 0 1 1 ").concat(Re,",").concat(-ke,`
a `).concat(ae,",").concat(ae," 0 1 1 ").concat(-Re,",").concat(ke),Te=Math.PI*2*ae,be={stroke:K,strokeDasharray:"".concat(H/100*(Te-B),"px ").concat(Te,"px"),strokeDashoffset:"-".concat(B/2+z/100*(Te-B),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ve,pathStyle:be}}var N=function(H){var K=H.prefixCls,U=H.strokeWidth,B=H.trailWidth,V=H.gapDegree,ae=H.gapPosition,he=H.trailColor,pe=H.strokeLinecap,Re=H.style,ke=H.className,ve=H.strokeColor,Te=H.percent,be=O(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(P.useMemo)(function(){return v+=1,v},[]),le=M(0,100,he,U,V,ae),re=le.pathString,fe=le.pathStyle,q=w(Te),ee=w(ve),Ce=ee.find(function(Ee){return Object.prototype.toString.call(Ee)==="[object Object]"}),te=p(q),J=a(te,1),X=J[0],Q=function(){var ge=0;return q.map(function(Oe,Qe){var rt=ee[Qe]||ee[ee.length-1],nt=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(ue,")"):"",ut=M(ge,Oe,rt,U,V,ae);return ge+=Oe,d.a.createElement("path",{key:Qe,className:"".concat(K,"-circle-path"),d:ut.pathString,stroke:nt,strokeLinecap:pe,strokeWidth:U,opacity:Oe===0?0:1,fillOpacity:"0",style:ut.pathStyle,ref:X[Qe]})})};return d.a.createElement("svg",i({className:D()("".concat(K,"-circle"),ke),viewBox:"0 0 100 100",style:Re},be),Ce&&d.a.createElement("defs",null,d.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(Ee,ge){return g(Ee)-g(ge)}).map(function(Ee,ge){return d.a.createElement("stop",{key:ge,offset:Ee,stopColor:Ce[Ee]})}))),d.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:re,stroke:he,strokeLinecap:pe,strokeWidth:B||U,fillOpacity:"0",style:fe}),Q().reverse())};N.defaultProps=u;var I=N,G={Line:y,Circle:I}},hW8S:function(j,Z,L){"use strict";L.d(Z,"a",function(){return D}),L.d(Z,"c",function(){return u}),L.d(Z,"b",function(){return p});var P=L("VTBJ"),d=L("Ff2n"),T=L("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function u(C){var E=C.expandable,l=Object(d.a)(C,["expandable"]);return"expandable"in C?Object(P.a)(Object(P.a)({},l),E):l}function p(C){return Object.keys(C).reduce(function(E,l){return(l.substr(0,5)==="data-"||l.substr(0,5)==="aria-")&&(E[l]=C[l]),E},{})}},jO9C:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(d,T){d.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(d,T)},unpad:function(d){P.pad.ZeroPadding.unpad(d),d.sigBytes--}},P.pad.Iso97971})},jwmR:function(j,Z,L){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Z,L){"use strict";L.d(Z,"a",function(){return Ar});var P=L("rePB"),d=L("ODXe"),T=L("Ff2n"),D=L("VTBJ"),u=L("q1tI"),p=L("TSYQ"),C=L.n(p),E=L("Zm9Q"),l=L("6cGi"),s=L("KQm4"),n=L("xEkU"),h=L.n(n),f=L("t23M");function c(Ie){var Ge=Object(u.useRef)(),Ye=Object(u.useRef)(!1);function Fe(){for(var ye=arguments.length,Pe=new Array(ye),we=0;we<ye;we++)Pe[we]=arguments[we];Ye.current||(h.a.cancel(Ge.current),Ge.current=h()(function(){Ie.apply(void 0,Pe)}))}return Object(u.useEffect)(function(){return function(){Ye.current=!0,h.a.cancel(Ge.current)}},[]),Fe}function m(Ie){var Ge=Object(u.useRef)([]),Ye=Object(u.useState)({}),Fe=Object(d.a)(Ye,2),ye=Fe[1],Pe=Object(u.useRef)(typeof Ie=="function"?Ie():Ie),we=c(function(){var ze=Pe.current;Ge.current.forEach(function(Xe){ze=Xe(ze)}),Ge.current=[],Pe.current=ze,ye({})});function je(ze){Ge.current.push(ze),we()}return[Pe.current,je]}var _=L("4IlW");function y(Ie,Ge){var Ye,Fe=Ie.prefixCls,ye=Ie.id,Pe=Ie.active,we=Ie.rtl,je=Ie.tab,ze=je.key,Xe=je.tab,We=je.disabled,qe=je.closeIcon,ft=Ie.tabBarGutter,kt=Ie.tabPosition,It=Ie.closable,Xt=Ie.renderWrapper,Pr=Ie.removeAriaLabel,Gr=Ie.editable,Kr=Ie.onClick,Qr=Ie.onRemove,Wr=Ie.onFocus,en="".concat(Fe,"-tab");u.useEffect(function(){return Qr},[]);var tn={};kt==="top"||kt==="bottom"?tn[we?"marginLeft":"marginRight"]=ft:tn.marginBottom=ft;var pn=Gr&&It!==!1&&!We;function on(Mr){if(We)return;Kr(Mr)}function kn(Mr){Mr.preventDefault(),Mr.stopPropagation(),Gr.onEdit("remove",{key:ze,event:Mr})}var ln=u.createElement("div",{key:ze,ref:Ge,className:C()(en,(Ye={},Object(P.a)(Ye,"".concat(en,"-with-remove"),pn),Object(P.a)(Ye,"".concat(en,"-active"),Pe),Object(P.a)(Ye,"".concat(en,"-disabled"),We),Ye)),style:tn,onClick:on},u.createElement("div",{role:"tab","aria-selected":Pe,id:ye&&"".concat(ye,"-tab-").concat(ze),className:"".concat(en,"-btn"),"aria-controls":ye&&"".concat(ye,"-panel-").concat(ze),"aria-disabled":We,tabIndex:We?null:0,onClick:function(Fr){Fr.stopPropagation(),on(Fr)},onKeyDown:function(Fr){[_.a.SPACE,_.a.ENTER].includes(Fr.which)&&(Fr.preventDefault(),on(Fr))},onFocus:Wr},Xe),pn&&u.createElement("button",{type:"button","aria-label":Pr||"remove",tabIndex:0,className:"".concat(en,"-remove"),onClick:function(Fr){Fr.stopPropagation(),kn(Fr)}},qe||Gr.removeIcon||"\xD7"));return Xt&&(ln=Xt(ln)),ln}var i=u.forwardRef(y),a={width:0,height:0,left:0,top:0};function t(Ie,Ge,Ye){return Object(u.useMemo)(function(){for(var Fe,ye=new Map,Pe=Ge.get((Fe=Ie[0])===null||Fe===void 0?void 0:Fe.key)||a,we=Pe.left+Pe.width,je=0;je<Ie.length;je+=1){var ze=Ie[je].key,Xe=Ge.get(ze);if(!Xe){var We;Xe=Ge.get((We=Ie[je-1])===null||We===void 0?void 0:We.key)||a}var qe=ye.get(ze)||Object(D.a)({},Xe);qe.right=we-qe.left-qe.width,ye.set(ze,qe)}return ye},[Ie.map(function(Fe){return Fe.key}).join("_"),Ge,Ye])}var S={width:0,height:0,left:0,top:0,right:0};function x(Ie,Ge,Ye,Fe,ye){var Pe=ye.tabs,we=ye.tabPosition,je=ye.rtl,ze,Xe,We;["top","bottom"].includes(we)?(ze="width",Xe=je?"right":"left",We=Math.abs(Ge.left)):(ze="height",Xe="top",We=-Ge.top);var qe=Ge[ze],ft=Ye[ze],kt=Fe[ze],It=qe;return ft+kt>qe&&(It=qe-kt),Object(u.useMemo)(function(){if(!Pe.length)return[0,0];for(var Xt=Pe.length,Pr=Xt,Gr=0;Gr<Xt;Gr+=1){var Kr=Ie.get(Pe[Gr].key)||S;if(Kr[Xe]+Kr[ze]>We+It){Pr=Gr-1;break}}for(var Qr=0,Wr=Xt-1;Wr>=0;Wr-=1){var en=Ie.get(Pe[Wr].key)||S;if(en[Xe]<We){Qr=Wr+1;break}}return[Qr,Pr]},[Ie,We,It,we,Pe.map(function(Xt){return Xt.key}).join("_"),je])}var o=L("wx14"),k=L("1OyB"),O=L("vuIU"),b=L("JX7q"),v=L("Ji7U"),g=L("LK+K"),w=L("I8Z2"),M=L("bT9E"),N=L("2GS6"),I=L("Gytx"),G=L.n(I),z=L("U8pU"),H=/iPhone/i,K=/iPod/i,U=/iPad/i,B=/\bAndroid(?:.+)Mobile\b/i,V=/Android/i,ae=/\bAndroid(?:.+)SD4930UR\b/i,he=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,pe=/Windows Phone/i,Re=/\bWindows(?:.+)ARM\b/i,ke=/BlackBerry/i,ve=/BB10/i,Te=/Opera Mini/i,be=/\b(CriOS|Chrome)(?:.+)Mobile/i,ue=/Mobile(?:.+)Firefox\b/i;function le(Ie,Ge){return Ie.test(Ge)}function re(Ie){var Ge=Ie||(typeof navigator!="undefined"?navigator.userAgent:""),Ye=(Ge||"").split("[FBAN");if(typeof Ye[1]!="undefined"){var Fe=Ye,ye=Object(d.a)(Fe,1);Ge=ye[0]}if(Ye=Ge.split("Twitter"),typeof Ye[1]!="undefined"){var Pe=Ye,we=Object(d.a)(Pe,1);Ge=we[0]}var je={apple:{phone:le(H,Ge)&&!le(pe,Ge),ipod:le(K,Ge),tablet:!le(H,Ge)&&le(U,Ge)&&!le(pe,Ge),device:(le(H,Ge)||le(K,Ge)||le(U,Ge))&&!le(pe,Ge)},amazon:{phone:le(ae,Ge),tablet:!le(ae,Ge)&&le(he,Ge),device:le(ae,Ge)||le(he,Ge)},android:{phone:!le(pe,Ge)&&le(ae,Ge)||!le(pe,Ge)&&le(B,Ge),tablet:!le(pe,Ge)&&!le(ae,Ge)&&!le(B,Ge)&&(le(he,Ge)||le(V,Ge)),device:!le(pe,Ge)&&(le(ae,Ge)||le(he,Ge)||le(B,Ge)||le(V,Ge))||le(/\bokhttp\b/i,Ge)},windows:{phone:le(pe,Ge),tablet:le(Re,Ge),device:le(pe,Ge)||le(Re,Ge)},other:{blackberry:le(ke,Ge),blackberry10:le(ve,Ge),opera:le(Te,Ge),firefox:le(ue,Ge),chrome:le(be,Ge),device:le(ke,Ge)||le(ve,Ge)||le(Te,Ge)||le(ue,Ge)||le(be,Ge)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var fe=Object(D.a)(Object(D.a)({},re()),{},{isMobile:re}),q=fe;function ee(){}function Ce(Ie,Ge,Ye){var Fe=Ge||"";return Ie.key||"".concat(Fe,"item_").concat(Ye)}function te(Ie){return"".concat(Ie,"-menu-")}function J(Ie,Ge){var Ye=-1;u.Children.forEach(Ie,function(Fe){Ye+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?u.Children.forEach(Fe.props.children,function(ye){Ye+=1,Ge(ye,Ye)}):Ge(Fe,Ye)})}function X(Ie,Ge,Ye){if(!Ie||Ye.find)return;u.Children.forEach(Ie,function(Fe){if(Fe){var ye=Fe.type;if(!ye||!(ye.isSubMenu||ye.isMenuItem||ye.isMenuItemGroup))return;Ge.indexOf(Fe.key)!==-1?Ye.find=!0:Fe.props.children&&X(Fe.props.children,Ge,Ye)}})}var Q=["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"],Ee=function(Ge){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if(Ye){var ye=getComputedStyle(Ge),Pe=ye.marginLeft,we=ye.marginRight;Fe+=+Pe.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ge=function(Ge,Ye,Fe){Ge&&Object(z.a)(Ge.style)==="object"&&(Ge.style[Ye]=Fe)},Oe=function(){return q.any},Qe=L("bdgK"),rt=L("i8i4"),nt=L.n(rt),ut=L("wgJM"),dt=L("l4aY"),mt=L("m+aA"),He=L("c+Xe"),De=L("zT1h"),at=L("QC+M");function ht(Ie,Ge,Ye){return Ye?Ie[0]===Ge[0]:Ie[0]===Ge[0]&&Ie[1]===Ge[1]}function Ze(Ie,Ge,Ye){var Fe=Ie[Ge]||{};return Object(D.a)(Object(D.a)({},Fe),Ye)}function st(Ie,Ge,Ye,Fe){for(var ye=Ye.points,Pe=Object.keys(Ie),we=0;we<Pe.length;we+=1){var je=Pe[we];if(ht(Ie[je].points,ye,Fe))return"".concat(Ge,"-placement-").concat(je)}return""}var Ue=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ie=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(Ie)||/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(Ie==null?void 0:Ie.substr(0,4)))},Me=L("MNnm");function Ne(Ie,Ge){var Ye={};return Ye[Ie.toLowerCase()]=Ge.toLowerCase(),Ye["Webkit".concat(Ie)]="webkit".concat(Ge),Ye["Moz".concat(Ie)]="moz".concat(Ge),Ye["ms".concat(Ie)]="MS".concat(Ge),Ye["O".concat(Ie)]="o".concat(Ge.toLowerCase()),Ye}function xe(Ie,Ge){var Ye={animationend:Ne("Animation","AnimationEnd"),transitionend:Ne("Transition","TransitionEnd")};return Ie&&("AnimationEvent"in Ge||delete Ye.animationend.animation,"TransitionEvent"in Ge||delete Ye.transitionend.transition),Ye}var Se=xe(Object(Me.a)(),typeof window!="undefined"?window:{}),Ae={};if(Object(Me.a)()){var Le=document.createElement("div");Ae=Le.style}var Je={};function Ve(Ie){if(Je[Ie])return Je[Ie];var Ge=Se[Ie];if(Ge)for(var Ye=Object.keys(Ge),Fe=Ye.length,ye=0;ye<Fe;ye+=1){var Pe=Ye[ye];if(Object.prototype.hasOwnProperty.call(Ge,Pe)&&Pe in Ae)return Je[Ie]=Ge[Pe],Je[Ie]}return""}var gt=Ve("animationend"),yt=Ve("transitionend"),Bt=!!(gt&&yt),Nt=gt||"animationend",mr=yt||"transitionend";function hr(Ie,Ge){if(!Ie)return null;if(Object(z.a)(Ie)==="object"){var Ye=Ge.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return Ie[Ye]}return"".concat(Ie,"-").concat(Ge)}var St="none",$r="appear",Xr="enter",Ur="leave",sn="none",Rr="prepare",mn="start",vn="active",Gt="end";function Cn(Ie){var Ge=Object(u.useRef)(!1),Ye=Object(u.useState)(Ie),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1];function we(je){Ge.current||Pe(je)}return Object(u.useEffect)(function(){return function(){Ge.current=!0}},[]),[ye,we]}var yn=Object(Me.a)()?u.useLayoutEffect:u.useEffect,Sn=yn,xn=function(){var Ie=u.useRef(null);function Ge(){ut.a.cancel(Ie.current)}function Ye(Fe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Pe=Object(ut.a)(function(){ye<=1?Fe({isCanceled:function(){return Pe!==Ie.current}}):Ye(Fe,ye-1)});Ie.current=Pe}return u.useEffect(function(){return function(){Ge()}},[]),[Ye,Ge]},xi=[Rr,mn,vn,Gt],Ti=!1,hn=!0;function cr(Ie){return Ie===vn||Ie===Gt}var Gn=function(Ie,Ge){var Ye=u.useState(sn),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1],we=xn(),je=Object(d.a)(we,2),ze=je[0],Xe=je[1];function We(){Pe(Rr)}return Sn(function(){if(ye!==sn&&ye!==Gt){var qe=xi.indexOf(ye),ft=xi[qe+1],kt=Ge(ye);kt===Ti?Pe(ft):ze(function(It){function Xt(){if(It.isCanceled())return;Pe(ft)}kt===!0?Xt():Promise.resolve(kt).then(Xt)})}},[Ie,ye]),u.useEffect(function(){return function(){Xe()}},[]),[We,ye]},pi=function(Ie){var Ge=Object(u.useRef)(),Ye=Object(u.useRef)(Ie);Ye.current=Ie;var Fe=u.useCallback(function(we){Ye.current(we)},[]);function ye(we){we&&(we.removeEventListener(mr,Fe),we.removeEventListener(Nt,Fe))}function Pe(we){Ge.current&&Ge.current!==we&&ye(Ge.current),we&&we!==Ge.current&&(we.addEventListener(mr,Fe),we.addEventListener(Nt,Fe),Ge.current=we)}return u.useEffect(function(){return function(){ye(Ge.current)}},[]),[Pe,ye]};function Vn(Ie,Ge,Ye,Fe){var ye=Fe.motionEnter,Pe=ye===void 0?!0:ye,we=Fe.motionAppear,je=we===void 0?!0:we,ze=Fe.motionLeave,Xe=ze===void 0?!0:ze,We=Fe.motionDeadline,qe=Fe.motionLeaveImmediately,ft=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,It=Fe.onLeavePrepare,Xt=Fe.onAppearStart,Pr=Fe.onEnterStart,Gr=Fe.onLeaveStart,Kr=Fe.onAppearActive,Qr=Fe.onEnterActive,Wr=Fe.onLeaveActive,en=Fe.onAppearEnd,tn=Fe.onEnterEnd,pn=Fe.onLeaveEnd,on=Fe.onVisibleChanged,kn=Cn(),ln=Object(d.a)(kn,2),Mr=ln[0],Fr=ln[1],nn=Cn(St),dn=Object(d.a)(nn,2),wr=dn[0],bn=dn[1],Wn=Cn(null),wn=Object(d.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(u.useRef)(!1),ri=Object(u.useRef)(null),Hn=Object(u.useRef)(!1),di=Object(u.useRef)(null);function Xi(){var Pn=Ye();return Pn||di.current}var wi=Object(u.useRef)(!1);function ni(Pn){var On=Xi();if(Pn&&!Pn.deadline&&Pn.target!==On)return;var qn;wr===$r&&wi.current?qn=en==null?void 0:en(On,Pn):wr===Xr&&wi.current?qn=tn==null?void 0:tn(On,Pn):wr===Ur&&wi.current&&(qn=pn==null?void 0:pn(On,Pn)),qn!==!1&&!Hn.current&&(bn(St),Tn(null))}var In=pi(ni),Nn=Object(d.a)(In,1),zn=Nn[0],Bn=u.useMemo(function(){var Pn,On,qn;switch(wr){case"appear":return Pn={},Object(P.a)(Pn,Rr,ft),Object(P.a)(Pn,mn,Xt),Object(P.a)(Pn,vn,Kr),Pn;case"enter":return On={},Object(P.a)(On,Rr,kt),Object(P.a)(On,mn,Pr),Object(P.a)(On,vn,Qr),On;case"leave":return qn={},Object(P.a)(qn,Rr,It),Object(P.a)(qn,mn,Gr),Object(P.a)(qn,vn,Wr),qn;default:return{}}},[wr]),Zn=Gn(wr,function(Pn){if(Pn===Rr){var On=Bn[Rr];return On?On(Xi()):Ti}if(An in Bn){var qn;Tn(((qn=Bn[An])===null||qn===void 0?void 0:qn.call(Bn,Xi(),null))||null)}return An===vn&&(zn(Xi()),We>0&&(clearTimeout(ri.current),ri.current=setTimeout(function(){ni({deadline:!0})},We))),hn}),Di=Object(d.a)(Zn,2),ra=Di[0],An=Di[1],Ui=cr(An);wi.current=Ui,Sn(function(){Fr(Ge);var Pn=Yn.current;if(Yn.current=!0,!Ie)return;var On;!Pn&&Ge&&je&&(On=$r),Pn&&Ge&&Pe&&(On=Xr),(Pn&&!Ge&&Xe||!Pn&&qe&&!Ge&&Xe)&&(On=Ur),On&&(bn(On),ra())},[Ge]),Object(u.useEffect)(function(){(wr===$r&&!je||wr===Xr&&!Pe||wr===Ur&&!Xe)&&bn(St)},[je,Pe,Xe]),Object(u.useEffect)(function(){return function(){clearTimeout(ri.current),Hn.current=!0}},[]),Object(u.useEffect)(function(){Mr!==void 0&&wr===St&&(on==null||on(Mr))},[Mr,wr]);var Bi=Mn;return Bn[Rr]&&An===mn&&(Bi=Object(D.a)({transition:"none"},Bi)),[wr,An,Bi,Mr!=null?Mr:Ge]}var Yr=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){return Object(k.a)(this,Ye),Ge.apply(this,arguments)}return Object(O.a)(Ye,[{key:"render",value:function(){return this.props.children}}]),Ye}(u.Component),Un=Yr;function ui(Ie){var Ge=Ie;Object(z.a)(Ie)==="object"&&(Ge=Ie.transitionSupport);function Ye(ye){return!!(ye.motionName&&Ge)}var Fe=u.forwardRef(function(ye,Pe){var we=ye.visible,je=we===void 0?!0:we,ze=ye.removeOnLeave,Xe=ze===void 0?!0:ze,We=ye.forceRender,qe=ye.children,ft=ye.motionName,kt=ye.leavedClassName,It=ye.eventProps,Xt=Ye(ye),Pr=Object(u.useRef)(),Gr=Object(u.useRef)();function Kr(){try{return Object(mt.a)(Pr.current||Gr.current)}catch(bn){return null}}var Qr=Vn(Xt,je,Kr,ye),Wr=Object(d.a)(Qr,4),en=Wr[0],tn=Wr[1],pn=Wr[2],on=Wr[3],kn=u.useRef(on);on&&(kn.current=!0);var ln=Object(u.useRef)(Pe);ln.current=Pe;var Mr=u.useCallback(function(bn){Pr.current=bn,Object(He.b)(ln.current,bn)},[]),Fr,nn=Object(D.a)(Object(D.a)({},It),{},{visible:je});if(!qe)Fr=null;else if(en===St||!Ye(ye))on?Fr=qe(Object(D.a)({},nn),Mr):!Xe&&kn.current?Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{className:kt}),Mr):We?Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{style:{display:"none"}}),Mr):Fr=null;else{var dn,wr;tn===Rr?wr="prepare":cr(tn)?wr="active":tn===mn&&(wr="start"),Fr=qe(Object(D.a)(Object(D.a)({},nn),{},{className:C()(hr(ft,en),(dn={},Object(P.a)(dn,hr(ft,"".concat(en,"-").concat(wr)),wr),Object(P.a)(dn,ft,typeof ft=="string"),dn)),style:pn}),Mr)}return u.createElement(Un,{ref:Gr},Fr)});return Fe.displayName="CSSMotion",Fe}var ci=ui(Bt),jt="add",_r="keep",ai="remove",Oi="removed";function Ai(Ie){var Ge;return Ie&&Object(z.a)(Ie)==="object"&&"key"in Ie?Ge=Ie:Ge={key:Ie},Object(D.a)(Object(D.a)({},Ge),{},{key:String(Ge.key)})}function Ri(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ie.map(Ai)}function se(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ye=[],Fe=0,ye=Ge.length,Pe=Ri(Ie),we=Ri(Ge);Pe.forEach(function(Xe){for(var We=!1,qe=Fe;qe<ye;qe+=1){var ft=we[qe];if(ft.key===Xe.key){Fe<qe&&(Ye=Ye.concat(we.slice(Fe,qe).map(function(kt){return Object(D.a)(Object(D.a)({},kt),{},{status:jt})})),Fe=qe),Ye.push(Object(D.a)(Object(D.a)({},ft),{},{status:_r})),Fe+=1,We=!0;break}}We||Ye.push(Object(D.a)(Object(D.a)({},Xe),{},{status:ai}))}),Fe<ye&&(Ye=Ye.concat(we.slice(Fe).map(function(Xe){return Object(D.a)(Object(D.a)({},Xe),{},{status:jt})})));var je={};Ye.forEach(function(Xe){var We=Xe.key;je[We]=(je[We]||0)+1});var ze=Object.keys(je).filter(function(Xe){return je[Xe]>1});return ze.forEach(function(Xe){Ye=Ye.filter(function(We){var qe=We.key,ft=We.status;return qe!==Xe||ft!==ai}),Ye.forEach(function(We){We.key===Xe&&(We.status=_r)})}),Ye}var W=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Ie){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ci,Ye=function(Fe){Object(v.a)(Pe,Fe);var ye=Object(g.a)(Pe);function Pe(){var we;return Object(k.a)(this,Pe),we=ye.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(je){we.setState(function(ze){var Xe=ze.keyEntities;return{keyEntities:Xe.map(function(We){return We.key!==je?We:Object(D.a)(Object(D.a)({},We),{},{status:Oi})})}})},we}return Object(O.a)(Pe,[{key:"render",value:function(){var je=this,ze=this.state.keyEntities,Xe=this.props,We=Xe.component,qe=Xe.children,ft=Xe.onVisibleChanged,kt=Object(T.a)(Xe,["component","children","onVisibleChanged"]),It=We||u.Fragment,Xt={};return W.forEach(function(Pr){Xt[Pr]=kt[Pr],delete kt[Pr]}),delete kt.keys,u.createElement(It,kt,ze.map(function(Pr){var Gr=Pr.status,Kr=Object(T.a)(Pr,["status"]),Qr=Gr===jt||Gr===_r;return u.createElement(Ge,Object(o.a)({},Xt,{key:Kr.key,visible:Qr,eventProps:Kr,onVisibleChanged:function(en){ft==null||ft(en,{key:Kr.key}),en||je.removeKey(Kr.key)}}),qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,ze){var Xe=je.keys,We=ze.keyEntities,qe=Ri(Xe),ft=se(We,qe);return{keyEntities:ft.filter(function(kt){var It=We.find(function(Xt){var Pr=Xt.key;return kt.key===Pr});return!(It&&It.status===Oi&&kt.status===ai)})}}}]),Pe}(u.Component);return Ye.defaultProps={component:"div"},Ye}var ne=$(Bt),ce=ci;function oe(Ie){var Ge=Ie.prefixCls,Ye=Ie.motion,Fe=Ie.animation,ye=Ie.transitionName;return Ye||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:ye?{motionName:ye}:null)}function Ke(Ie){var Ge=Ie.prefixCls,Ye=Ie.visible,Fe=Ie.zIndex,ye=Ie.mask,Pe=Ie.maskMotion,we=Ie.maskAnimation,je=Ie.maskTransitionName;if(!ye)return null;var ze={};return(Pe||je||we)&&(ze=Object(D.a)({motionAppear:!0},oe({motion:Pe,prefixCls:Ge,transitionName:je,animation:we}))),u.createElement(ce,Object(o.a)({},ze,{visible:Ye,removeOnLeave:!0}),function(Xe){var We=Xe.className;return u.createElement("div",{style:{zIndex:Fe},className:C()("".concat(Ge,"-mask"),We)})})}var At=L("9mu1"),Vt=L("o0o1"),vr=L.n(Vt),Pt=L("HaE+"),Br=["measure","align",null,"motion"],jr=function(Ie,Ge){var Ye=Object(u.useState)(null),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1],we=Object(u.useRef)(),je=Object(u.useRef)(!1);function ze(qe){je.current||Pe(qe)}function Xe(){ut.a.cancel(we.current)}function We(qe){Xe(),we.current=Object(ut.a)(function(){ze(function(ft){switch(ye){case"align":return"motion";case"motion":return"stable";default:}return ft}),qe==null||qe()})}return Object(u.useEffect)(function(){ze("measure")},[Ie]),Object(u.useEffect)(function(){switch(ye){case"measure":Ge();break;default:}ye&&(we.current=Object(ut.a)(Object(Pt.a)(vr.a.mark(function qe(){var ft,kt;return vr.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:ft=Br.indexOf(ye),kt=Br[ft+1],kt&&ft!==-1&&ze(kt);case 3:case"end":return Xt.stop()}},qe)}))))},[ye]),Object(u.useEffect)(function(){return function(){je.current=!0,Xe()}},[]),[ye,We]},fn=function(Ie){var Ge=u.useState({width:0,height:0}),Ye=Object(d.a)(Ge,2),Fe=Ye[0],ye=Ye[1];function Pe(je){ye({width:je.offsetWidth,height:je.offsetHeight})}var we=u.useMemo(function(){var je={};if(Ie){var ze=Fe.width,Xe=Fe.height;Ie.indexOf("height")!==-1&&Xe?je.height=Xe:Ie.indexOf("minHeight")!==-1&&Xe&&(je.minHeight=Xe),Ie.indexOf("width")!==-1&&ze?je.width=ze:Ie.indexOf("minWidth")!==-1&&ze&&(je.minWidth=ze)}return je},[Ie,Fe]);return[we,Pe]},ti=u.forwardRef(function(Ie,Ge){var Ye=Ie.visible,Fe=Ie.prefixCls,ye=Ie.className,Pe=Ie.style,we=Ie.children,je=Ie.zIndex,ze=Ie.stretch,Xe=Ie.destroyPopupOnHide,We=Ie.forceRender,qe=Ie.align,ft=Ie.point,kt=Ie.getRootDomNode,It=Ie.getClassNameFromAlign,Xt=Ie.onAlign,Pr=Ie.onMouseEnter,Gr=Ie.onMouseLeave,Kr=Ie.onMouseDown,Qr=Ie.onTouchStart,Wr=Object(u.useRef)(),en=Object(u.useRef)(),tn=Object(u.useState)(),pn=Object(d.a)(tn,2),on=pn[0],kn=pn[1],ln=fn(ze),Mr=Object(d.a)(ln,2),Fr=Mr[0],nn=Mr[1];function dn(){ze&&nn(kt())}var wr=jr(Ye,dn),bn=Object(d.a)(wr,2),Wn=bn[0],wn=bn[1],Mn=Object(u.useRef)();function Tn(){return ft||kt}function Yn(){var In;(In=Wr.current)===null||In===void 0||In.forceAlign()}function ri(In,Nn){var zn=It(Nn);on!==zn&&kn(zn),Wn==="align"&&(on!==zn?Promise.resolve().then(function(){Yn()}):wn(function(){var Bn;(Bn=Mn.current)===null||Bn===void 0||Bn.call(Mn)}),Xt==null||Xt(In,Nn))}var Hn=Object(D.a)({},oe(Ie));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Nn=Hn[In];Hn[In]=function(zn,Bn){return wn(),Nn==null?void 0:Nn(zn,Bn)}});function di(){return new Promise(function(In){Mn.current=In})}u.useEffect(function(){!Hn.motionName&&Wn==="motion"&&wn()},[Hn.motionName,Wn]),u.useImperativeHandle(Ge,function(){return{forceAlign:Yn,getElement:function(){return en.current}}});var Xi=Object(D.a)(Object(D.a)({},Fr),{},{zIndex:je,opacity:Wn==="motion"||Wn==="stable"||!Ye?void 0:0,pointerEvents:Wn==="stable"?void 0:"none"},Pe),wi=!0;(qe==null?void 0:qe.points)&&(Wn==="align"||Wn==="stable")&&(wi=!1);var ni=we;return u.Children.count(we)>1&&(ni=u.createElement("div",{className:"".concat(Fe,"-content")},we)),u.createElement(ce,Object(o.a)({visible:Ye,ref:en,leavedClassName:"".concat(Fe,"-hidden")},Hn,{onAppearPrepare:di,onEnterPrepare:di,removeOnLeave:Xe,forceRender:We}),function(In,Nn){var zn=In.className,Bn=In.style,Zn=C()(Fe,ye,on,zn);return u.createElement(At.a,{target:Tn(),key:"popup",ref:Wr,monitorWindowResize:!0,disabled:wi,align:qe,onAlign:ri},u.createElement("div",{ref:Nn,className:Zn,onMouseEnter:Pr,onMouseLeave:Gr,onMouseDownCapture:Kr,onTouchStartCapture:Qr,style:Object(D.a)(Object(D.a)({},Bn),Xi)},ni))})});ti.displayName="PopupInner";var mi=ti,Rn=u.forwardRef(function(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.visible,ye=Ie.zIndex,Pe=Ie.children,we=Ie.mobile;we=we===void 0?{}:we;var je=we.popupClassName,ze=we.popupStyle,Xe=we.popupMotion,We=Xe===void 0?{}:Xe,qe=we.popupRender,ft=u.useRef();u.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ft.current}}});var kt=Object(D.a)({zIndex:ye},ze),It=Pe;return u.Children.count(Pe)>1&&(It=u.createElement("div",{className:"".concat(Ye,"-content")},Pe)),qe&&(It=qe(It)),u.createElement(ce,Object(o.a)({visible:Fe,ref:ft,removeOnLeave:!0},We),function(Xt,Pr){var Gr=Xt.className,Kr=Xt.style,Qr=C()(Ye,je,Gr);return u.createElement("div",{ref:Pr,className:Qr,style:Object(D.a)(Object(D.a)({},Kr),kt)},It)})});Rn.displayName="MobilePopupInner";var Li=Rn,qi=["visible","mobile"],Qn=u.forwardRef(function(Ie,Ge){var Ye=Ie.visible,Fe=Ie.mobile,ye=Object(T.a)(Ie,qi),Pe=Object(u.useState)(Ye),we=Object(d.a)(Pe,2),je=we[0],ze=we[1],Xe=Object(u.useState)(!1),We=Object(d.a)(Xe,2),qe=We[0],ft=We[1],kt=Object(D.a)(Object(D.a)({},ye),{},{visible:je});Object(u.useEffect)(function(){ze(Ye),Ye&&Fe&&ft(Ue())},[Ye,Fe]);var It=qe?u.createElement(Li,Object(o.a)({},kt,{mobile:Fe,ref:Ge})):u.createElement(mi,Object(o.a)({},kt,{ref:Ge}));return u.createElement("div",null,u.createElement(Ke,kt),It)});Qn.displayName="Popup";var _i=Qn,vi=u.createContext(null),Fi=vi;function gi(){}function Gi(){return""}function Mi(Ie){return Ie?Ie.ownerDocument:window.document}var oa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function sa(Ie){var Ge=function(Ye){Object(v.a)(ye,Ye);var Fe=Object(g.a)(ye);function ye(Pe){var we;Object(k.a)(this,ye),we=Fe.call(this,Pe),we.popupRef=u.createRef(),we.triggerRef=u.createRef(),we.attachId=void 0,we.clickOutsideHandler=void 0,we.touchOutsideHandler=void 0,we.contextMenuOutsideHandler1=void 0,we.contextMenuOutsideHandler2=void 0,we.mouseDownTimeout=void 0,we.focusTime=void 0,we.preClickTime=void 0,we.preTouchTime=void 0,we.delayTimer=void 0,we.hasPopupMouseDown=void 0,we.onMouseEnter=function(ze){var Xe=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",ze),we.delaySetPopupVisible(!0,Xe,Xe?null:ze)},we.onMouseMove=function(ze){we.fireEvents("onMouseMove",ze),we.setPoint(ze)},we.onMouseLeave=function(ze){we.fireEvents("onMouseLeave",ze),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(ze){var Xe;if(ze.relatedTarget&&!ze.relatedTarget.setTimeout&&Object(dt.a)((Xe=we.popupRef.current)===null||Xe===void 0?void 0:Xe.getElement(),ze.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(ze){we.fireEvents("onFocus",ze),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(ze){we.fireEvents("onMouseDown",ze),we.preClickTime=Date.now()},we.onTouchStart=function(ze){we.fireEvents("onTouchStart",ze),we.preTouchTime=Date.now()},we.onBlur=function(ze){we.fireEvents("onBlur",ze),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(ze){ze.preventDefault(),we.fireEvents("onContextMenu",ze),we.setPopupVisible(!0,ze)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(ze){if(we.fireEvents("onClick",ze),we.focusTime){var Xe;if(we.preClickTime&&we.preTouchTime?Xe=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Xe=we.preClickTime:we.preTouchTime&&(Xe=we.preTouchTime),Math.abs(Xe-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&ze&&ze.preventDefault&&ze.preventDefault();var We=!we.state.popupVisible;(we.isClickToHide()&&!We||We&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,ze)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var ze;(ze=we.context).onPopupMouseDown.apply(ze,arguments)}},we.onDocumentClick=function(ze){if(we.props.mask&&!we.props.maskClosable)return;var Xe=ze.target,We=we.getRootDomNode(),qe=we.getPopupDomNode();(!Object(dt.a)(We,Xe)||we.isContextMenuOnly())&&!Object(dt.a)(qe,Xe)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var ze=we.props.getTriggerDOMNode;if(ze)return ze(we.triggerRef.current);try{var Xe=Object(mt.a)(we.triggerRef.current);if(Xe)return Xe}catch(We){}return nt.a.findDOMNode(Object(b.a)(we))},we.getPopupClassNameFromAlign=function(ze){var Xe=[],We=we.props,qe=We.popupPlacement,ft=We.builtinPlacements,kt=We.prefixCls,It=We.alignPoint,Xt=We.getPopupClassNameFromAlign;return qe&&ft&&Xe.push(st(ft,kt,ze,It)),Xt&&Xe.push(Xt(ze)),Xe.join(" ")},we.getComponent=function(){var ze=we.props,Xe=ze.prefixCls,We=ze.destroyPopupOnHide,qe=ze.popupClassName,ft=ze.onPopupAlign,kt=ze.popupMotion,It=ze.popupAnimation,Xt=ze.popupTransitionName,Pr=ze.popupStyle,Gr=ze.mask,Kr=ze.maskAnimation,Qr=ze.maskTransitionName,Wr=ze.maskMotion,en=ze.zIndex,tn=ze.popup,pn=ze.stretch,on=ze.alignPoint,kn=ze.mobile,ln=ze.forceRender,Mr=we.state,Fr=Mr.popupVisible,nn=Mr.point,dn=we.getPopupAlign(),wr={};return we.isMouseEnterToShow()&&(wr.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(wr.onMouseLeave=we.onPopupMouseLeave),wr.onMouseDown=we.onPopupMouseDown,wr.onTouchStart=we.onPopupMouseDown,u.createElement(_i,Object(o.a)({prefixCls:Xe,destroyPopupOnHide:We,visible:Fr,point:on&&nn,className:qe,align:dn,onAlign:ft,animation:It,getClassNameFromAlign:we.getPopupClassNameFromAlign},wr,{stretch:pn,getRootDomNode:we.getRootDomNode,style:Pr,mask:Gr,zIndex:en,transitionName:Xt,maskAnimation:Kr,maskTransitionName:Qr,maskMotion:Wr,ref:we.popupRef,motion:kt,mobile:kn,forceRender:ln}),typeof tn=="function"?tn():tn)},we.attachParent=function(ze){ut.a.cancel(we.attachId);var Xe=we.props,We=Xe.getPopupContainer,qe=Xe.getDocument,ft=we.getRootDomNode(),kt;We?(ft||We.length===0)&&(kt=We(ft)):kt=qe(we.getRootDomNode()).body,kt?kt.appendChild(ze):we.attachId=Object(ut.a)(function(){we.attachParent(ze)})},we.getContainer=function(){var ze=we.props.getDocument,Xe=ze(we.getRootDomNode()).createElement("div");return Xe.style.position="absolute",Xe.style.top="0",Xe.style.left="0",Xe.style.width="100%",we.attachParent(Xe),Xe},we.setPoint=function(ze){var Xe=we.props.alignPoint;if(!Xe||!ze)return;we.setState({point:{pageX:ze.pageX,pageY:ze.pageY}})},we.handlePortalUpdate=function(){we.state.prevPopupVisible!==we.state.popupVisible&&we.props.afterPopupVisibleChange(we.state.popupVisible)},we.triggerContextValue={onPopupMouseDown:we.onPopupMouseDown};var je;return"popupVisible"in Pe?je=!!Pe.popupVisible:je=!!Pe.defaultPopupVisible,we.state={prevPopupVisible:je,popupVisible:je},oa.forEach(function(ze){we["fire".concat(ze)]=function(Xe){we.fireEvents(ze,Xe)}}),we}return Object(O.a)(ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,je=this.state;if(je.popupVisible){var ze;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ze=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(De.a)(ze,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ze=ze||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(De.a)(ze,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ze=ze||we.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(De.a)(ze,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(De.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ut.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var we;return((we=this.popupRef.current)===null||we===void 0?void 0:we.getElement())||null}},{key:"getPopupAlign",value:function(){var we=this.props,je=we.popupPlacement,ze=we.popupAlign,Xe=we.builtinPlacements;return je&&Xe?Ze(Xe,je,ze):ze}},{key:"setPopupVisible",value:function(we,je){var ze=this.props.alignPoint,Xe=this.state.popupVisible;this.clearDelayTimer(),Xe!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Xe}),this.props.onPopupVisibleChange(we)),ze&&je&&we&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(we,je,ze){var Xe=this,We=je*1e3;if(this.clearDelayTimer(),We){var qe=ze?{pageX:ze.pageX,pageY:ze.pageY}:null;this.delayTimer=window.setTimeout(function(){Xe.setPopupVisible(we,qe),Xe.clearDelayTimer()},We)}else this.setPopupVisible(we,ze)}},{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(we){var je=this.props.children.props,ze=this.props;return je[we]&&ze[we]?this["fire".concat(we)]:je[we]||ze[we]}},{key:"isClickToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var we=this.props.action;return we==="contextMenu"||we.length===1&&we[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("contextMenu")!==-1||ze.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,je=we.action,ze=we.showAction;return je.indexOf("focus")!==-1||ze.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,je=we.action,ze=we.hideAction;return je.indexOf("focus")!==-1||ze.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var we;(we=this.popupRef.current)===null||we===void 0||we.forceAlign()}}},{key:"fireEvents",value:function(we,je){var ze=this.props.children.props[we];ze&&ze(je);var Xe=this.props[we];Xe&&Xe(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,je=this.props,ze=je.children,Xe=je.forceRender,We=je.alignPoint,qe=je.className,ft=je.autoDestroy,kt=u.Children.only(ze),It={key:"trigger"};this.isContextMenuToShow()?It.onContextMenu=this.onContextMenu:It.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(It.onClick=this.onClick,It.onMouseDown=this.onMouseDown,It.onTouchStart=this.onTouchStart):(It.onClick=this.createTwoChains("onClick"),It.onMouseDown=this.createTwoChains("onMouseDown"),It.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(It.onMouseEnter=this.onMouseEnter,We&&(It.onMouseMove=this.onMouseMove)):It.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?It.onMouseLeave=this.onMouseLeave:It.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(It.onFocus=this.onFocus,It.onBlur=this.onBlur):(It.onFocus=this.createTwoChains("onFocus"),It.onBlur=this.createTwoChains("onBlur"));var Xt=C()(kt&&kt.props&&kt.props.className,qe);Xt&&(It.className=Xt);var Pr=Object(D.a)({},It);Object(He.c)(kt)&&(Pr.ref=Object(He.a)(this.triggerRef,kt.ref));var Gr=u.cloneElement(kt,Pr),Kr;return(we||this.popupRef.current||Xe)&&(Kr=u.createElement(Ie,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&ft&&(Kr=null),u.createElement(Fi.Provider,{value:this.triggerContextValue},Gr,Kr)}}],[{key:"getDerivedStateFromProps",value:function(we,je){var ze=we.popupVisible,Xe={};return ze!==void 0&&je.popupVisible!==ze&&(Xe.popupVisible=ze,Xe.prevPopupVisible=je.popupVisible),Xe}}]),ye}(u.Component);return Ge.contextType=Fi,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Gi,getDocument:Mi,onPopupVisibleChange:gi,afterPopupVisibleChange:gi,onPopupAlign:gi,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Ii=sa(at.a),Xn={adjustX:1,adjustY:1},Vi={topLeft:{points:["bl","tl"],overflow:Xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Xn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Xn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Xn,offset:[4,0]}},ta={topLeft:{points:["bl","tl"],overflow:Xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Xn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Xn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Xn,offset:[4,0]}},Ct=Vi,tt=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_t=function(Ge,Ye,Fe){var ye=te(Ye),Pe=Ge.getState();Ge.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Pe.defaultActiveFirst),{},Object(P.a)({},ye,Fe))})},Mt=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onDestroy=function(We){ye.props.onDestroy(We)},ye.onKeyDown=function(We){var qe=We.keyCode,ft=ye.menuInstance,kt=ye.props.store,It=ye.getVisible();if(qe===_.a.ENTER)return ye.onTitleClick(We),_t(kt,ye.props.eventKey,!0),!0;if(qe===_.a.RIGHT)return It?ft.onKeyDown(We):(ye.triggerOpenChange(!0),_t(kt,ye.props.eventKey,!0)),!0;if(qe===_.a.LEFT){var Xt;if(It)Xt=ft.onKeyDown(We);else return;return Xt||(ye.triggerOpenChange(!1),Xt=!0),Xt}return It&&(qe===_.a.UP||qe===_.a.DOWN)?ft.onKeyDown(We):void 0},ye.onOpenChange=function(We){ye.props.onOpenChange(We)},ye.onPopupVisibleChange=function(We){ye.triggerOpenChange(We,We?"mouseenter":"mouseleave")},ye.onMouseEnter=function(We){var qe=ye.props,ft=qe.eventKey,kt=qe.onMouseEnter,It=qe.store;_t(It,ye.props.eventKey,!1),kt({key:ft,domEvent:We})},ye.onMouseLeave=function(We){var qe=ye.props,ft=qe.parentMenu,kt=qe.eventKey,It=qe.onMouseLeave;ft.subMenuInstance=Object(b.a)(ye),It({key:kt,domEvent:We})},ye.onTitleMouseEnter=function(We){var qe=ye.props,ft=qe.eventKey,kt=qe.onItemHover,It=qe.onTitleMouseEnter;kt({key:ft,hover:!0}),It({key:ft,domEvent:We})},ye.onTitleMouseLeave=function(We){var qe=ye.props,ft=qe.parentMenu,kt=qe.eventKey,It=qe.onItemHover,Xt=qe.onTitleMouseLeave;ft.subMenuInstance=Object(b.a)(ye),It({key:kt,hover:!1}),Xt({key:kt,domEvent:We})},ye.onTitleClick=function(We){var qe=Object(b.a)(ye),ft=qe.props;if(ft.onTitleClick({key:ft.eventKey,domEvent:We}),ft.triggerSubMenuAction==="hover")return;ye.triggerOpenChange(!ye.getVisible(),"click"),_t(ft.store,ye.props.eventKey,!1)},ye.onSubMenuClick=function(We){typeof ye.props.onClick=="function"&&ye.props.onClick(ye.addKeyPath(We))},ye.onSelect=function(We){ye.props.onSelect(We)},ye.onDeselect=function(We){ye.props.onDeselect(We)},ye.getPrefixCls=function(){return"".concat(ye.props.rootPrefixCls,"-submenu")},ye.getActiveClassName=function(){return"".concat(ye.getPrefixCls(),"-active")},ye.getDisabledClassName=function(){return"".concat(ye.getPrefixCls(),"-disabled")},ye.getSelectedClassName=function(){return"".concat(ye.getPrefixCls(),"-selected")},ye.getOpenClassName=function(){return"".concat(ye.props.rootPrefixCls,"-submenu-open")},ye.getVisible=function(){return ye.state.isOpen},ye.getMode=function(){return ye.state.mode},ye.saveMenuInstance=function(We){ye.menuInstance=We},ye.addKeyPath=function(We){return Object(D.a)(Object(D.a)({},We),{},{keyPath:(We.keyPath||[]).concat(ye.props.eventKey)})},ye.triggerOpenChange=function(We,qe){var ft=ye.props.eventKey,kt=function(){ye.onOpenChange({key:ft,item:Object(b.a)(ye),trigger:qe,open:We})};qe==="mouseenter"?ye.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},ye.isChildrenSelected=function(){var We={find:!1};return X(ye.props.children,ye.props.selectedKeys,We),We.find},ye.isInlineMode=function(){return ye.getMode()==="inline"},ye.adjustWidth=function(){if(!ye.subMenuTitle||!ye.menuInstance)return;var We=rt.findDOMNode(ye.menuInstance);if(We.offsetWidth>=ye.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(ye.subMenuTitle.offsetWidth,"px")},ye.saveSubMenuTitle=function(We){ye.subMenuTitle=We},ye.getBaseProps=function(){var We=Object(b.a)(ye),qe=We.props,ft=ye.getMode();return{mode:ft==="horizontal"?"vertical":ft,visible:ye.getVisible(),level:qe.level+1,inlineIndent:qe.inlineIndent,focusable:!1,onClick:ye.onSubMenuClick,onSelect:ye.onSelect,onDeselect:ye.onDeselect,onDestroy:ye.onDestroy,selectedKeys:qe.selectedKeys,eventKey:"".concat(qe.eventKey,"-menu-"),openKeys:qe.openKeys,motion:qe.motion,onOpenChange:ye.onOpenChange,subMenuOpenDelay:qe.subMenuOpenDelay,parentMenu:Object(b.a)(ye),subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,triggerSubMenuAction:qe.triggerSubMenuAction,builtinPlacements:qe.builtinPlacements,defaultActiveFirst:qe.store.getState().defaultActiveFirst[te(qe.eventKey)],multiple:qe.multiple,prefixCls:qe.rootPrefixCls,id:ye.internalMenuId,manualRef:ye.saveMenuInstance,itemIcon:qe.itemIcon,expandIcon:qe.expandIcon,direction:qe.direction}},ye.getMotion=function(We,qe){var ft=Object(b.a)(ye),kt=ft.haveRendered,It=ye.props,Xt=It.motion,Pr=It.rootPrefixCls,Gr=Object(D.a)(Object(D.a)({},Xt),{},{leavedClassName:"".concat(Pr,"-hidden"),removeOnLeave:!1,motionAppear:kt||!qe||We!=="inline"});return Gr};var Pe=Fe.store,we=Fe.eventKey,je=Pe.getState(),ze=je.defaultActiveFirst;ye.isRootMenu=!1;var Xe=!1;return ze&&(Xe=ze[we]),_t(Pe,we,Xe),ye.state={mode:Fe.mode,isOpen:Fe.isOpen},ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this,Pe=this.props,we=Pe.mode,je=Pe.parentMenu,ze=Pe.manualRef,Xe=Pe.isOpen,We=function(){ye.setState({mode:we,isOpen:Xe})},qe=Xe!==this.state.isOpen,ft=we!==this.state.mode;if((ft||qe)&&(ut.a.cancel(this.updateStateRaf),ft?this.updateStateRaf=Object(ut.a)(We):We()),ze&&ze(this),we!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Xe)return;this.minWidthTimeout=setTimeout(function(){return ye.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ye=this.props,Pe=ye.onDestroy,we=ye.eventKey;Pe&&Pe(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ut.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ye,Pe){var we=this.getBaseProps();return u.createElement(Dr,Object(o.a)({},we,{id:this.internalMenuId,className:ye,style:Pe}),this.props.children)}},{key:"renderChildren",value:function(){var ye=this,Pe=this.getBaseProps(),we=Pe.mode,je=Pe.visible,ze=Pe.forceSubMenuRender,Xe=Pe.direction,We=this.getMotion(we,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||ze,!this.haveOpened)return u.createElement("div",null);var qe=C()("".concat(Pe.prefixCls,"-sub"),Object(P.a)({},"".concat(Pe.prefixCls,"-rtl"),Xe==="rtl"));return this.isInlineMode()?u.createElement(ce,Object(o.a)({visible:Pe.visible,forceRender:ze},We),function(ft){var kt=ft.className,It=ft.style,Xt=C()(qe,kt);return ye.renderPopupMenu(Xt,It)}):this.renderPopupMenu(qe)}},{key:"render",value:function(){var ye,Pe,we,je=Object(D.a)({},this.props),ze=this.getVisible(),Xe=this.getPrefixCls(),We=this.isInlineMode(),qe=this.getMode(),ft=C()(Xe,"".concat(Xe,"-").concat(qe),(ye={},Object(P.a)(ye,je.className,!!je.className),Object(P.a)(ye,this.getOpenClassName(),ze),Object(P.a)(ye,this.getActiveClassName(),je.active||ze&&!We),Object(P.a)(ye,this.getDisabledClassName(),je.disabled),Object(P.a)(ye,this.getSelectedClassName(),this.isChildrenSelected()),ye));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(tt+=1,this.internalMenuId="$__$".concat(tt,"$Menu")));var kt={},It={},Xt={};je.disabled||(kt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},It={onClick:this.onTitleClick},Xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pr={},Gr=je.direction,Kr=Gr==="rtl";We&&(Kr?Pr.paddingRight=je.inlineIndent*je.level:Pr.paddingLeft=je.inlineIndent*je.level);var Qr={};this.getVisible()&&(Qr={"aria-owns":this.internalMenuId});var Wr=null;qe!=="horizontal"&&(Wr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Wr=u.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var en=u.createElement("div",Object(o.a)({ref:this.saveSubMenuTitle,style:Pr,className:"".concat(Xe,"-title"),role:"button"},Xt,It,{"aria-expanded":ze},Qr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Wr||u.createElement("i",{className:"".concat(Xe,"-arrow")})),tn=this.renderChildren(),pn=((Pe=je.parentMenu)===null||Pe===void 0?void 0:Pe.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Tn){return Tn.parentNode},on=pt[qe],kn=je.popupOffset?{offset:je.popupOffset}:{},ln=C()((we={},Object(P.a)(we,je.popupClassName,je.popupClassName&&!We),Object(P.a)(we,"".concat(Xe,"-rtl"),Kr),we)),Mr=je.disabled,Fr=je.triggerSubMenuAction,nn=je.subMenuOpenDelay,dn=je.forceSubMenuRender,wr=je.subMenuCloseDelay,bn=je.builtinPlacements;Q.forEach(function(Tn){return delete je[Tn]}),delete je.onClick;var Wn=Kr?Object(D.a)(Object(D.a)({},ta),bn):Object(D.a)(Object(D.a)({},Vi),bn);delete je.direction;var wn=this.getBaseProps(),Mn=We?null:this.getMotion(wn.mode,wn.visible);return u.createElement("li",Object(o.a)({},je,kt,{className:ft,role:"menuitem"}),u.createElement(Ii,{prefixCls:Xe,popupClassName:C()("".concat(Xe,"-popup"),ln),getPopupContainer:pn,builtinPlacements:Wn,popupPlacement:on,popupVisible:We?!1:ze,popupAlign:kn,popup:We?null:tn,action:Mr||We?[]:[Fr],mouseEnterDelay:nn,mouseLeaveDelay:wr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:dn,popupMotion:Mn},en),We?tn:null)}}]),Ye}(u.Component);Mt.defaultProps={onMouseEnter:ee,onMouseLeave:ee,onTitleMouseEnter:ee,onTitleMouseLeave:ee,onTitleClick:ee,manualRef:ee,mode:"vertical",title:""};var Dt=Object(w.b)(function(Ie,Ge){var Ye=Ie.openKeys,Fe=Ie.activeKey,ye=Ie.selectedKeys,Pe=Ge.eventKey,we=Ge.subMenuKey;return{isOpen:Ye.indexOf(Pe)>-1,active:Fe[we]===Pe,selectedKeys:ye}})(Mt);Dt.isSubMenu=!0;var Ht=Dt,Wt="menuitem-overflowed",ct=.5,Ot=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=u.createRef(),Fe.getMenuItemNodes=function(){var ye=Fe.props.prefixCls,Pe=Fe.childRef.current;return Pe?[].slice.call(Pe.children).filter(function(we){return we.className.split(" ").indexOf("".concat(ye,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(ye,Pe,we){var je=Fe.props,ze=je.overflowedIndicator,Xe=je.level,We=je.mode,qe=je.prefixCls,ft=je.theme;if(Xe!==1||We!=="horizontal")return null;var kt=Fe.props.children[0],It=kt.props,Xt=It.children,Pr=It.title,Gr=It.style,Kr=Object(T.a)(It,["children","title","style"]),Qr=Object(D.a)({},Gr),Wr="".concat(ye,"-overflowed-indicator"),en="".concat(ye,"-overflowed-indicator");Pe.length===0&&we!==!0?Qr=Object(D.a)(Object(D.a)({},Qr),{},{display:"none"}):we&&(Qr=Object(D.a)(Object(D.a)({},Qr),{},{visibility:"hidden",position:"absolute"}),Wr="".concat(Wr,"-placeholder"),en="".concat(en,"-placeholder"));var tn=ft?"".concat(qe,"-").concat(ft):"",pn={};return Q.forEach(function(on){Kr[on]!==void 0&&(pn[on]=Kr[on])}),u.createElement(Ht,Object(o.a)({title:ze,className:"".concat(qe,"-overflowed-submenu"),popupClassName:tn},pn,{key:Wr,eventKey:en,disabled:!1,style:Qr}),Pe)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var ye=Fe.childRef.current;if(!ye)return;var Pe=ye.children;if(!Pe||Pe.length===0)return;var we=ye.children[Pe.length-1];ge(we,"display","inline-block");var je=Fe.getMenuItemNodes(),ze=je.filter(function(Xe){return Xe.className.split(" ").indexOf(Wt)>=0});ze.forEach(function(Xe){ge(Xe,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Xe){return Ee(Xe,!0)}),ze.forEach(function(Xe){ge(Xe,"display","none")}),Fe.overflowedIndicatorWidth=Ee(ye.children[ye.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Xe,We){return Xe+We},0),Fe.handleResize(),ge(we,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var ye=Fe.childRef.current;if(!ye)return;var Pe=Ee(ye);Fe.overflowedItems=[];var we=0,je;Fe.originalTotalWidth>Pe+ct&&(je=-1,Fe.menuItemSizes.forEach(function(ze){we+=ze,we+Fe.overflowedIndicatorWidth<=Pe&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){var ye=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=this.childRef.current;if(!Pe)return;this.resizeObserver=new Qe.default(function(we){we.forEach(function(){var je=ye.cancelFrameId;cancelAnimationFrame(je),ye.cancelFrameId=requestAnimationFrame(ye.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(we){ye.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ye.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(we){ye.resizeObserver.observe(we)}),ye.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{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(ye){var Pe=this,we=this.state.lastVisibleIndex;return(ye||[]).reduce(function(je,ze,Xe){var We=ze;if(Pe.props.mode==="horizontal"){var qe=Pe.getOverflowedSubMenuItem(ze.props.eventKey,[]);we!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(Xe>we&&(We=u.cloneElement(ze,{style:{display:"none"},eventKey:"".concat(ze.props.eventKey,"-hidden"),className:"".concat(Wt)})),Xe===we+1&&(Pe.overflowedItems=ye.slice(we+1).map(function(kt){return u.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),qe=Pe.getOverflowedSubMenuItem(ze.props.eventKey,Pe.overflowedItems)));var ft=[].concat(Object(s.a)(je),[qe,We]);return Xe===ye.length-1&&ft.push(Pe.getOverflowedSubMenuItem(ze.props.eventKey,[],!0)),ft}return[].concat(Object(s.a)(je),[We])},[])}},{key:"render",value:function(){var ye=this.props,Pe=ye.visible,we=ye.prefixCls,je=ye.overflowedIndicator,ze=ye.mode,Xe=ye.level,We=ye.tag,qe=ye.children,ft=ye.theme,kt=Object(T.a)(ye,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),It=We;return u.createElement(It,Object(o.a)({ref:this.childRef},kt),this.renderChildren(qe))}}]),Ye}(u.Component);Ot.defaultProps={tag:"div",className:""};var Rt=Ot;function fr(Ie){return Ie.length?Ie.every(function(Ge){return!!Ge.props.disabled}):!0}function qt(Ie,Ge,Ye){var Fe=Ie.getState();Ie.setState({activeKey:Object(D.a)(Object(D.a)({},Fe.activeKey),{},Object(P.a)({},Ge,Ye))})}function Qt(Ie){return Ie.eventKey||"0-menu-"}function Kt(Ie,Ge){var Ye=Ge,Fe=Ie.children,ye=Ie.eventKey;if(Ye){var Pe;if(J(Fe,function(we,je){we&&we.props&&!we.props.disabled&&Ye===Ce(we,ye,je)&&(Pe=!0)}),Pe)return Ye}return Ye=null,Ie.defaultActiveFirst&&J(Fe,function(we,je){!Ye&&we&&!we.props.disabled&&(Ye=Ce(we,ye,je))}),Ye}function tr(Ie){if(!Ie)return;var Ge=this.instanceArray.indexOf(Ie);Ge!==-1?this.instanceArray[Ge]=Ie:this.instanceArray.push(Ie)}var or=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;return Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onKeyDown=function(Pe,we){var je=Pe.keyCode,ze;if(ye.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(ze=We.onKeyDown(Pe))}),ze)return 1;var Xe=null;return(je===_.a.UP||je===_.a.DOWN)&&(Xe=ye.step(je===_.a.UP?-1:1)),Xe?(Pe.preventDefault(),qt(ye.props.store,Qt(ye.props),Xe.props.eventKey),typeof we=="function"&&we(Xe),1):void 0},ye.onItemHover=function(Pe){var we=Pe.key,je=Pe.hover;qt(ye.props.store,Qt(ye.props),je?we:null)},ye.onDeselect=function(Pe){ye.props.onDeselect(Pe)},ye.onSelect=function(Pe){ye.props.onSelect(Pe)},ye.onClick=function(Pe){ye.props.onClick(Pe)},ye.onOpenChange=function(Pe){ye.props.onOpenChange(Pe)},ye.onDestroy=function(Pe){ye.props.onDestroy(Pe)},ye.getFlatInstanceArray=function(){return ye.instanceArray},ye.step=function(Pe){var we=ye.getFlatInstanceArray(),je=ye.props.store.getState().activeKey[Qt(ye.props)],ze=we.length;if(!ze)return null;Pe<0&&(we=we.concat().reverse());var Xe=-1;if(we.every(function(kt,It){return kt&&kt.props.eventKey===je?(Xe=It,!1):!0}),!ye.props.defaultActiveFirst&&Xe!==-1&&fr(we.slice(Xe,ze-1)))return;var We=(Xe+1)%ze,qe=We;do{var ft=we[qe];if(!ft||ft.props.disabled)qe=(qe+1)%ze;else return ft}while(qe!==We);return null},ye.renderCommonMenuItem=function(Pe,we,je){var ze=ye.props.store.getState(),Xe=Object(b.a)(ye),We=Xe.props,qe=Ce(Pe,We.eventKey,we),ft=Pe.props;if(!ft||typeof Pe.type=="string")return Pe;var kt=qe===ze.activeKey,It=Object(D.a)(Object(D.a)({mode:ft.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:ye.renderMenuItem,rootPrefixCls:We.prefixCls,index:we,parentMenu:We.parentMenu,manualRef:ft.disabled?void 0:Object(N.a)(Pe.ref,tr.bind(Object(b.a)(ye))),eventKey:qe,active:!ft.disabled&&kt,multiple:We.multiple,onClick:function(Pr){(ft.onClick||ee)(Pr),ye.onClick(Pr)},onItemHover:ye.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:ye.onOpenChange,onDeselect:ye.onDeselect,onSelect:ye.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:ft.itemIcon||ye.props.itemIcon,expandIcon:ft.expandIcon||ye.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Oe())&&(It.triggerSubMenuAction="click"),u.cloneElement(Pe,Object(D.a)(Object(D.a)({},It),{},{key:qe||we}))},ye.renderMenuItem=function(Pe,we,je){if(!Pe)return null;var ze=ye.props.store.getState(),Xe={openKeys:ze.openKeys,selectedKeys:ze.selectedKeys,triggerSubMenuAction:ye.props.triggerSubMenuAction,subMenuKey:je};return ye.renderCommonMenuItem(Pe,we,Xe)},Fe.store.setState({activeKey:Object(D.a)(Object(D.a)({},Fe.store.getState().activeKey),{},Object(P.a)({},Fe.eventKey,Kt(Fe,Fe.activeKey)))}),ye.instanceArray=[],ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ye){return this.props.visible||ye.visible||this.props.className!==ye.className||!G()(this.props.style,ye.style)}},{key:"componentDidUpdate",value:function(ye){var Pe=this.props,we="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[Qt(Pe)],je=Kt(Pe,we);if(je!==we)qt(Pe.store,Qt(Pe),je);else if("activeKey"in ye){var ze=Kt(ye,ye.activeKey);je!==ze&&qt(Pe.store,Qt(Pe),je)}}},{key:"render",value:function(){var ye=this,Pe=Object(o.a)({},this.props);this.instanceArray=[];var we=C()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),je={className:we,role:Pe.role||"menu"};Pe.id&&(je.id=Pe.id),Pe.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var ze=Pe.prefixCls,Xe=Pe.eventKey,We=Pe.visible,qe=Pe.level,ft=Pe.mode,kt=Pe.overflowedIndicator,It=Pe.theme;return Q.forEach(function(Xt){return delete Pe[Xt]}),delete Pe.onClick,u.createElement(Rt,Object(o.a)({},Pe,{prefixCls:ze,mode:ft,tag:"ul",level:qe,theme:It,visible:We,overflowedIndicator:kt},je),Object(E.a)(Pe.children).map(function(Xt,Pr){return ye.renderMenuItem(Xt,Pr,Xe||"0-menu-")}))}}]),Ye}(u.Component);or.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ee};var ot=Object(w.b)()(or),Dr=ot,Ir=L("Kwbf");function yr(Ie,Ge,Ye){var Fe=Ie.prefixCls,ye=Ie.motion,Pe=Ie.defaultMotions,we=Pe===void 0?{}:Pe,je=Ie.openAnimation,ze=Ie.openTransitionName,Xe=Ge.switchingModeFromInline;if(ye)return ye;if(Object(z.a)(je)==="object"&&je)Object(Ir.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Fe,"-open-").concat(je)};if(ze)return{motionName:ze};var We=we[Ye];return We||(Xe?null:we.other)}var er=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(Fe){var ye;Object(k.a)(this,Ye),ye=Ge.call(this,Fe),ye.onSelect=function(je){var ze=Object(b.a)(ye),Xe=ze.props;if(Xe.selectable){var We=ye.store.getState(),qe=We.selectedKeys,ft=je.key;Xe.multiple?qe=qe.concat([ft]):qe=[ft],"selectedKeys"in Xe||ye.store.setState({selectedKeys:qe}),Xe.onSelect(Object(D.a)(Object(D.a)({},je),{},{selectedKeys:qe}))}},ye.onClick=function(je){var ze=ye.getRealMenuMode(),Xe=Object(b.a)(ye),We=Xe.store,qe=Xe.props.onOpenChange;ze!=="inline"&&!("openKeys"in ye.props)&&(We.setState({openKeys:[]}),qe([])),ye.props.onClick(je)},ye.onKeyDown=function(je,ze){ye.innerMenu.getWrappedInstance().onKeyDown(je,ze)},ye.onOpenChange=function(je){var ze=Object(b.a)(ye),Xe=ze.props,We=ye.store.getState().openKeys.concat(),qe=!1,ft=function(It){var Xt=!1;if(It.open)Xt=We.indexOf(It.key)===-1,Xt&&We.push(It.key);else{var Pr=We.indexOf(It.key);Xt=Pr!==-1,Xt&&We.splice(Pr,1)}qe=qe||Xt};Array.isArray(je)?je.forEach(ft):ft(je),qe&&("openKeys"in ye.props||ye.store.setState({openKeys:We}),Xe.onOpenChange(We))},ye.onDeselect=function(je){var ze=Object(b.a)(ye),Xe=ze.props;if(Xe.selectable){var We=ye.store.getState().selectedKeys.concat(),qe=je.key,ft=We.indexOf(qe);ft!==-1&&We.splice(ft,1),"selectedKeys"in Xe||ye.store.setState({selectedKeys:We}),Xe.onDeselect(Object(D.a)(Object(D.a)({},je),{},{selectedKeys:We}))}},ye.onMouseEnter=function(je){ye.restoreModeVerticalFromInline();var ze=ye.props.onMouseEnter;ze&&ze(je)},ye.onTransitionEnd=function(je){var ze=je.propertyName==="width"&&je.target===je.currentTarget,Xe=je.target.className,We=Object.prototype.toString.call(Xe)==="[object SVGAnimatedString]"?Xe.animVal:Xe,qe=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(ze||qe)&&ye.restoreModeVerticalFromInline()},ye.setInnerMenu=function(je){ye.innerMenu=je},ye.isRootMenu=!0;var Pe=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Pe=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),ye.store=Object(w.c)({selectedKeys:Pe,openKeys:we,activeKey:{"0-menu-":Kt(Fe,Fe.activeKey)}}),ye.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:ye.store},ye}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ye){var Pe=this.props,we=Pe.siderCollapsed,je=Pe.inlineCollapsed,ze=Pe.onOpenChange;(!ye.inlineCollapsed&&je||!ye.siderCollapsed&&we)&&ze([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ye=this.props.collapsedWidth,Pe=this.store,we=this.prevOpenKeys,je=this.getInlineCollapsed()&&(ye===0||ye==="0"||ye==="0px");je?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ye=this.props.mode,Pe=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return Pe&&we?"inline":we?"vertical":ye}},{key:"getInlineCollapsed",value:function(){var ye=this.props,Pe=ye.inlineCollapsed,we=ye.siderCollapsed;return we!==void 0?we:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var ye=this.state.switchingModeFromInline;ye&&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 ye=Object(D.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return ye.className+=" ".concat(ye.prefixCls,"-root"),ye.direction==="rtl"&&(ye.className+=" ".concat(ye.prefixCls,"-rtl")),ye=Object(D.a)(Object(D.a)({},ye),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:yr(this.props,this.state,Pe)}),delete ye.openAnimation,delete ye.openTransitionName,u.createElement(w.a,{store:this.store},u.createElement(Dr,Object(o.a)({},ye,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ye,Pe){var we=Pe.prevProps,je=Pe.store,ze=je.getState(),Xe={},We={prevProps:ye};return we.mode==="inline"&&ye.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in ye?Xe.openKeys=ye.openKeys||[]:((ye.inlineCollapsed&&!we.inlineCollapsed||ye.siderCollapsed&&!we.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=ze.openKeys,Xe.openKeys=[]),(!ye.inlineCollapsed&&we.inlineCollapsed||!ye.siderCollapsed&&we.siderCollapsed)&&(Xe.openKeys=Pe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(Xe).length&&je.setState(Xe),We}}]),Ye}(u.Component);er.defaultProps={selectable:!0,onClick:ee,onSelect:ee,onOpenChange:ee,onDeselect:ee,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:u.createElement("span",null,"\xB7\xB7\xB7")};var Et=er,wt=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(ye){var Pe=ye.keyCode;return Pe===_.a.ENTER?(Fe.onClick(ye),!0):void 0},Fe.onMouseLeave=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseLeave;je({key:we,hover:!1}),ze({key:we,domEvent:ye})},Fe.onMouseEnter=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseEnter;je({key:we,hover:!0}),ze({key:we,domEvent:ye})},Fe.onClick=function(ye){var Pe=Fe.props,we=Pe.eventKey,je=Pe.multiple,ze=Pe.onClick,Xe=Pe.onSelect,We=Pe.onDeselect,qe=Pe.isSelected,ft={key:we,keyPath:[we],item:Object(b.a)(Fe),domEvent:ye};ze(ft),je?qe?We(ft):Xe(ft):qe||Xe(ft)},Fe.saveNode=function(ye){Fe.node=ye},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ye=this.props;ye.onDestroy&&ye.onDestroy(ye.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 ye,Pe=Object(D.a)({},this.props),we=C()(this.getPrefixCls(),Pe.className,(ye={},Object(P.a)(ye,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(P.a)(ye,this.getSelectedClassName(),Pe.isSelected),Object(P.a)(ye,this.getDisabledClassName(),Pe.disabled),ye)),je=Object(D.a)(Object(D.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:we,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?je=Object(D.a)(Object(D.a)({},je),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(je.role="none");var ze={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},Xe=Object(D.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?Xe.paddingRight=Pe.inlineIndent*Pe.level:Xe.paddingLeft=Pe.inlineIndent*Pe.level),Q.forEach(function(qe){return delete Pe[qe]}),delete Pe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object(o.a)({},Object(M.a)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,ze,{style:Xe,ref:this.saveNode}),Pe.children,We)}}]),Ye}(u.Component);wt.isMenuItem=!0,wt.defaultProps={onSelect:ee,onMouseEnter:ee,onMouseLeave:ee,manualRef:ee};var xt=Object(w.b)(function(Ie,Ge){var Ye=Ie.activeKey,Fe=Ie.selectedKeys,ye=Ge.eventKey,Pe=Ge.subMenuKey;return{active:Ye[Pe]===ye,isSelected:Array.isArray(Fe)?Fe.indexOf(ye)!==-1:Fe===ye}})(wt),$t=xt,ur=function(Ie){Object(v.a)(Ye,Ie);var Ge=Object(g.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(ye){var Pe=Fe.props,we=Pe.renderMenuItem,je=Pe.index;return we(ye,je,Fe.props.subMenuKey)},Fe}return Object(O.a)(Ye,[{key:"render",value:function(){var ye=Object(o.a)({},this.props),Pe=ye.className,we=Pe===void 0?"":Pe,je=ye.rootPrefixCls,ze="".concat(je,"-item-group-title"),Xe="".concat(je,"-item-group-list"),We=ye.title,qe=ye.children;return Q.forEach(function(ft){return delete ye[ft]}),delete ye.direction,u.createElement("li",Object(o.a)({},ye,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(we," ").concat(je,"-item-group")}),u.createElement("div",{className:ze,title:typeof We=="string"?We:void 0},We),u.createElement("ul",{className:Xe},u.Children.map(qe,this.renderInnerMenuItem)))}}]),Ye}(u.Component);ur.isMenuItemGroup=!0,ur.defaultProps={disabled:!0};var sr=ur,lr=function(Ge){var Ye=Ge.className,Fe=Ge.rootPrefixCls,ye=Ge.style;return u.createElement("li",{className:"".concat(Ye," ").concat(Fe,"-item-divider"),style:ye})};lr.defaultProps={disabled:!0,className:"",style:{}};var Tr=lr,Zr=Et,et=L("eDIo");function ir(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.editable,ye=Ie.locale,Pe=Ie.style;return!Fe||Fe.showAdd===!1?null:u.createElement("button",{ref:Ge,type:"button",className:"".concat(Ye,"-nav-add"),style:Pe,"aria-label":(ye==null?void 0:ye.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var Lr=u.forwardRef(ir);function Jr(Ie,Ge){var Ye=Ie.prefixCls,Fe=Ie.id,ye=Ie.tabs,Pe=Ie.locale,we=Ie.mobile,je=Ie.moreIcon,ze=je===void 0?"More":je,Xe=Ie.moreTransitionName,We=Ie.style,qe=Ie.className,ft=Ie.editable,kt=Ie.tabBarGutter,It=Ie.rtl,Xt=Ie.onTabClick,Pr=Object(u.useState)(!1),Gr=Object(d.a)(Pr,2),Kr=Gr[0],Qr=Gr[1],Wr=Object(u.useState)(null),en=Object(d.a)(Wr,2),tn=en[0],pn=en[1],on="".concat(Fe,"-more-popup"),kn="".concat(Ye,"-dropdown"),ln=tn!==null?"".concat(on,"-").concat(tn):null,Mr=Pe==null?void 0:Pe.dropdownAriaLabel,Fr=u.createElement(Zr,{onClick:function(Mn){var Tn=Mn.key,Yn=Mn.domEvent;Xt(Tn,Yn),Qr(!1)},id:on,tabIndex:-1,role:"listbox","aria-activedescendant":ln,selectedKeys:[tn],"aria-label":Mr!==void 0?Mr:"expanded dropdown"},ye.map(function(wn){return u.createElement($t,{key:wn.key,id:"".concat(on,"-").concat(wn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(wn.key),disabled:wn.disabled},wn.tab)}));function nn(wn){for(var Mn=ye.filter(function(di){return!di.disabled}),Tn=Mn.findIndex(function(di){return di.key===tn})||0,Yn=Mn.length,ri=0;ri<Yn;ri+=1){Tn=(Tn+wn+Yn)%Yn;var Hn=Mn[Tn];if(!Hn.disabled){pn(Hn.key);return}}}function dn(wn){var Mn=wn.which;if(!Kr){[_.a.DOWN,_.a.SPACE,_.a.ENTER].includes(Mn)&&(Qr(!0),wn.preventDefault());return}switch(Mn){case _.a.UP:nn(-1),wn.preventDefault();break;case _.a.DOWN:nn(1),wn.preventDefault();break;case _.a.ESC:Qr(!1);break;case _.a.SPACE:case _.a.ENTER:tn!==null&&Xt(tn,wn);break}}Object(u.useEffect)(function(){var wn=document.getElementById(ln);wn&&wn.scrollIntoView&&wn.scrollIntoView(!1)},[tn]),Object(u.useEffect)(function(){Kr||pn(null)},[Kr]);var wr=Object(P.a)({},It?"marginLeft":"marginRight",kt);ye.length||(wr.visibility="hidden",wr.order=1);var bn=C()(Object(P.a)({},"".concat(kn,"-rtl"),It)),Wn=we?null:u.createElement(et.a,{prefixCls:kn,overlay:Fr,trigger:["hover"],visible:Kr,transitionName:Xe,onVisibleChange:Qr,overlayClassName:bn,mouseEnterDelay:.1,mouseLeaveDelay:.1},u.createElement("button",{type:"button",className:"".concat(Ye,"-nav-more"),style:wr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":on,id:"".concat(Fe,"-more"),"aria-expanded":Kr,onKeyDown:dn},ze));return u.createElement("div",{className:C()("".concat(Ye,"-nav-operations"),qe),style:We,ref:Ge},Wn,u.createElement(Lr,{prefixCls:Ye,locale:Pe,editable:ft}))}var gr=u.forwardRef(Jr),pr=Object(u.createContext)(null),Or=.1,Ft=.01,Jt=20,br=Math.pow(.995,Jt);function Zt(){var Ie=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(Ie)||/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(Ie.substr(0,4)))}function vt(Ie,Ge){var Ye=Object(u.useState)(),Fe=Object(d.a)(Ye,2),ye=Fe[0],Pe=Fe[1],we=Object(u.useState)(0),je=Object(d.a)(we,2),ze=je[0],Xe=je[1],We=Object(u.useState)(0),qe=Object(d.a)(We,2),ft=qe[0],kt=qe[1],It=Object(u.useState)(),Xt=Object(d.a)(It,2),Pr=Xt[0],Gr=Xt[1],Kr=Object(u.useRef)();function Qr(Mr){var Fr=Mr.touches[0],nn=Fr.screenX,dn=Fr.screenY;Pe({x:nn,y:dn}),window.clearInterval(Kr.current)}function Wr(Mr){if(!ye)return;Mr.preventDefault();var Fr=Mr.touches[0],nn=Fr.screenX,dn=Fr.screenY;Pe({x:nn,y:dn});var wr=nn-ye.x,bn=dn-ye.y;Ge(wr,bn);var Wn=Date.now();Xe(Wn),kt(Wn-ze),Gr({x:wr,y:bn})}function en(){if(!ye)return;if(Pe(null),Gr(null),Pr){var Mr=Pr.x/ft,Fr=Pr.y/ft,nn=Math.abs(Mr),dn=Math.abs(Fr);if(Math.max(nn,dn)<Or)return;var wr=Mr,bn=Fr;Kr.current=window.setInterval(function(){if(Math.abs(wr)<Ft&&Math.abs(bn)<Ft){window.clearInterval(Kr.current);return}wr*=br,bn*=br,Ge(wr*Jt,bn*Jt)},Jt)}}var tn=Object(u.useRef)(0),pn=Object(u.useRef)(!1),on=Object(u.useRef)();function kn(Mr){var Fr=Mr.deltaX,nn=Mr.deltaY,dn=0,wr=Math.abs(Fr),bn=Math.abs(nn);wr===bn?dn=on.current==="x"?Fr:nn:wr>bn?(dn=Fr,on.current="x"):(dn=nn,on.current="y");var Wn=Date.now();Wn-tn.current>100&&(pn.current=!1),(Ge(-dn,-dn)||pn.current)&&(Mr.preventDefault(),pn.current=!0),tn.current=Wn}var ln=Object(u.useRef)(null);ln.current={onTouchStart:Qr,onTouchMove:Wr,onTouchEnd:en,onWheel:kn},u.useEffect(function(){function Mr(wr){ln.current.onTouchStart(wr)}function Fr(wr){ln.current.onTouchMove(wr)}function nn(wr){ln.current.onTouchEnd(wr)}function dn(wr){ln.current.onWheel(wr)}return document.addEventListener("touchmove",Fr,{passive:!1}),document.addEventListener("touchend",nn,{passive:!1}),Ie.current.addEventListener("touchstart",Mr,{passive:!1}),Ie.current.addEventListener("wheel",dn),function(){document.removeEventListener("touchmove",Fr),document.removeEventListener("touchend",nn)}},[])}function bt(){var Ie=Object(u.useRef)(new Map);function Ge(Fe){return Ie.current.has(Fe)||Ie.current.set(Fe,u.createRef()),Ie.current.get(Fe)}function Ye(Fe){Ie.current.delete(Fe)}return[Ge,Ye]}function zt(Ie,Ge){var Ye=u.useRef(Ie),Fe=u.useState({}),ye=Object(d.a)(Fe,2),Pe=ye[1];function we(je){var ze=typeof je=="function"?je(Ye.current):je;ze!==Ye.current&&Ge(ze,Ye.current),Ye.current=ze,Pe({})}return[Ye.current,we]}var Lt=function(Ge){var Ye=Ge.position,Fe=Ge.prefixCls,ye=Ge.extra;if(!ye)return null;var Pe,we=ye;return Ye==="right"&&(Pe=we.right||!we.left&&we||null),Ye==="left"&&(Pe=we.left||null),Pe?u.createElement("div",{className:"".concat(Fe,"-extra-content")},Pe):null};function kr(Ie,Ge){var Ye,Fe=u.useContext(pr),ye=Fe.prefixCls,Pe=Fe.tabs,we=Ie.className,je=Ie.style,ze=Ie.id,Xe=Ie.animated,We=Ie.activeKey,qe=Ie.rtl,ft=Ie.extra,kt=Ie.editable,It=Ie.locale,Xt=Ie.tabPosition,Pr=Ie.tabBarGutter,Gr=Ie.children,Kr=Ie.onTabClick,Qr=Ie.onTabScroll,Wr=Object(u.useRef)(),en=Object(u.useRef)(),tn=Object(u.useRef)(),pn=Object(u.useRef)(),on=bt(),kn=Object(d.a)(on,2),ln=kn[0],Mr=kn[1],Fr=Xt==="top"||Xt==="bottom",nn=zt(0,function(Ln,_n){Fr&&Qr&&Qr({direction:Ln>_n?"left":"right"})}),dn=Object(d.a)(nn,2),wr=dn[0],bn=dn[1],Wn=zt(0,function(Ln,_n){!Fr&&Qr&&Qr({direction:Ln>_n?"top":"bottom"})}),wn=Object(d.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(u.useState)(0),ri=Object(d.a)(Yn,2),Hn=ri[0],di=ri[1],Xi=Object(u.useState)(0),wi=Object(d.a)(Xi,2),ni=wi[0],In=wi[1],Nn=Object(u.useState)(0),zn=Object(d.a)(Nn,2),Bn=zn[0],Zn=zn[1],Di=Object(u.useState)(0),ra=Object(d.a)(Di,2),An=ra[0],Ui=ra[1],Bi=Object(u.useState)(null),Pn=Object(d.a)(Bi,2),On=Pn[0],qn=Pn[1],Ba=Object(u.useState)(null),wa=Object(d.a)(Ba,2),la=wa[0],ua=wa[1],Pa=Object(u.useState)(0),Ca=Object(d.a)(Pa,2),La=Ca[0],Wa=Ca[1],Xa=Object(u.useState)(0),Ma=Object(d.a)(Xa,2),ca=Ma[0],Sa=Ma[1],ba=m(new Map),da=Object(d.a)(ba,2),co=da[0],Ea=da[1],Ta=t(Pe,co,Hn),ha="".concat(ye,"-nav-operations-hidden"),fa=0,$i=0;Fr?qe?(fa=0,$i=Math.max(0,Hn-On)):(fa=Math.min(0,On-Hn),$i=0):(fa=Math.min(0,la-ni),$i=0);function na(Ln){return Ln<fa?[fa,!1]:Ln>$i?[$i,!1]:[Ln,!0]}var xr=Object(u.useRef)(),Cr=Object(u.useState)(),ar=Object(d.a)(Cr,2),En=ar[0],dr=ar[1];function pa(){dr(Date.now())}function $a(){window.clearTimeout(xr.current)}vt(Wr,function(Ln,_n){var yi=!1;function Hi(Ia,ma){Ia(function(Ka){var xa=na(Ka+ma),bi=Object(d.a)(xa,2),Qa=bi[0],fo=bi[1];return yi=fo,Qa})}if(Fr){if(On>=Hn)return yi;Hi(bn,Ln)}else{if(la>=ni)return yi;Hi(Tn,_n)}return $a(),pa(),yi}),Object(u.useEffect)(function(){return $a(),En&&(xr.current=window.setTimeout(function(){dr(0)},100)),$a},[En]);function jn(){var Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,_n=Ta.get(Ln);if(!_n)return;if(Fr){var yi=wr;qe?_n.right<wr?yi=_n.right:_n.right+_n.width>wr+On&&(yi=_n.right+_n.width-On):_n.left<-wr?yi=-_n.left:_n.left+_n.width>-wr+On&&(yi=-(_n.left+_n.width-On)),Tn(0),bn(na(yi)[0])}else{var Hi=Mn;_n.top<-Mn?Hi=-_n.top:_n.top+_n.height>-Mn+la&&(Hi=-(_n.top+_n.height-la)),bn(0),Tn(na(Hi)[0])}}var Oa=x(Ta,{width:On,height:la,left:wr,top:Mn},{width:Bn,height:An},{width:La,height:ca},Object(D.a)(Object(D.a)({},Ie),{},{tabs:Pe})),Do=Object(d.a)(Oa,2),Jo=Do[0],Qo=Do[1],Zo=Pe.map(function(Ln){var _n=Ln.key;return u.createElement(i,{id:ze,prefixCls:ye,key:_n,rtl:qe,tab:Ln,closable:Ln.closable,editable:kt,active:_n===We,tabPosition:Xt,tabBarGutter:Pr,renderWrapper:Gr,removeAriaLabel:It==null?void 0:It.removeAriaLabel,ref:ln(_n),onClick:function(Hi){Kr(_n,Hi)},onRemove:function(){Mr(_n)},onFocus:function(){jn(_n),pa(),qe||(Wr.current.scrollLeft=0),Wr.current.scrollTop=0}})}),ho=c(function(){var Ln,_n,yi,Hi,Ia,ma,Ka,xa,bi,Qa=((Ln=Wr.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,fo=((_n=Wr.current)===null||_n===void 0?void 0:_n.offsetHeight)||0,po=((yi=pn.current)===null||yi===void 0?void 0:yi.offsetWidth)||0,zi=((Hi=pn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Dn=((Ia=tn.current)===null||Ia===void 0?void 0:Ia.offsetWidth)||0,aa=((ma=tn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;qn(Qa),ua(fo),Wa(po),Sa(zi);var va=(((Ka=en.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,ga=(((xa=en.current)===null||xa===void 0?void 0:xa.offsetHeight)||0)-zi;di(va),In(ga);var mo=(bi=tn.current)===null||bi===void 0?void 0:bi.className.includes(ha);Zn(va-(mo?0:Dn)),Ui(ga-(mo?0:aa)),Ea(function(){var Za=new Map;return Pe.forEach(function(Io){var No=Io.key,Ra=ln(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=Pe.slice(0,Jo),Wi=Pe.slice(Qo+1),oi=[].concat(Object(s.a)(qo),Object(s.a)(Wi)),ki=Object(u.useState)(),si=Object(d.a)(ki,2),Ha=si[0],es=si[1],ia=Ta.get(We),ko=Object(u.useRef)();function Po(){h.a.cancel(ko.current)}Object(u.useEffect)(function(){var Ln={};return ia&&(Fr?(qe?Ln.right=ia.right:Ln.left=ia.left,Ln.width=ia.width):(Ln.top=ia.top,Ln.height=ia.height)),Po(),ko.current=h()(function(){es(Ln)}),Po},[ia,Fr,qe]),Object(u.useEffect)(function(){jn()},[We,ia,Ta,Fr]),Object(u.useEffect)(function(){ho()},[qe,Pr,We,Pe.map(function(Ln){return Ln.key}).join("_")]);var Lo=!!oi.length,Aa="".concat(ye,"-nav-wrap"),Ya,za,Mo,Ja;return Fr?qe?(za=wr>0,Ya=wr+On<Hn):(Ya=wr<0,za=-wr+On<Hn):(Mo=Mn<0,Ja=-Mn+la<ni),u.createElement("div",{ref:Ge,role:"tablist",className:C()("".concat(ye,"-nav"),we),style:je,onKeyDown:function(){pa()}},u.createElement(Lt,{position:"left",extra:ft,prefixCls:ye}),u.createElement(f.a,{onResize:ho},u.createElement("div",{className:C()(Aa,(Ye={},Object(P.a)(Ye,"".concat(Aa,"-ping-left"),Ya),Object(P.a)(Ye,"".concat(Aa,"-ping-right"),za),Object(P.a)(Ye,"".concat(Aa,"-ping-top"),Mo),Object(P.a)(Ye,"".concat(Aa,"-ping-bottom"),Ja),Ye)),ref:Wr},u.createElement(f.a,{onResize:ho},u.createElement("div",{ref:en,className:"".concat(ye,"-nav-list"),style:{transform:"translate(".concat(wr,"px, ").concat(Mn,"px)"),transition:En?"none":void 0}},Zo,u.createElement(Lr,{ref:pn,prefixCls:ye,locale:It,editable:kt,style:{visibility:Lo?"hidden":null}}),u.createElement("div",{className:C()("".concat(ye,"-ink-bar"),Object(P.a)({},"".concat(ye,"-ink-bar-animated"),Xe.inkBar)),style:Ha}))))),u.createElement(gr,Object.assign({},Ie,{ref:tn,prefixCls:ye,tabs:oi,className:!Lo&&ha})),u.createElement(Lt,{position:"right",extra:ft,prefixCls:ye}))}var rn=u.forwardRef(kr);function an(Ie){var Ge=Ie.id,Ye=Ie.activeKey,Fe=Ie.animated,ye=Ie.tabPosition,Pe=Ie.rtl,we=Ie.destroyInactiveTabPane,je=u.useContext(pr),ze=je.prefixCls,Xe=je.tabs,We=Fe.tabPane,qe=Xe.findIndex(function(ft){return ft.key===Ye});return u.createElement("div",{className:C()("".concat(ze,"-content-holder"))},u.createElement("div",{className:C()("".concat(ze,"-content"),"".concat(ze,"-content-").concat(ye),Object(P.a)({},"".concat(ze,"-content-animated"),We)),style:qe&&We?Object(P.a)({},Pe?"marginRight":"marginLeft","-".concat(qe,"00%")):null},Xe.map(function(ft){return u.cloneElement(ft.node,{key:ft.key,prefixCls:ze,tabKey:ft.key,id:Ge,animated:We,active:ft.key===Ye,destroyInactiveTabPane:we})})))}function Ar(Ie){var Ge=Ie.prefixCls,Ye=Ie.forceRender,Fe=Ie.className,ye=Ie.style,Pe=Ie.id,we=Ie.active,je=Ie.animated,ze=Ie.destroyInactiveTabPane,Xe=Ie.tabKey,We=Ie.children,qe=u.useState(Ye),ft=Object(d.a)(qe,2),kt=ft[0],It=ft[1];u.useEffect(function(){we?It(!0):ze&&It(!1)},[we,ze]);var Xt={};return we||(je?(Xt.visibility="hidden",Xt.height=0,Xt.overflowY="hidden"):Xt.display="none"),u.createElement("div",{id:Pe&&"".concat(Pe,"-panel-").concat(Xe),role:"tabpanel",tabIndex:we?0:-1,"aria-labelledby":Pe&&"".concat(Pe,"-tab-").concat(Xe),"aria-hidden":!we,style:Object(D.a)(Object(D.a)({},Xt),ye),className:C()("".concat(Ge,"-tabpane"),we&&"".concat(Ge,"-tabpane-active"),Fe)},(we||kt||Ye)&&We)}var qr=0;function Nr(Ie){return Object(E.a)(Ie).map(function(Ge){if(u.isValidElement(Ge)){var Ye=Ge.key!==void 0?String(Ge.key):void 0;return Object(D.a)(Object(D.a)({key:Ye},Ge.props),{},{node:Ge})}return null}).filter(function(Ge){return Ge})}function un(Ie,Ge){var Ye,Fe=Ie.id,ye=Ie.prefixCls,Pe=ye===void 0?"rc-tabs":ye,we=Ie.className,je=Ie.children,ze=Ie.direction,Xe=Ie.activeKey,We=Ie.defaultActiveKey,qe=Ie.editable,ft=Ie.animated,kt=Ie.tabPosition,It=kt===void 0?"top":kt,Xt=Ie.tabBarGutter,Pr=Ie.tabBarStyle,Gr=Ie.tabBarExtraContent,Kr=Ie.locale,Qr=Ie.moreIcon,Wr=Ie.moreTransitionName,en=Ie.destroyInactiveTabPane,tn=Ie.renderTabBar,pn=Ie.onChange,on=Ie.onTabClick,kn=Ie.onTabScroll,ln=Object(T.a)(Ie,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Mr=Nr(je),Fr=ze==="rtl",nn;ft===!1?nn={inkBar:!1,tabPane:!1}:nn=Object(D.a)({inkBar:!0,tabPane:!1},ft!==!0?ft:null);var dn=Object(u.useState)(!1),wr=Object(d.a)(dn,2),bn=wr[0],Wn=wr[1];Object(u.useEffect)(function(){Wn(Zt())},[]);var wn=Object(l.a)(function(){var An;return(An=Mr[0])===null||An===void 0?void 0:An.key},{value:Xe,defaultValue:We}),Mn=Object(d.a)(wn,2),Tn=Mn[0],Yn=Mn[1],ri=Object(u.useState)(function(){return Mr.findIndex(function(An){return An.key===Tn})}),Hn=Object(d.a)(ri,2),di=Hn[0],Xi=Hn[1];Object(u.useEffect)(function(){var An=Mr.findIndex(function(Bi){return Bi.key===Tn});if(An===-1){var Ui;An=Math.max(0,Math.min(di,Mr.length-1)),Yn((Ui=Mr[An])===null||Ui===void 0?void 0:Ui.key)}Xi(An)},[Mr.map(function(An){return An.key}).join("_"),Tn,di]);var wi=Object(l.a)(null,{value:Fe}),ni=Object(d.a)(wi,2),In=ni[0],Nn=ni[1],zn=It;bn&&!["left","right"].includes(It)&&(zn="top"),Object(u.useEffect)(function(){Fe||(Nn("rc-tabs-".concat(qr)),qr+=1)},[]);function Bn(An,Ui){on==null||on(An,Ui),Yn(An),pn==null||pn(An)}var Zn={id:In,activeKey:Tn,animated:nn,tabPosition:zn,rtl:Fr,mobile:bn},Di,ra=Object(D.a)(Object(D.a)({},Zn),{},{editable:qe,locale:Kr,moreIcon:Qr,moreTransitionName:Wr,tabBarGutter:Xt,onTabClick:Bn,onTabScroll:kn,extra:Gr,style:Pr,panes:je});return tn?Di=tn(ra,rn):Di=u.createElement(rn,Object.assign({},ra)),u.createElement(pr.Provider,{value:{tabs:Mr,prefixCls:Pe}},u.createElement("div",Object.assign({ref:Ge,id:Fe,className:C()(Pe,"".concat(Pe,"-").concat(zn),(Ye={},Object(P.a)(Ye,"".concat(Pe,"-mobile"),bn),Object(P.a)(Ye,"".concat(Pe,"-editable"),qe),Object(P.a)(Ye,"".concat(Pe,"-rtl"),Fr),Ye),we)},ln),Di,u.createElement(an,Object.assign({destroyInactiveTabPane:en},Zn,{animated:nn}))))}var zr=u.forwardRef(un);zr.TabPane=Ar;var cn=zr,$n=Z.b=cn},kSUc:function(j,Z,L){},lPiR:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.WordArray,p=D.Hasher,C=T.algo,E=[],l=[];(function(){function h(_){for(var y=d.sqrt(_),i=2;i<=y;i++)if(!(_%i))return!1;return!0}function f(_){return(_-(_|0))*4294967296|0}for(var c=2,m=0;m<64;)h(c)&&(m<8&&(E[m]=f(d.pow(c,1/2))),l[m]=f(d.pow(c,1/3)),m++),c++})();var s=[],n=C.SHA256=p.extend({_doReset:function(){this._hash=new u.init(E.slice(0))},_doProcessBlock:function(h,f){for(var c=this._hash.words,m=c[0],_=c[1],y=c[2],i=c[3],a=c[4],t=c[5],S=c[6],x=c[7],o=0;o<64;o++){if(o<16)s[o]=h[f+o]|0;else{var k=s[o-15],O=(k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3,b=s[o-2],v=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;s[o]=O+s[o-7]+v+s[o-16]}var g=a&t^~a&S,w=m&_^m&y^_&y,M=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),N=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),I=x+N+g+l[o]+s[o],G=M+w;x=S,S=t,t=a,a=i+I|0,i=y,y=_,_=m,m=I+G|0}c[0]=c[0]+m|0,c[1]=c[1]+_|0,c[2]=c[2]+y|0,c[3]=c[3]+i|0,c[4]=c[4]+a|0,c[5]=c[5]+t|0,c[6]=c[6]+S|0,c[7]=c[7]+x|0},_doFinalize:function(){var h=this._data,f=h.words,c=this._nDataBytes*8,m=h.sigBytes*8;return f[m>>>5]|=128<<24-m%32,f[(m+64>>>9<<4)+14]=d.floor(c/4294967296),f[(m+64>>>9<<4)+15]=c,h.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var h=p.clone.call(this);return h._hash=this._hash.clone(),h}});T.SHA256=p._createHelper(n),T.HmacSHA256=p._createHmacHelper(n)}(Math),P.SHA256})},lZu9:function(j,Z,L){(function(P){P(L("VrN/"),L("1eCo"),L("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(d,T){var D=P.getMode(d,"text/html"),u=D.name=="null";function p(U){if(P.findModeByName){var B=P.findModeByName(U);B&&(U=B.mime||B.mimes[0])}var V=P.getMode(d,U);return V.name=="null"?null:V}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var E in C)C.hasOwnProperty(E)&&T.tokenTypeOverrides[E]&&(C[E]=T.tokenTypeOverrides[E]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,h=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,_=/^\s*\[[^\]]+?\]:.*$/,y=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,i=" ";function a(U,B,V){return B.f=B.inline=V,V(U,B)}function t(U,B,V){return B.f=B.block=V,V(U,B)}function S(U){return!U||!/\S/.test(U.string)}function x(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==k){var B=u;if(!B){var V=P.innerMode(D,U.htmlState);B=V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText}B&&(U.f=g,U.block=o,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function o(U,B){var V=U.column()===B.indentation,ae=S(B.prevLine.stream),he=B.indentedCode,pe=B.prevLine.hr,Re=B.list!==!1,ke=(B.listStack[B.listStack.length-1]||0)+3;B.indentedCode=!1;var ve=B.indentation;if(B.indentationDiff===null&&(B.indentationDiff=B.indentation,Re)){for(B.list=null;ve<B.listStack[B.listStack.length-1];)B.listStack.pop(),B.listStack.length?B.indentation=B.listStack[B.listStack.length-1]:B.list=!1;B.list!==!1&&(B.indentationDiff=ve-B.listStack[B.listStack.length-1])}var Te=!ae&&!pe&&!B.prevLine.header&&(!Re||!he)&&!B.prevLine.fencedCodeEnd,be=(B.list===!1||pe||ae)&&B.indentation<=ke&&U.match(l),ue=null;if(B.indentationDiff>=4&&(he||B.prevLine.fencedCodeEnd||B.prevLine.header||ae))return U.skipToEnd(),B.indentedCode=!0,C.code;if(U.eatSpace())return null;if(V&&B.indentation<=ke&&(ue=U.match(h))&&ue[1].length<=6)return B.quote=0,B.header=ue[1].length,B.thisLine.header=!0,T.highlightFormatting&&(B.formatting="header"),B.f=B.inline,b(B);if(B.indentation<=ke&&U.eat(">"))return B.quote=V?1:B.quote+1,T.highlightFormatting&&(B.formatting="quote"),U.eatSpace(),b(B);if(!be&&!B.setext&&V&&B.indentation<=ke&&(ue=U.match(s))){var le=ue[1]?"ol":"ul";return B.indentation=ve+U.current().length,B.list=!0,B.quote=0,B.listStack.push(B.indentation),B.em=!1,B.strong=!1,B.code=!1,B.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(B.taskList=!0),B.f=B.inline,T.highlightFormatting&&(B.formatting=["list","list-"+le]),b(B)}else{if(V&&B.indentation<=ke&&(ue=U.match(m,!0)))return B.quote=0,B.fencedEndRE=new RegExp(ue[1]+"+ *$"),B.localMode=T.fencedCodeBlockHighlighting&&p(ue[2]||T.fencedCodeBlockDefaultMode),B.localMode&&(B.localState=P.startState(B.localMode)),B.f=B.block=O,T.highlightFormatting&&(B.formatting="code-block"),B.code=-1,b(B);if(B.setext||(!Te||!Re)&&!B.quote&&B.list===!1&&!B.code&&!be&&!_.test(U.string)&&(ue=U.lookAhead(1))&&(ue=ue.match(f)))return B.setext?(B.header=B.setext,B.setext=0,U.skipToEnd(),T.highlightFormatting&&(B.formatting="header")):(B.header=ue[0].charAt(0)=="="?1:2,B.setext=B.header),B.thisLine.header=!0,B.f=B.inline,b(B);if(be)return U.skipToEnd(),B.hr=!0,B.thisLine.hr=!0,C.hr;if(U.peek()==="[")return a(U,B,G)}return a(U,B,B.inline)}function k(U,B){var V=D.token(U,B.htmlState);if(!u){var ae=P.innerMode(D,B.htmlState);(ae.mode.name=="xml"&&ae.state.tagStart===null&&!ae.state.context&&ae.state.tokenize.isInText||B.md_inside&&U.current().indexOf(">")>-1)&&(B.f=g,B.block=o,B.htmlState=null)}return V}function O(U,B){var V=B.listStack[B.listStack.length-1]||0,ae=B.indentation<V,he=V+3;if(B.fencedEndRE&&B.indentation<=he&&(ae||U.match(B.fencedEndRE))){T.highlightFormatting&&(B.formatting="code-block");var pe;return ae||(pe=b(B)),B.localMode=B.localState=null,B.block=o,B.f=g,B.fencedEndRE=null,B.code=0,B.thisLine.fencedCodeEnd=!0,ae?t(U,B,B.block):pe}else return B.localMode?B.localMode.token(U,B.localState):(U.skipToEnd(),C.code)}function b(U){var B=[];if(U.formatting){B.push(C.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var V=0;V<U.formatting.length;V++)B.push(C.formatting+"-"+U.formatting[V]),U.formatting[V]==="header"&&B.push(C.formatting+"-"+U.formatting[V]+"-"+U.header),U.formatting[V]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?B.push(C.formatting+"-"+U.formatting[V]+"-"+U.quote):B.push("error"))}if(U.taskOpen)return B.push("meta"),B.length?B.join(" "):null;if(U.taskClosed)return B.push("property"),B.length?B.join(" "):null;if(U.linkHref?B.push(C.linkHref,"url"):(U.strong&&B.push(C.strong),U.em&&B.push(C.em),U.strikethrough&&B.push(C.strikethrough),U.emoji&&B.push(C.emoji),U.linkText&&B.push(C.linkText),U.code&&B.push(C.code),U.image&&B.push(C.image),U.imageAltText&&B.push(C.imageAltText,"link"),U.imageMarker&&B.push(C.imageMarker)),U.header&&B.push(C.header,C.header+"-"+U.header),U.quote&&(B.push(C.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?B.push(C.quote+"-"+U.quote):B.push(C.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var ae=(U.listStack.length-1)%3;ae?ae===1?B.push(C.list2):B.push(C.list3):B.push(C.list1)}return U.trailingSpaceNewLine?B.push("trailing-space-new-line"):U.trailingSpace&&B.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),B.length?B.join(" "):null}function v(U,B){return U.match(c,!0)?b(B):void 0}function g(U,B){var V=B.text(U,B);if(typeof V!="undefined")return V;if(B.list)return B.list=null,b(B);if(B.taskList){var ae=U.match(n,!0)[1]===" ";return ae?B.taskOpen=!0:B.taskClosed=!0,T.highlightFormatting&&(B.formatting="task"),B.taskList=!1,b(B)}if(B.taskOpen=!1,B.taskClosed=!1,B.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(B.formatting="header"),b(B);var he=U.next();if(B.linkTitle){B.linkTitle=!1;var pe=he;he==="("&&(pe=")"),pe=(pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Re="^\\s*(?:[^"+pe+"\\\\]+|\\\\\\\\|\\\\.)"+pe;if(U.match(new RegExp(Re),!0))return C.linkHref}if(he==="`"){var ke=B.formatting;T.highlightFormatting&&(B.formatting="code"),U.eatWhile("`");var ve=U.current().length;if(B.code==0&&(!B.quote||ve==1))return B.code=ve,b(B);if(ve==B.code){var Te=b(B);return B.code=0,Te}else return B.formatting=ke,b(B)}else if(B.code)return b(B);if(he==="\\"&&(U.next(),T.highlightFormatting)){var be=b(B),ue=C.formatting+"-escape";return be?be+" "+ue:ue}if(he==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return B.imageMarker=!0,B.image=!0,T.highlightFormatting&&(B.formatting="image"),b(B);if(he==="["&&B.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return B.imageMarker=!1,B.imageAltText=!0,T.highlightFormatting&&(B.formatting="image"),b(B);if(he==="]"&&B.imageAltText){T.highlightFormatting&&(B.formatting="image");var be=b(B);return B.imageAltText=!1,B.image=!1,B.inline=B.f=M,be}if(he==="["&&!B.image)return B.linkText&&U.match(/^.*?\]/)||(B.linkText=!0,T.highlightFormatting&&(B.formatting="link")),b(B);if(he==="]"&&B.linkText){T.highlightFormatting&&(B.formatting="link");var be=b(B);return B.linkText=!1,B.inline=B.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:g,be}if(he==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=w,T.highlightFormatting&&(B.formatting="link");var be=b(B);return be?be+=" ":be="",be+C.linkInline}if(he==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=w,T.highlightFormatting&&(B.formatting="link");var be=b(B);return be?be+=" ":be="",be+C.linkEmail}if(T.xml&&he==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=U.string.indexOf(">",U.pos);if(le!=-1){var re=U.string.substring(U.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(B.md_inside=!0)}return U.backUp(1),B.htmlState=P.startState(D),t(U,B,k)}if(T.xml&&he==="<"&&U.match(/^\/\w*?>/))return B.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var fe=1,q=U.pos==1?" ":U.string.charAt(U.pos-2);fe<3&&U.eat(he);)fe++;var ee=U.peek()||" ",Ce=!/\s/.test(ee)&&(!y.test(ee)||/\s/.test(q)||y.test(q)),te=!/\s/.test(q)&&(!y.test(q)||/\s/.test(ee)||y.test(ee)),J=null,X=null;if(fe%2&&(!B.em&&Ce&&(he==="*"||!te||y.test(q))?J=!0:B.em==he&&te&&(he==="*"||!Ce||y.test(ee))&&(J=!1)),fe>1&&(!B.strong&&Ce&&(he==="*"||!te||y.test(q))?X=!0:B.strong==he&&te&&(he==="*"||!Ce||y.test(ee))&&(X=!1)),X!=null||J!=null){T.highlightFormatting&&(B.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(B.em=he),X===!0&&(B.strong=he);var Te=b(B);return J===!1&&(B.em=!1),X===!1&&(B.strong=!1),Te}}else if(he===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return b(B);U.backUp(1)}if(T.strikethrough){if(he==="~"&&U.eatWhile(he)){if(B.strikethrough){T.highlightFormatting&&(B.formatting="strikethrough");var Te=b(B);return B.strikethrough=!1,Te}else if(U.match(/^[^\s]/,!1))return B.strikethrough=!0,T.highlightFormatting&&(B.formatting="strikethrough"),b(B)}else if(he===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return b(B);U.backUp(2)}}if(T.emoji&&he===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){B.emoji=!0,T.highlightFormatting&&(B.formatting="emoji");var Q=b(B);return B.emoji=!1,Q}return he===" "&&(U.match(/^ +$/,!1)?B.trailingSpace++:B.trailingSpace&&(B.trailingSpaceNewLine=!0)),b(B)}function w(U,B){var V=U.next();if(V===">"){B.f=B.inline=g,T.highlightFormatting&&(B.formatting="link");var ae=b(B);return ae?ae+=" ":ae="",ae+C.linkInline}return U.match(/^[^>]+/,!0),C.linkInline}function M(U,B){if(U.eatSpace())return null;var V=U.next();return V==="("||V==="["?(B.f=B.inline=I(V==="("?")":"]"),T.highlightFormatting&&(B.formatting="link-string"),B.linkHref=!0,b(B)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(U){return function(B,V){var ae=B.next();if(ae===U){V.f=V.inline=g,T.highlightFormatting&&(V.formatting="link-string");var he=b(V);return V.linkHref=!1,he}return B.match(N[U]),V.linkHref=!0,b(V)}}function G(U,B){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(B.f=z,U.next(),T.highlightFormatting&&(B.formatting="link"),B.linkText=!0,b(B)):a(U,B,g)}function z(U,B){if(U.match(/^\]:/,!0)){B.f=B.inline=H,T.highlightFormatting&&(B.formatting="link");var V=b(B);return B.linkText=!1,V}return U.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function H(U,B){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?B.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),B.f=B.inline=g,C.linkHref+" url")}var K={startState:function(){return{f:o,prevLine:{stream:null},thisLine:{stream:null},block:o,htmlState:null,indentation:0,inline:g,text:v,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&P.copyState(D,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?P.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,B){if(B.formatting=!1,U!=B.thisLine.stream){if(B.header=0,B.hr=!1,U.match(/^\s*$/,!0))return x(B),null;if(B.prevLine=B.thisLine,B.thisLine={stream:U},B.taskList=!1,B.trailingSpace=0,B.trailingSpaceNewLine=!1,!B.localState&&(B.f=B.block,B.f!=k)){var V=U.match(/^\s*/,!0)[0].replace(/\t/g,i).length;if(B.indentation=V,B.indentationDiff=null,V>0)return null}}return B.f(U,B)},innerMode:function(U){return U.block==k?{state:U.htmlState,mode:D}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:K}},indent:function(U,B,V){return U.block==k&&D.indent?D.indent(U.htmlState,B,V):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,B,V):P.Pass},blankLine:x,getType:b,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Z,L){j.exports=L.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 Z})(function(){var define,module,exports;return function(){function j(Z,L,P){function d(u,p){if(!L[u]){if(!Z[u]){var C=typeof require=="function"&&require;if(!p&&C)return require(u,!0);if(T)return T(u,!0);var E=new Error("Cannot find module '"+u+"'");throw E.code="MODULE_NOT_FOUND",E}var l=L[u]={exports:{}};Z[u][0].call(l.exports,function(s){var n=Z[u][1][s];return d(n||s)},l,l.exports,j,Z,L,P)}return L[u].exports}for(var T=typeof require=="function"&&require,D=0;D<P.length;D++)d(P[D]);return d}return j}()({1:[function(j,Z,L){"use strict";var P=j("./browser/client");P.Buffer=j("buffer").Buffer,P.urllib=j("../shims/xhr"),P.version=j("./browser/version").version,Z.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,Z,L){(function(P,d){"use strict";var T=j("babel-runtime/core-js/promise"),D=l(T),u=j("babel-runtime/regenerator"),p=l(u),C=j("babel-runtime/core-js/object/assign"),E=l(C);function l(G){return G&&G.__esModule?G:{default:G}}var s=j("debug")("ali-oss"),n=j("copy-to"),h=j("xml2js"),f=j("agentkeepalive"),c=j("merge-descriptors"),m=j("url"),_=j("is-type-of"),y=j("platform"),i=j("utility"),a=j("urllib"),t=j("./version"),S=j("bowser"),x=j("../common/signUtils"),o=j("../common/utils/isIP"),k=o.isIP,O=j("../common/client/initOptions"),b=j("../common/utils/createRequest"),v=b.createRequest,g=new f;function w(){var G=y.name,z=y.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function N(G,z){if(w(),!(this instanceof N))return new N(G,z);G&&G.inited?this.options=G:this.options=N.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=a,this.agent=this.options.agent||g),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Z.exports=N,N.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var H=(0,E.default)({secure:M(),useFetch:!1},z);return O(H)};var I=N.prototype;I.debug=s,c(I,j("./object")),c(I,j("../common/bucket/getBucketWebsite")),c(I,j("../common/bucket/putBucketWebsite")),c(I,j("../common/bucket/deleteBucketWebsite")),c(I,j("../common/bucket/getBucketLifecycle")),c(I,j("../common/bucket/putBucketLifecycle")),c(I,j("../common/bucket/deleteBucketLifecycle")),c(I,j("../common/bucket/putBucketVersioning")),c(I,j("../common/bucket/getBucketVersioning")),c(I,j("./managed-upload")),c(I,j("../common/multipart")),c(I,j("../common/parallel")),I.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),x.computeSignature(this.options.accessKeySecret,z)},I.authorization=function(z,H,K,U){var B=x.buildCanonicalString(z.toUpperCase(),H,{headers:U,parameters:K});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,B)},I.request=function(z){var H,K,U,B,V,ae;return p.default.async(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return H=v.call(this,z),this.options.useFetch||(H.params.mode="disable-fetch"),K=void 0,U=void 0,B=!!z.stream,pe.prev=5,pe.next=8,p.default.awrap(this.urllib.request(H.url,H.params));case 8:K=pe.sent,this.debug("response %s %s, got %s, headers: %j",z.method,H.url,K.status,K.headers,"info"),pe.next=15;break;case 12:pe.prev=12,pe.t0=pe.catch(5),U=pe.t0;case 15:if(V=void 0,!(K&&z.successStatuses&&z.successStatuses.indexOf(K.status)===-1)){pe.next=28;break}return pe.next=19,p.default.awrap(this.requestError(K));case 19:if(V=pe.sent,!(V.code==="RequestTimeTooSkewed"&&!B)){pe.next=25;break}return this.options.amendTimeSkewed=+new Date(V.serverTime)-new Date,pe.next=24,p.default.awrap(this.request(z));case 24:return pe.abrupt("return",pe.sent);case 25:V.params=z,pe.next=32;break;case 28:if(!U){pe.next=32;break}return pe.next=31,p.default.awrap(this.requestError(U));case 31:V=pe.sent;case 32:if(!V){pe.next=34;break}throw V;case 34:if(!z.xmlResponse){pe.next=39;break}return pe.next=37,p.default.awrap(this.parseXML(K.data));case 37:ae=pe.sent,K.data=ae;case 39:return pe.abrupt("return",K);case 40:case"end":return pe.stop()}},null,this,[[5,12]])},I._getResource=function(z){var H="/";return z.bucket&&(H+=z.bucket+"/"),z.object&&(H+=z.object),H},I._isIP=k,I._escape=function(z){return i.encodeURIComponent(z).replace(/%2F/g,"/")},I._getReqUrl=function(z){var H={};n(this.options.endpoint).to(H);var K=this._isIP(H.hostname),U=this.options.cname;z.bucket&&!U&&!K&&(H.host=z.bucket+"."+H.host);var B="/";z.bucket&&K&&(B+=z.bucket+"/"),z.object&&(B+=this._escape(z.object).replace(/\+/g,"%2B")),H.pathname=B;var V={};if(z.query&&c(V,z.query),z.subres){var ae={};_.string(z.subres)?ae[z.subres]="":_.array(z.subres)?z.subres.forEach(function(he){ae[he]=""}):ae=z.subres,c(V,ae)}return H.query=V,m.format(H)},I._getUserAgent=function(){var z=d&&d.browser?"js":"nodejs",H="aliyun-sdk-"+z+"/"+t.version,K=y.description;return!K&&d&&(K="Node.js "+d.version.slice(1)+" on "+d.platform+" "+d.arch),this._checkUserAgent(H+" "+K)},I._checkUserAgent=function(z){var H=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return H},I.checkBrowserAndVersion=function(z,H){return S.name===z&&S.version.split(".")[0]===H},I.parseXML=function(z){return new D.default(function(H,K){P.isBuffer(z)&&(z=z.toString()),h.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,B){U?K(U):H(B)})})},I.requestError=function(z){var H,K,U,B;return p.default.async(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(H=null,!(!z.data||!z.data.length)){ae.next=5;break}z.status===-1||z.status===-2?(H=new Error(z.message),H.name=z.name,H.status=z.status,H.code=z.name):(z.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):z.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+z.status),H.name="UnknowError",H.status=z.status),H.requestId=z.headers["x-oss-request-id"],H.host=""),ae.next=33;break;case 5:return K=String(z.data),this.debug("request response error data: %s",K,"error"),U=void 0,ae.prev=8,ae.next=11,p.default.awrap(this.parseXML(K));case 11:if(ae.t0=ae.sent,ae.t0){ae.next=14;break}ae.t0={};case 14:U=ae.t0,ae.next=24;break;case 17:return ae.prev=17,ae.t1=ae.catch(8),this.debug(K,"error"),ae.t1.message+=`
raw xml: `+K,ae.t1.status=z.status,ae.t1.requestId=z.headers["x-oss-request-id"],ae.abrupt("return",ae.t1);case 24:B=U.Message||"unknow request error, status: "+z.status,U.Condition&&(B+=" (condition: "+U.Condition+")"),H=new Error(B),H.name=U.Code?U.Code+"Error":"UnknowError",H.status=z.status,H.code=U.Code,H.requestId=U.RequestId,H.hostId=U.HostId,H.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",H,"error"),ae.abrupt("return",H);case 35:case"end":return ae.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,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/array/from"),T=E(d),D=j("babel-runtime/core-js/promise"),u=E(D),p=j("babel-runtime/regenerator"),C=E(p);function E(x){return x&&x.__esModule?x:{default:x}}var l=j("is-type-of"),s=j("util"),n=j("path"),h=j("mime"),f=j("copy-to"),c=j("../common/utils/isBlob"),m=c.isBlob,_=j("../common/utils/isFile"),y=_.isFile,i=L;i.multipartUpload=function(o,k,O){var b,v,g,w,M,N,I,G,z;return C.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){K.next=6;break}return K.next=5,C.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return K.abrupt("return",K.sent);case 6:return b=100*1024,O.mime||(y(k)?O.mime=h.getType(n.extname(k.name)):m(k)?O.mime=k.type:O.mime=h.getType(n.extname(k))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),K.next=12,C.default.awrap(this._getFileSize(k));case 12:if(v=K.sent,!(v<b)){K.next=25;break}return g=this._createStream(k,0,v),O.contentLength=v,K.next=18,C.default.awrap(this.putStream(o,g,O));case 18:if(w=K.sent,!(O&&O.progress)){K.next=22;break}return K.next=22,C.default.awrap(O.progress(1));case 22:return M={res:w.res,bucket:this.options.bucket,name:o,etag:w.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(M.data=w.data),K.abrupt("return",M);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<b)){K.next=29;break}throw new Error("partSize must not be smaller than "+b);case 29:return K.next=31,C.default.awrap(this.initMultipartUpload(o,O));case 31:if(N=K.sent,I=N.uploadId,G=this._getPartSize(v,O.partSize),z={file:k,name:o,fileSize:v,partSize:G,uploadId:I,doneParts:[]},!(O&&O.progress)){K.next=38;break}return K.next=38,C.default.awrap(O.progress(0,z,N.res));case 38:return K.next=40,C.default.awrap(this._resumeMultipart(z,O));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},i._resumeMultipart=function(o,k){var O,b,v,g,w,M,N,I,G,z,H,K,U,B,V,ae,he,pe;return C.default.async(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(O=this,!this.isCancel()){ke.next=3;break}throw this._makeCancelEvent();case 3:return b=o.file,v=o.fileSize,g=o.partSize,w=o.uploadId,M=o.doneParts,N=o.name,I=[],M.length>0&&f(M).to(I),G=this._divideParts(v,g),z=G.length,H=!1,K=function(Te,be){var ue=this;return new u.default(function(re,fe){var q,ee,Ce,te;return C.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Te.isCancel()){X.next=18;break}return q=G[be-1],ee={stream:Te._createStream(b,q.start,q.end),size:q.end-q.start},X.next=6,C.default.awrap(Te._uploadPart(N,w,be,ee));case 6:if(Ce=X.sent,!(!Te.isCancel()&&!H)){X.next=15;break}if(o.doneParts.push({number:be,etag:Ce.res.headers.etag}),!k.progress){X.next=12;break}return X.next=12,C.default.awrap(k.progress(M.length/z,o,Ce.res));case 12:re({number:be,etag:Ce.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();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=be,f(X.t0).to(te),fe(te);case 30:case"end":return X.stop()}},null,ue,[[0,21]])})},U=(0,T.default)(new Array(z),function(ve,Te){return Te+1}),B=I.map(function(ve){return ve.number}),V=U.filter(function(ve){return B.indexOf(ve)<0}),ae=5,he=k.parallel||ae,ke.next=17,C.default.awrap(this._parallel(V,he,function(ve){return new u.default(function(Te,be){K(O,ve).then(function(ue){ue&&I.push(ue),Te()}).catch(function(ue){be(ue)})})}));case 17:if(pe=ke.sent,H=!0,!this.isCancel()){ke.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(pe&&pe.length>0)){ke.next=25;break}throw pe[0].message="Failed to upload some parts with error: "+pe[0].toString()+" part_num: "+pe[0].partNum,pe[0];case 25:return ke.next=27,C.default.awrap(this.completeMultipartUpload(N,w,I,k));case 27:return ke.abrupt("return",ke.sent);case 28:case"end":return ke.stop()}},null,this)},i._getFileSize=function(o){return C.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!l.buffer(o)){O.next=4;break}return O.abrupt("return",o.length);case 4:if(!(m(o)||y(o))){O.next=6;break}return O.abrupt("return",o.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var a=j("stream"),t=a.Readable;function S(x,o){if(!(this instanceof S))return new S(x,o);t.call(this,o),this.file=x,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}s.inherits(S,t),S.prototype.readFileAndPush=function(o){if(this.fileBuffer)for(var k=!0;k&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,b=O+o;b=b>this.fileBuffer.length?this.fileBuffer.length:b,this.start=b,k=this.push(this.fileBuffer.slice(O,b))}},S.prototype._read=function(o){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 k=16*1024;o=o||k;var O=this;this.reader.onload=function(v){O.fileBuffer=P.from(new Uint8Array(v.target.result)),O.file=null,O.readFileAndPush(o)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(o)},i._createStream=function(o,k,O){if(m(o)||y(o))return new S(o.slice(k,O));throw new Error("_createStream requires File/Blob.")},i._getPartSize=function(o,k){var O=10*1e3,b=1024*1024;return k?Math.max(Math.ceil(o/O),k):b},i._divideParts=function(o,k){for(var O=Math.ceil(o/k),b=[],v=0;v<O;v++){var g=k*v,w=Math.min(g+k,o);b.push({start:g,end:w})}return b}}).call(this,j("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/promise"),d=l(P),T=j("babel-runtime/core-js/object/keys"),D=l(T),u=j("babel-runtime/core-js/object/assign"),p=l(u),C=j("babel-runtime/regenerator"),E=l(C);function l(O){return O&&O.__esModule?O:{default:O}}var s=j("utility"),n=j("fs"),h=j("is-type-of"),f=j("url"),c=j("copy-to"),m=j("path"),_=j("mime"),y=j("../common/callback"),i=j("../common/signUtils"),a=j("merge-descriptors"),t=j("../common/utils/isBlob"),S=t.isBlob,x=j("../common/utils/isFile"),o=x.isFile,k=L;k.append=function(b,v,g){var w;return E.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return g=g||{},g.position===void 0&&(g.position="0"),g.subres={append:"",position:g.position},g.method="POST",N.next=6,E.default.awrap(this.put(b,v,g));case 6:return w=N.sent,w.nextAppendPosition=w.res.headers["x-oss-next-append-position"],N.abrupt("return",w);case 9:case"end":return N.stop()}},null,this)},k.put=function(b,v,g){var w,M,N,I,G,z,H;return E.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(w=void 0,g=g||{},b=this._objectName(b),!h.buffer(v)){U.next=7;break}w=v,U.next=33;break;case 7:if(!(S(v)||o(v))){U.next=32;break}return g.mime||(o(v)?g.mime=_.getType(m.extname(v.name)):g.mime=v.type),M=this._createStream(v,0,v.size),U.next=12,E.default.awrap(this._getFileSize(v));case 12:return g.contentLength=U.sent,U.prev=13,U.next=16,E.default.awrap(this.putStream(b,M,g));case 16:return N=U.sent,U.abrupt("return",N);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,E.default.awrap(this.put(b,v,g));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return g.headers=g.headers||{},this._convertMetaToHeaders(g.meta,g.headers),I=g.method||"PUT",G=this._objectRequestParams(I,b,g),y.encodeCallback(G,g),G.mime=g.mime,G.content=w,G.successStatuses=[200],U.next=43,E.default.awrap(this.request(G));case 43:return z=U.sent,H={name:b,url:this._objectUrl(b),res:z.res},G.headers&&G.headers["x-oss-callback"]&&(H.data=JSON.parse(z.data.toString())),U.abrupt("return",H);case 47:case"end":return U.stop()}},null,this,[[13,20]])},k.putStream=function(b,v,g){var w,M,N,I;return E.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return g=g||{},g.headers=g.headers||{},b=this._objectName(b),g.contentLength?g.headers["Content-Length"]=g.contentLength:g.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(g.meta,g.headers),w=g.method||"PUT",M=this._objectRequestParams(w,b,g),y.encodeCallback(M,g),M.mime=g.mime,M.stream=v,M.successStatuses=[200],z.next=13,E.default.awrap(this.request(M));case 13:return N=z.sent,I={name:b,url:this._objectUrl(b),res:N.res},M.headers&&M.headers["x-oss-callback"]&&(I.data=JSON.parse(N.data.toString())),z.abrupt("return",I);case 17:case"end":return z.stop()}},null,this)},a(k,j("../common/object/copyObject")),a(k,j("../common/object/getObjectTagging")),a(k,j("../common/object/putObjectTagging")),a(k,j("../common/object/deleteObjectTagging")),a(k,j("../common/image")),a(k,j("../common/object/getBucketVersions")),a(k,j("../common/object/getACL")),a(k,j("../common/object/putACL")),a(k,j("../common/object/head")),a(k,j("../common/object/delete")),a(k,j("../common/object/get")),a(k,j("../common/object/putSymlink")),a(k,j("../common/object/getSymlink")),a(k,j("../common/object/deleteMulti")),a(k,j("../common/object/getObjectMeta")),k.putMeta=function(b,v,g){var w;return E.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,E.default.awrap(this.copy(b,b,{meta:v||{},timeout:g&&g.timeout,ctx:g&&g.ctx}));case 2:return w=N.sent,N.abrupt("return",w);case 4:case"end":return N.stop()}},null,this)},k.list=function(b,v){var g,w,M,N,I;return E.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return g=this._objectRequestParams("GET","",v),g.query=b,g.xmlResponse=!0,g.successStatuses=[200],z.next=6,E.default.awrap(this.request(g));case 6:return w=z.sent,M=w.data.Contents,N=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(H){return{name:H.Key,url:N._objectUrl(H.Key),lastModified:H.LastModified,etag:H.ETag,type:H.Type,size:Number(H.Size),storageClass:H.StorageClass,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),I=w.data.CommonPrefixes||null,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(H){return H.Prefix})),z.abrupt("return",{res:w.res,objects:M,prefixes:I,nextMarker:w.data.NextMarker||null,isTruncated:w.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},k.restore=function(b,v){var g,w;return E.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return v=v||{},v.subres=(0,p.default)({restore:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),g=this._objectRequestParams("POST",b,v),g.successStatuses=[202],N.next=7,E.default.awrap(this.request(g));case 7:return w=N.sent,N.abrupt("return",{res:w.res});case 9:case"end":return N.stop()}},null,this)},k.signatureUrl=function(b,v){v=v||{},b=this._objectName(b),v.method=v.method||"GET";var g=s.timestamp()+(v.expires||1800),w={bucket:this.options.bucket,object:b},M=this._getResource(w);this.options.stsToken&&(v["security-token"]=this.options.stsToken);var N=i._signatureForURL(this.options.accessKeySecret,v,M,g),I=f.parse(this._getReqUrl(w));return I.query={OSSAccessKeyId:this.options.accessKeyId,Expires:g,Signature:N.Signature},c(N.subResource).to(I.query),I.format()},k.getObjectUrl=function(b,v){return v?v[v.length-1]!=="/"&&(v+="/"):v=this.options.endpoint.format(),v+this._escape(this._objectName(b))},k._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},k.generateObjectUrl=function(O,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var v=f.parse(b),g=this.options.bucket;v.hostname=g+"."+v.hostname,v.host=g+"."+v.host,b=v.format()}return b+this._escape(this._objectName(O))},k._objectRequestParams=function(b,v,g){if(!this.options.bucket)throw new Error("Please create a bucket first");g=g||{},v=this._objectName(v);var w={object:v,bucket:this.options.bucket,method:b,subres:g&&g.subres,timeout:g&&g.timeout,ctx:g&&g.ctx};return g.headers&&(w.headers={},c(g.headers).to(w.headers)),w},k._objectName=function(b){return b.replace(/^\/+/,"")},k._convertMetaToHeaders=function(b,v){if(!b)return;(0,D.default)(b).forEach(function(g){v["x-oss-meta-"+g]=b[g]})},k._deleteFileSafe=function(b){var v=this;return new d.default(function(g){n.exists(b,function(w){w?n.unlink(b,function(M){M&&v.debug("unlink %j error: %s",b,M,"error"),g()}):g()})})}},{"../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,Z,L){"use strict";L.version="6.10.0"},{}],6:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(C){return C&&C.__esModule?C:{default:C}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=L;p.deleteBucketLifecycle=function(E,l){var s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return u(E),s=this._bucketRequestParams("DELETE",E,"lifecycle",l),s.successStatuses=[204],f.next=5,d.default.awrap(this.request(s));case 5:return n=f.sent,f.abrupt("return",{res:n.res});case 7:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(C){return C&&C.__esModule?C:{default:C}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=L;p.deleteBucketWebsite=function(E,l){var s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return u(E),s=this._bucketRequestParams("DELETE",E,"website",l),s.successStatuses=[204],f.next=5,d.default.awrap(this.request(s));case 5:return n=f.sent,f.abrupt("return",{res:n.res});case 7:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/isArray"),C=p.isArray,E=j("../utils/formatObjKey"),l=E.formatObjKey,s=L;s.getBucketLifecycle=function(h,f){var c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return u(h),c=this._bucketRequestParams("GET",h,"lifecycle",f),c.successStatuses=[200],c.xmlResponse=!0,i.next=6,d.default.awrap(this.request(c));case 6:return m=i.sent,_=m.data.Rule||null,_&&(C(_)||(_=[_]),_=_.map(function(a){return a.ID&&(a.id=a.ID,delete a.ID),a.Tag&&!C(a.Tag)&&(a.Tag=[a.Tag]),l(a,"firstLowerCase")})),i.abrupt("return",{rules:_,res:m.res});case 10:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(C){return C&&C.__esModule?C:{default:C}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=L;p.getBucketVersioning=function(E,l){var s,n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u(E),s=this._bucketRequestParams("GET",E,"versioning",l),s.xmlResponse=!0,s.successStatuses=[200],c.next=6,d.default.awrap(this.request(s));case 6:return n=c.sent,h=n.data.Status,c.abrupt("return",{status:n.status,versionStatus:h,res:n.res});case 9:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(l){return l&&l.__esModule?l:{default:l}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/isObject"),C=p.isObject,E=L;E.getBucketWebsite=function(s,n){var h,f,c;return d.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return u(s),h=this._bucketRequestParams("GET",s,"website",n),h.successStatuses=[200],h.xmlResponse=!0,_.next=6,d.default.awrap(this.request(h));case 6:return f=_.sent,c=[],f.data.RoutingRules&&f.data.RoutingRules.RoutingRule&&(C(f.data.RoutingRules.RoutingRule)?c=[f.data.RoutingRules.RoutingRule]:c=f.data.RoutingRules.RoutingRule),_.abrupt("return",{index:f.data.IndexDocument&&f.data.IndexDocument.Suffix||"",supportSubDir:f.data.IndexDocument&&f.data.IndexDocument.SupportSubDir||"false",type:f.data.IndexDocument&&f.data.IndexDocument.Type,routingRules:c,error:f.data.ErrorDocument&&f.data.ErrorDocument.Key||null,res:f.res});case 10:case"end":return _.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/isArray"),C=p.isArray,E=j("../utils/deepCopy"),l=E.deepCopy,s=j("../utils/isObject"),n=s.isObject,h=j("../utils/obj2xml"),f=h.obj2xml,c=j("../utils/checkObjectTag"),m=c.checkObjectTag,_=j("../utils/getStrBytesCount"),y=_.getStrBytesCount,i=L;i.putBucketLifecycle=function(k,O,b){var v,g,w,M,N;return d.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(u(k),C(O)){G.next=3;break}throw new Error("rules must be Array");case 3:return v=this._bucketRequestParams("PUT",k,"lifecycle",b),g=[],w={LifecycleConfiguration:{Rule:g}},O.forEach(function(z){a(z),x(z),z.id&&(z.ID=z.id,delete z.id),g.push(z)}),M=f(w,{headers:!0,firstUpperCase:!0}),v.content=M,v.mime="xml",v.successStatuses=[200],G.next=13,d.default.awrap(this.request(v));case 13:return N=G.sent,G.abrupt("return",{res:N.res});case 15:case"end":return G.stop()}},null,this)};function a(o){o.days&&(o.expiration={days:o.days}),o.date&&(o.expiration={createdBeforeDate:o.date})}function t(o,k){var O=o.days,b=o.createdBeforeDate;if(!O&&!b)throw new Error(k+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(b&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(b))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function S(o){if(!C(o)&&!n(o))throw new Error("tag must be Object or Array");o=n(o)?[o]:o;var k={},O=l(o);O.forEach(function(b){k[b.key]=b.value}),m(k)}function x(o){if(o.id&&y(o.id)>255)throw new Error("ID is composed of 255 bytes at most");if(o.prefix===""||o.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(o.status))throw new Error("Status must be Enabled or Disabled");if(o.transition){if(!["IA","Archive"].includes(o.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(o.transition,"Transition")}if(o.expiration){if(!o.expiration.expiredObjectDeleteMarker)t(o.expiration,"Expiration");else if(o.expiration.days||o.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(o.abortMultipartUpload&&t(o.abortMultipartUpload,"AbortMultipartUpload"),!o.expiration&&!o.abortMultipartUpload&&!o.transition&&!o.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(o.tag){if(o.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(o.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,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(l){return l&&l.__esModule?l:{default:l}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/obj2xml"),C=p.obj2xml,E=L;E.putBucketVersioning=function(s,n){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(u(s),["Enabled","Suspended"].includes(n)){y.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return f=this._bucketRequestParams("PUT",s,"versioning",h),c={VersioningConfiguration:{Status:n}},f.mime="xml",f.content=C(c,{headers:!0}),y.next=9,d.default.awrap(this.request(f));case 9:return m=y.sent,y.abrupt("return",{res:m.res,status:m.status});case 11:case"end":return y.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("../utils/obj2xml"),C=p.obj2xml,E=j("../utils/isArray"),l=E.isArray,s=L;s.putBucketWebsite=function(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],m,_,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(u(h),m=this._bucketRequestParams("PUT",h,"website",c),_={Suffix:f.index||"index.html"},y={IndexDocument:_},i={WebsiteConfiguration:y},f.supportSubDir&&(_.SupportSubDir=f.supportSubDir),f.type&&(_.Type=f.type),f.error&&(y.ErrorDocument={Key:f.error}),!(f.routingRules!==void 0)){S.next=12;break}if(l(f.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:y.RoutingRules={RoutingRule:f.routingRules};case 12:return i=C(i),m.content=i,m.mime="xml",m.successStatuses=[200],S.next=18,d.default.awrap(this.request(m));case 18:return a=S.sent,S.abrupt("return",{res:a.res});case 20:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/object/keys"),T=p(d),D=j("babel-runtime/core-js/json/stringify"),u=p(D);function p(C){return C&&C.__esModule?C:{default:C}}L.encodeCallback=function(E,l){if(E.headers=E.headers||{},!Object.prototype.hasOwnProperty.call(E.headers,"x-oss-callback")&&l.callback){var s={callbackUrl:encodeURI(l.callback.url),callbackBody:l.callback.body};l.callback.host&&(s.callbackHost=l.callback.host),l.callback.contentType&&(s.callbackBodyType=l.callback.contentType);var n=P.from((0,u.default)(s)).toString("base64");if(E.headers["x-oss-callback"]=n,l.callback.customValue){var h={};(0,T.default)(l.callback.customValue).forEach(function(f){h["x:"+f]=l.callback.customValue[f]}),E.headers["x-oss-callback-var"]=P.from((0,u.default)(h)).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,Z,L){"use strict";var P=j("babel-runtime/core-js/object/assign"),d=T(P);function T(s){return s&&s.__esModule?s:{default:s}}var D=j("humanize-ms"),u=j("url"),p=j("../utils/checkBucketName"),C=p.checkBucketName;function E(s,n){var h=u.parse(s);if(h.protocol||(h=u.parse("http"+(n?"s":"")+"://"+s)),h.protocol!=="http:"&&h.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return h}function l(s,n,h){var f=h?"https://":"http://",c=n?"-internal.aliyuncs.com":".aliyuncs.com",m="vpc100-oss-cn-";return s.substr(0,m.length)===m&&(c=".aliyuncs.com"),u.parse(f+s+c)}Z.exports=function(s){if(!s||!s.accessKeyId||!s.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");s.bucket&&C(s.bucket);var n=(0,d.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},s);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=D(n.timeout)),n.endpoint)n.endpoint=E(n.endpoint,n.secure);else if(n.region)n.endpoint=l(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,Z,L){"use strict";var P=j("merge-descriptors"),d=L;P(d,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,p=j("querystring"),C=j("js-base64"),E=C.Base64.encode,l=L;l.processObjectSave=function(h,f,c,m){var _,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return s(h,"sourceObject"),s(f,"targetObject"),s(c,"process"),f=this._objectName(f),m&&u(m),_=this._objectRequestParams("POST",h,{subres:"x-oss-process"}),y=m?",b_"+E(m):"",f=E(f),i={"x-oss-process":c+"|sys/saveas,o_"+f+y},_.content=p.stringify(i),S.next=12,d.default.awrap(this.request(_));case 12:return a=S.sent,S.abrupt("return",{res:a.res,status:a.res.status});case 14:case"end":return S.stop()}},null,this)};function s(n,h){if(!n)throw new Error(h+" is required");if(typeof n!="string")throw new Error(h+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=T(P);function T(l){return l&&l.__esModule?l:{default:l}}var D=j("copy-to"),u=j("./callback"),p=j("./utils/deepCopy"),C=p.deepCopy,E=L;E.listUploads=function(s,n){var h,f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return n=n||{},h={},D(n).to(h),h.subres="uploads",f=this._objectRequestParams("GET","",h),f.query=s,f.xmlResponse=!0,f.successStatuses=[200],y.next=10,d.default.awrap(this.request(f));case 10:return c=y.sent,m=c.data.Upload||[],Array.isArray(m)||(m=[m]),m=m.map(function(i){return{name:i.Key,uploadId:i.UploadId,initiated:i.Initiated}}),y.abrupt("return",{res:c.res,uploads:m,bucket:c.data.Bucket,nextKeyMarker:c.data.NextKeyMarker,nextUploadIdMarker:c.data.NextUploadIdMarker,isTruncated:c.data.IsTruncated==="true"});case 15:case"end":return y.stop()}},null,this)},E.listParts=function(s,n,h,f){var c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return f=f||{},c={},D(f).to(c),c.subres={uploadId:n},m=this._objectRequestParams("GET",s,c),m.query=h,m.xmlResponse=!0,m.successStatuses=[200],i.next=10,d.default.awrap(this.request(m));case 10:return _=i.sent,i.abrupt("return",{res:_.res,uploadId:_.data.UploadId,bucket:_.data.Bucket,name:_.data.Key,partNumberMarker:_.data.PartNumberMarker,nextPartNumberMarker:_.data.NextPartNumberMarker,maxParts:_.data.MaxParts,isTruncated:_.data.IsTruncated,parts:_.data.Part||[]});case 12:case"end":return i.stop()}},null,this)},E.abortMultipartUpload=function(s,n,h){var f,c,m;return d.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return this._stop(),h=h||{},f={},D(h).to(f),f.subres={uploadId:n},c=this._objectRequestParams("DELETE",s,f),c.successStatuses=[204],y.next=9,d.default.awrap(this.request(c));case 9:return m=y.sent,y.abrupt("return",{res:m.res});case 11:case"end":return y.stop()}},null,this)},E.initMultipartUpload=function(s,n){var h,f,c;return d.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return n=n||{},h={},D(n).to(h),h.headers=h.headers||{},this._convertMetaToHeaders(n.meta,h.headers),h.subres="uploads",f=this._objectRequestParams("POST",s,h),f.mime=n.mime,f.xmlResponse=!0,f.successStatuses=[200],_.next=12,d.default.awrap(this.request(f));case 12:return c=_.sent,_.abrupt("return",{res:c.res,bucket:c.data.Bucket,name:c.data.Key,uploadId:c.data.UploadId});case 14:case"end":return _.stop()}},null,this)},E.uploadPart=function(s,n,h,f,c,m,_){var y;return d.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return y={stream:this._createStream(f,c,m),size:m-c},a.next=3,d.default.awrap(this._uploadPart(s,n,h,y,_));case 3:return a.abrupt("return",a.sent);case 4:case"end":return a.stop()}},null,this)},E.completeMultipartUpload=function(s,n,h,f){var c,m,_,y,i,a,t,S;return d.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:for(c=h.concat().sort(function(k,O){return k.number-O.number}).filter(function(k,O,b){return!O||k.number!==b[O-1].number}),m=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,_=0;_<c.length;_++)y=c[_],m+=`<Part>
`,m+="<PartNumber>"+y.number+`</PartNumber>
`,m+="<ETag>"+y.etag+`</ETag>
`,m+=`</Part>
`;return m+="</CompleteMultipartUpload>",f=f||{},i={},i=C(f),i.headers&&delete i.headers["x-oss-server-side-encryption"],i.subres={uploadId:n},a=this._objectRequestParams("POST",s,i),u.encodeCallback(a,i),a.mime="xml",a.content=m,a.headers&&a.headers["x-oss-callback"]||(a.xmlResponse=!0),a.successStatuses=[200],o.next=17,d.default.awrap(this.request(a));case 17:return t=o.sent,S={res:t.res,bucket:a.bucket,name:s,etag:t.res.headers.etag},a.headers&&a.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),o.abrupt("return",S);case 21:case"end":return o.stop()}},null,this)},E._uploadPart=function(s,n,h,f,c){var m,_,y;return d.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return c=c||{},m={},D(c).to(m),m.headers={"Content-Length":f.size},m.subres={partNumber:h,uploadId:n},_=this._objectRequestParams("PUT",s,m),_.mime=m.mime,_.stream=f.stream,_.successStatuses=[200],a.next=11,d.default.awrap(this.request(_));case 11:if(y=a.sent,y.res.headers.etag){a.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 f.stream=null,_.stream=null,a.abrupt("return",{name:s,etag:y.res.headers.etag,res:y.res});case 17:case"end":return a.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/helpers/typeof"),p=C(u);function C(n){return n&&n.__esModule?n:{default:n}}var E=j("../utils/checkBucketName"),l=E.checkBucketName,s=L;s.copy=function(h,f,c,m){var _,y,i;return d.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof c=="undefined"?"undefined":(0,p.default)(c))==="object"&&(m=c),m=m||{},m.headers=m.headers||{},(0,D.default)(m.headers).forEach(function(S){m.headers["x-oss-copy-source-"+S.toLowerCase()]=m.headers[S]}),m.meta&&(m.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(m.meta,m.headers),f=this._getSourceName(f,c),m.versionId&&(f=f+"?versionId="+m.versionId),m.headers["x-oss-copy-source"]=f,_=this._objectRequestParams("PUT",h,m),_.xmlResponse=!0,_.successStatuses=[200,304],t.next=14,d.default.awrap(this.request(_));case 14:return y=t.sent,i=y.data,i&&(i={etag:i.ETag,lastModified:i.LastModified}),t.abrupt("return",{data:i,res:y.res});case 18:case"end":return t.stop()}},null,this)},s._getSourceName=function(h,f){return typeof f=="string"?h=this._objectName(h):h[0]!=="/"?f=this.options.bucket:(f=h.replace(/\/(.+?)(\/.*)/,"$1"),h=h.replace(/(\/.+?\/)(.*)/,"$2")),l(f),h=encodeURI(h),h="/"+f+"/"+h,h}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.delete=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectRequestParams("DELETE",E,l),s.successStatuses=[204],f.next=6,d.default.awrap(this.request(s));case 6:return n=f.sent,f.abrupt("return",{res:n.res});case 8:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(s){return s&&s.__esModule?s:{default:s}}var p=j("utility"),C=j("../utils/obj2xml"),E=C.obj2xml,l=L;l.deleteMulti=function(n){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f,c,m,_,y,i,a,t,S,x,o,k;return d.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(f=[],!(!n||!n.length)){b.next=3;break}throw new Error("names is required");case 3:for(c=0;c<n.length;c++)m={},typeof n[c]=="string"?m.Key=p.escape(this._objectName(n[c])):(_=n[c],y=_.key,i=_.versionId,m.Key=p.escape(this._objectName(y)),m.VersionId=i),f.push(m);return a={Delete:{Quiet:!!h.quiet,Object:f}},t=E(a,{headers:!0}),h.subres=(0,D.default)({delete:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),S=this._objectRequestParams("POST","",h),S.mime="xml",S.content=t,S.xmlResponse=!0,S.successStatuses=[200],b.next=15,d.default.awrap(this.request(S));case 15:return x=b.sent,o=x.data,k=o&&o.Deleted||null,k&&(Array.isArray(k)||(k=[k])),b.abrupt("return",{res:x.res,deleted:k||[]});case 20:case"end":return b.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.deleteObjectTagging=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({tagging:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("DELETE",E,l),s.successStatuses=[204],f.next=7,d.default.awrap(this.request(s));case 7:return n=f.sent,f.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(l){return l&&l.__esModule?l:{default:l}}var p=j("fs"),C=j("is-type-of"),E=L;E.get=function(s,n){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return f=null,c=!1,C.writableStream(n)?f=n:C.string(n)?(f=p.createWriteStream(n),c=!0):h=n,h=h||{},h.subres=(0,D.default)({},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.process&&(h.subres["x-oss-process"]=h.process),m=void 0,i.prev=8,_=this._objectRequestParams("GET",s,h),_.writeStream=f,_.successStatuses=[200,206,304],i.next=14,d.default.awrap(this.request(_));case 14:m=i.sent,c&&f.destroy(),i.next=25;break;case 18:if(i.prev=18,i.t0=i.catch(8),!c){i.next=24;break}return f.destroy(),i.next=24,d.default.awrap(this._deleteFileSafe(n));case 24:throw i.t0;case 25:return i.abrupt("return",{res:m.res,content:m.data});case 26:case"end":return i.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,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getACL=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,D.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("GET",E,l),s.successStatuses=[200],s.xmlResponse=!0,f.next=8,d.default.awrap(this.request(s));case 8:return n=f.sent,f.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 f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=C(P),T=j("babel-runtime/regenerator"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(_){return _&&_.__esModule?_:{default:_}}var E=L,l=j("../utils/isObject"),s=l.isObject,n=j("../utils/isArray"),h=n.isArray;E.getBucketVersions=f,E.listObjectVersions=f;function f(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,t,S,x,o;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(_.versionIdMarker&&_.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return y.subres=(0,p.default)({versions:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),i=this._objectRequestParams("GET","",y),i.xmlResponse=!0,i.successStatuses=[200],i.query=m(_),O.next=10,D.default.awrap(this.request(i));case 10:return a=O.sent,t=a.data.Version||[],S=a.data.DeleteMarker||[],x=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(b){return{name:b.Key,url:x._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),S&&(h(S)||(S=[S]),S=S.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),o=a.data.CommonPrefixes||null,o&&(h(o)||(o=[o]),o=o.map(function(b){return b.Prefix})),O.abrupt("return",{res:a.res,objects:t,deleteMarker:S,prefixes:o,nextMarker:a.data.NextMarker||null,NextVersionIdMarker:a.data.NextVersionIdMarker||null,isTruncated:a.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function c(_){return _.replace(/([A-Z])/g,"-$1").toLowerCase()}function m(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y={};return s(_)&&(0,d.default)(_).forEach(function(i){y[c(i)]=_[i]}),y}},{"../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,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getObjectMeta=function(E,l){var s,n;return d.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l=l||{},E=this._objectName(E),l.subres=(0,D.default)({objectMeta:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),s=this._objectRequestParams("HEAD",E,l),s.successStatuses=[200],f.next=8,d.default.awrap(this.request(s));case 8:return n=f.sent,f.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(l){return l&&l.__esModule?l:{default:l}}var p=L,C=j("../utils/isObject"),E=C.isObject;p.getObjectTagging=function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,f,c,m,_;return d.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return n.subres=(0,D.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),s=this._objectName(s),h=this._objectRequestParams("GET",s,n),h.successStatuses=[200],i.next=7,d.default.awrap(this.request(h));case 7:return f=i.sent,i.next=10,d.default.awrap(this.parseXML(f.data));case 10:return c=i.sent,m=c.TagSet.Tag,m=m&&E(m)?[m]:m||[],_={},m.forEach(function(a){_[a.Key]=a.Value}),i.abrupt("return",{status:f.status,res:f.res,tag:_});case 16:case"end":return i.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.getSymlink=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l.subres=(0,D.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),s=this._objectRequestParams("GET",E,l),s.successStatuses=[200],c.next=7,d.default.awrap(this.request(s));case 7:return n=c.sent,h=n.res.headers["x-oss-symlink-target"],c.abrupt("return",{targetName:decodeURIComponent(h),res:n.res});case 10:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(l){return l&&l.__esModule?l:{default:l}}var E=L;E.head=function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,f,c;return d.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return n.subres=(0,p.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),h=this._objectRequestParams("HEAD",s,n),h.successStatuses=[200,304],_.next=6,d.default.awrap(this.request(h));case 6:return f=_.sent,c={meta:null,res:f.res,status:f.status},f.status===200&&(0,D.default)(f.headers).forEach(function(y){y.indexOf("x-oss-meta-")===0&&(c.meta||(c.meta={}),c.meta[y.substring(11)]=f.headers[y])}),_.abrupt("return",c);case 10:case"end":return _.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.putACL=function(E,l,s){var n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return s=s||{},s.subres=(0,D.default)({acl:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.headers=s.headers||{},s.headers["x-oss-object-acl"]=l,E=this._objectName(E),n=this._objectRequestParams("PUT",E,s),n.successStatuses=[200],c.next=10,d.default.awrap(this.request(n));case 10:return h=c.sent,c.abrupt("return",{res:h.res});case 12:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=C(P),T=j("babel-runtime/core-js/object/keys"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(f){return f&&f.__esModule?f:{default:f}}var E=j("../utils/obj2xml"),l=E.obj2xml,s=j("../utils/checkObjectTag"),n=s.checkObjectTag,h=L;h.putObjectTagging=function(c,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return n(m),_.subres=(0,p.default)({tagging:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),c=this._objectName(c),y=this._objectRequestParams("PUT",c,_),y.successStatuses=[200],m=(0,D.default)(m).map(function(x){return{Key:x,Value:m[x]}}),i={Tagging:{TagSet:{Tag:m}}},y.mime="xml",y.content=l(i),S.next=12,d.default.awrap(this.request(y));case 12:return a=S.sent,S.abrupt("return",{res:a.res,status:a.status});case 14:case"end":return S.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/object/assign"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p.putSymlink=function(E,l,s){var n,h;return d.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return s=s||{},s.headers=s.headers||{},l=this._escape(this._objectName(l)),this._convertMetaToHeaders(s.meta,s.headers),s.headers["x-oss-symlink-target"]=l,s.subres=(0,D.default)({symlink:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.storageClass&&(s.headers["x-oss-storage-class"]=s.storageClass),E=this._objectName(E),n=this._objectRequestParams("PUT",E,s),n.successStatuses=[200],c.next=13,d.default.awrap(this.request(n));case 13:return h=c.sent,c.abrupt("return",{res:h.res});case 15:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Z,L){"use strict";var P=j("babel-runtime/regenerator"),d=u(P),T=j("babel-runtime/core-js/promise"),D=u(T);function u(C){return C&&C.__esModule?C:{default:C}}var p=L;p._parallelNode=function(E,l,s,n){var h,f,c,m,_,y,i,a;return d.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:h=this,f=[],c=[],m=E.length/l,_=E.length%l,y=_===0?m:(E.length-_)/l+1,i=1,a=0;case 8:if(!(a<E.length)){S.next=26;break}if(!h.isCancel()){S.next=11;break}return S.abrupt("break",26);case 11:if(n?c.push(s(h,E[a],n)):c.push(s(h,E[a])),!(c.length===l||i===y&&a===E.length-1)){S.next=23;break}return S.prev=13,i+=1,S.next=17,d.default.awrap(D.default.all(c));case 17:S.next=22;break;case 19:S.prev=19,S.t0=S.catch(13),f.push(S.t0);case 22:c=[];case 23:a++,S.next=8;break;case 26:return S.abrupt("return",f);case 27:case"end":return S.stop()}},null,this,[[13,19]])},p._parallel=function(E,l,s){var n=this;return new D.default(function(h){var f=[];if(l<=0||!E){h(f);return}function c(o){return function(){if(o===null)throw new Error("Callback was already called.");var k=o;o=null;for(var O=arguments.length,b=Array(O),v=0;v<O;v++)b[v]=arguments[v];k.apply(this,b)}}function m(o){var k=-1,O=o.length;return function(){return++k<O&&!n.isCancel()?{value:o[k],key:k}:null}}var _=m(E),y=!1,i=0,a=!1;function t(o,k){i-=1,o?(y=!0,f.push(o),h(f)):k==={}||y&&i<=0?(y=!0,h(f)):a||(n.isCancel()?h(f):x())}function S(o,k){s(o).then(function(O){k(null,O)}).catch(function(O){k(O)})}function x(){for(a=!0;i<l&&!y&&!n.isCancel();){var o=_();if(o===null||f.length>0){y=!0,i<=0&&h(f);return}i+=1,S(o.value,c(t))}a=!1}x()})},p.cancel=function(E){this.options.cancelFlag=!0,E&&this.abortMultipartUpload(E.name,E.uploadId,E.options)},p.isCancel=function(){return this.options.cancelFlag},p.resetCancelFlag=function(){this.options.cancelFlag=!1},p._stop=function(){this.options.cancelFlag=!0},p._makeCancelEvent=function(){var E={status:0,name:"cancel"};return E}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/json/stringify"),T=p(d),D=j("babel-runtime/core-js/object/keys"),u=p(D);function p(l){return l&&l.__esModule?l:{default:l}}var C=j("./../../shims/crypto/crypto.js"),E=j("is-type-of");L.buildCanonicalizedResource=function(s,n){var h=""+s,f="?";if(E.string(n)&&n.trim()!=="")h+=f+n;else if(E.array(n))n.sort(),h+=f+n.join("&");else if(n){var c=function(y,i){return y[0]>i[0]?1:y[0]<i[0]?-1:0},m=function(y){h+=f+y,n[y]&&(h+="="+n[y]),f="&"};(0,u.default)(n).sort(c).forEach(m)}return h},L.buildCanonicalString=function(s,n,h,f){h=h||{};var c=h.headers||{},m="x-oss-",_=[],y={},i=[s.toUpperCase(),c["Content-Md5"]||"",c["Content-Type"]||c["Content-Type".toLowerCase()],f||c["x-oss-date"]];return(0,u.default)(c).forEach(function(a){var t=a.toLowerCase();t.indexOf(m)===0&&(y[t]=String(c[a]).trim())}),(0,u.default)(y).sort().forEach(function(a){_.push(a+":"+y[a])}),i=i.concat(_),i.push(this.buildCanonicalizedResource(n,h.parameters)),i.join(`
`)},L.computeSignature=function(s,n){var h=C.createHmac("sha1",s);return h.update(P.from(n,"utf8")).digest("base64")},L.authorization=function(s,n,h){return"OSS "+s+":"+this.computeSignature(n,h)},L._signatureForURL=function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],f=arguments[3],c={},m=n.subResource,_=m===void 0?{}:m;if(n.process){var y="x-oss-process";_[y]=n.process}if(n.trafficLimit){var i="x-oss-traffic-limit";_[i]=n.trafficLimit}if(n.response&&(0,u.default)(n.response).forEach(function(x){var o="response-"+x.toLowerCase();_[o]=n.response[x]}),(0,u.default)(n).forEach(function(x){var o=x.toLowerCase(),k=n[x];o.indexOf("x-oss-")===0?c[o]=k:(o.indexOf("content-md5")===0||o.indexOf("content-type")===0)&&(c[x]=k)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(_["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var a={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(a.callbackHost=n.callback.host),n.callback.contentType&&(a.callbackBodyType=n.callback.contentType),_.callback=P.from((0,T.default)(a)).toString("base64"),n.callback.customValue){var t={};(0,u.default)(n.callback.customValue).forEach(function(x){t["x:"+x]=n.callback.customValue[x]}),_["callback-var"]=P.from((0,T.default)(t)).toString("base64")}}var S=this.buildCanonicalString(n.method,h,{headers:c,parameters:_},f.toString());return{Signature:this.computeSignature(s,S),subResource:_}}}).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,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkBucketName=void 0,L.checkBucketName=function(P,d){var T=d?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/entries"),d=T(P);function T(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(L,"__esModule",{value:!0}),L.checkObjectTag=void 0;var D=j("./checkValid"),u=D.checkValid,p=j("./isObject"),C=p.isObject,E=[{validator:function(h){if(typeof h!="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 (/)"}],l={key:[].concat(E,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(E,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function s(n){if(!C(n))throw new Error("tag must be Object");var h=(0,d.default)(n);if(h.length>10)throw new Error("maximum of 10 tags for a object");var f=["key","value"];h.forEach(function(c){c.forEach(function(m,_){u(m,l[f[_]])})})}L.checkObjectTag=s},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkValid=void 0;function P(d,T){T.forEach(function(D){if(D.validator)D.validator(d);else if(D.pattern&&!D.pattern.test(d))throw new Error(D.msg)})}L.checkValid=P},{}],38:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/object/assign"),T=D(d);function D(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(L,"__esModule",{value:!0}),L.createRequest=void 0;var u=j("./../../../shims/crypto/crypto.js"),p=j("debug")("ali-oss"),C=j("mime"),E=j("dateformat"),l=j("copy-to"),s=j("path");function n(c,m){return c[m]||c[m.toLowerCase()]}function h(c,m){delete c[m],delete c[m.toLowerCase()]}function f(c){var m=new Date;this.options.amendTimeSkewed&&(m=+new Date+this.options.amendTimeSkewed);var _={"x-oss-date":E(m,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(_["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(_,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_["x-oss-security-token"]=this.options.stsToken),l(c.headers).to(_),n(_,"Content-Type")||(c.mime&&c.mime.indexOf("/")>0?_["Content-Type"]=c.mime:_["Content-Type"]=C.getType(c.mime||s.extname(c.object||""))),n(_,"Content-Type")||h(_,"Content-Type"),c.content&&(_["Content-Md5"]=u.createHash("md5").update(P.from(c.content,"utf8")).digest("base64"),_["Content-Length"]||(_["Content-Length"]=c.content.length));var y=this._getResource(c);_.authorization=this.authorization(c.method,y,c.subres,_);var i=this._getReqUrl(c);p("request %s %s, with headers %j, !!stream: %s",c.method,i,_,!!c.stream);var a=c.timeout||this.options.timeout,t={method:c.method,content:c.content,stream:c.stream,headers:_,timeout:a,writeStream:c.writeStream,customResponse:c.customResponse,ctx:c.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:i,params:t}}L.createRequest=f}).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,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/helpers/typeof"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(L,"__esModule",{value:!0}),L.deepCopy=void 0,L.deepCopy=function(p){if(p===null||(typeof p=="undefined"?"undefined":(0,D.default)(p))!=="object")return p;var C=Array.isArray(p)?[]:{};return(0,d.default)(p).forEach(function(E){C[E]=L.deepCopy(p[E])}),C}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/helpers/typeof"),D=u(T);function u(E){return E&&E.__esModule?E:{default:E}}Object.defineProperty(L,"__esModule",{value:!0}),L.formatObjKey=void 0;function p(E,l){if(E===null||(typeof E=="undefined"?"undefined":(0,D.default)(E))!=="object")return E;var s=void 0;if(Array.isArray(E)){s=[];for(var n=0;n<E.length;n++)s.push(p(E[n],l))}else s={},(0,d.default)(E).forEach(function(h){s[C(h,l)]=p(E[h],l)});return s}L.formatObjKey=p;function C(E,l){return l==="firstUpperCase"?E=E.replace(/^./,function(s){return s.toUpperCase()}):l==="firstLowerCase"&&(E=E.replace(/^./,function(s){return s.toLowerCase()})),E}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.getStrBytesCount=void 0;function P(d){for(var T=0,D=0;D<d.length;D++){var u=d.charAt(D);/^[\u00-\uff]$/.test(u)?T+=1:T+=2}return T}L.getStrBytesCount=P},{}],42:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isArray=void 0,L.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isBlob=void 0;function P(d){return typeof Blob!="undefined"&&d instanceof Blob}L.isBlob=P},{}],44:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isFile=void 0,L.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isIP=void 0,L.isIP=function(P){var d=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\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 d.test(P)||T.test(P)}},{}],46:[function(j,Z,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isObject=void 0,L.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=T(P);function T(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(L,"__esModule",{value:!0}),L.obj2xml=void 0;var D=j("./formatObjKey");function u(C){return Object.prototype.toString.call(C).replace(/(.*? |])/g,"").toLowerCase()}function p(C,E){var l="";return E&&E.headers&&(l=`<?xml version="1.0" encoding="UTF-8"?>
`),E&&E.firstUpperCase&&(C=D.formatObjKey(C,"firstUpperCase")),u(C)==="object"?(0,d.default)(C).forEach(function(s){u(C[s])==="string"||u(C[s])==="number"?l+="<"+s+">"+C[s]+"</"+s+">":u(C[s])==="object"?l+="<"+s+">"+p(C[s])+"</"+s+">":u(C[s])==="array"?l+=C[s].map(function(n){return"<"+s+">"+p(n)+"</"+s+">"}).join(""):l+="<"+s+">"+C[s].toString()+"</"+s+">"}):l+=C.toString(),l}L.obj2xml=p},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Z,L){Z.exports=P,Z.exports.HttpsAgent=P;function P(){}},{}],49:[function(j,Z,L){Z.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Z,L){"use strict";var P="@@any-promise/REGISTRATION",d=null;Z.exports=function(T,D){return function(p,C){p=p||null,C=C||{};var E=C.global!==!1;if(d===null&&E&&(d=T[P]||null),d!==null&&p!==null&&d.implementation!==p)throw new Error('any-promise already defined as "'+d.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return d===null&&(p!==null&&typeof C.Promise!="undefined"?d={Promise:C.Promise,implementation:p}:d=D(p),E&&(T[P]=d)),d}}},{}],51:[function(j,Z,L){"use strict";Z.exports=j("./loader")(window,P);function P(){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,Z,L){Z.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Z,L){Z.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,Z,L){Z.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,Z,L){Z.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Z,L){Z.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,Z,L){Z.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Z,L){Z.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Z,L){"use strict";L.__esModule=!0;var P=j("../core-js/symbol/iterator"),d=p(P),T=j("../core-js/symbol"),D=p(T),u=typeof D.default=="function"&&typeof d.default=="symbol"?function(C){return typeof C}:function(C){return C&&typeof D.default=="function"&&C.constructor===D.default&&C!==D.default.prototype?"symbol":typeof C};function p(C){return C&&C.__esModule?C:{default:C}}L.default=typeof D.default=="function"&&u(d.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":u(C)}:function(C){return C&&typeof D.default=="function"&&C.constructor===D.default&&C!==D.default.prototype?"symbol":typeof C=="undefined"?"undefined":u(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Z,L){Z.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Z,L){"use strict";L.byteLength=E,L.toByteArray=s,L.fromByteArray=f;for(var P=[],d=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,p=D.length;u<p;++u)P[u]=D[u],d[D.charCodeAt(u)]=u;d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63;function C(c){var m=c.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=c.indexOf("=");_===-1&&(_=m);var y=_===m?0:4-_%4;return[_,y]}function E(c){var m=C(c),_=m[0],y=m[1];return(_+y)*3/4-y}function l(c,m,_){return(m+_)*3/4-_}function s(c){var m,_=C(c),y=_[0],i=_[1],a=new T(l(c,y,i)),t=0,S=i>0?y-4:y,x;for(x=0;x<S;x+=4)m=d[c.charCodeAt(x)]<<18|d[c.charCodeAt(x+1)]<<12|d[c.charCodeAt(x+2)]<<6|d[c.charCodeAt(x+3)],a[t++]=m>>16&255,a[t++]=m>>8&255,a[t++]=m&255;return i===2&&(m=d[c.charCodeAt(x)]<<2|d[c.charCodeAt(x+1)]>>4,a[t++]=m&255),i===1&&(m=d[c.charCodeAt(x)]<<10|d[c.charCodeAt(x+1)]<<4|d[c.charCodeAt(x+2)]>>2,a[t++]=m>>8&255,a[t++]=m&255),a}function n(c){return P[c>>18&63]+P[c>>12&63]+P[c>>6&63]+P[c&63]}function h(c,m,_){for(var y,i=[],a=m;a<_;a+=3)y=(c[a]<<16&16711680)+(c[a+1]<<8&65280)+(c[a+2]&255),i.push(n(y));return i.join("")}function f(c){for(var m,_=c.length,y=_%3,i=[],a=16383,t=0,S=_-y;t<S;t+=a)i.push(h(c,t,t+a>S?S:t+a));return y===1?(m=c[_-1],i.push(P[m>>2]+P[m<<4&63]+"==")):y===2&&(m=(c[_-2]<<8)+c[_-1],i.push(P[m>>10]+P[m>>4&63]+P[m<<2&63]+"=")),i.join("")}},{}],70:[function(j,Z,L){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(P,d,T){typeof Z!="undefined"&&Z.exports?Z.exports=T():typeof define=="function"&&define.amd?define(d,T):P[d]=T()}(this,"bowser",function(){var P=!0;function d(l){function s(K){var U=l.match(K);return U&&U.length>1&&U[1]||""}function n(K){var U=l.match(K);return U&&U.length>1&&U[2]||""}var h=s(/(ipod|iphone|ipad)/i).toLowerCase(),f=/like android/i.test(l),c=!f&&/android/i.test(l),m=/nexus\s*[0-6]\s*/i.test(l),_=!m&&/nexus\s*[0-9]+/i.test(l),y=/CrOS/.test(l),i=/silk/i.test(l),a=/sailfish/i.test(l),t=/tizen/i.test(l),S=/(web|hpw)(o|0)s/i.test(l),x=/windows phone/i.test(l),o=/SamsungBrowser/i.test(l),k=!x&&/windows/i.test(l),O=!h&&!i&&/macintosh/i.test(l),b=!c&&!a&&!t&&!S&&/linux/i.test(l),v=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),g=s(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(l)&&!/tablet pc/i.test(l),M=!w&&/[^-]mobi/i.test(l),N=/xbox/i.test(l),I;/opera/i.test(l)?I={name:"Opera",opera:P,version:g||s(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(l)?I={name:"Opera",opera:P,version:s(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||g}:/SamsungBrowser/i.test(l)?I={name:"Samsung Internet for Android",samsungBrowser:P,version:g||s(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(l)?I={name:"NAVER Whale browser",whale:P,version:s(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(l)?I={name:"MZ Browser",mzbrowser:P,version:s(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(l)?I={name:"Opera Coast",coast:P,version:g||s(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(l)?I={name:"Focus",focus:P,version:s(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(l)?I={name:"Yandex Browser",yandexbrowser:P,version:g||s(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(l)?I={name:"UC Browser",ucbrowser:P,version:s(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(l)?I={name:"Maxthon",maxthon:P,version:s(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(l)?I={name:"Epiphany",epiphany:P,version:s(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(l)?I={name:"Puffin",puffin:P,version:s(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(l)?I={name:"Sleipnir",sleipnir:P,version:s(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(l)?I={name:"K-Meleon",kMeleon:P,version:s(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(I={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},v?(I.msedge=P,I.version=v):(I.msie=P,I.version=s(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(l)?I={name:"Internet Explorer",msie:P,version:s(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:y?I={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:s(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(l)?I={name:"Microsoft Edge",msedge:P,version:v}:/vivaldi/i.test(l)?I={name:"Vivaldi",vivaldi:P,version:s(/vivaldi\/(\d+(\.\d+)?)/i)||g}:a?I={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:s(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(l)?I={name:"SeaMonkey",seamonkey:P,version:s(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(l)?(I={name:"Firefox",firefox:P,version:s(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(l)&&(I.firefoxos=P,I.osname="Firefox OS")):i?I={name:"Amazon Silk",silk:P,version:s(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(l)?I={name:"PhantomJS",phantom:P,version:s(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(l)?I={name:"SlimerJS",slimer:P,version:s(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(l)||/rim\stablet/i.test(l)?I={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:g||s(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(I={name:"WebOS",osname:"WebOS",webos:P,version:g||s(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(l)&&(I.touchpad=P)):/bada/i.test(l)?I={name:"Bada",osname:"Bada",bada:P,version:s(/dolfin\/(\d+(\.\d+)?)/i)}:t?I={name:"Tizen",osname:"Tizen",tizen:P,version:s(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||g}:/qupzilla/i.test(l)?I={name:"QupZilla",qupzilla:P,version:s(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||g}:/chromium/i.test(l)?I={name:"Chromium",chromium:P,version:s(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||g}:/chrome|crios|crmo/i.test(l)?I={name:"Chrome",chrome:P,version:s(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?I={name:"Android",version:g}:/safari|applewebkit/i.test(l)?(I={name:"Safari",safari:P},g&&(I.version=g)):h?(I={name:h=="iphone"?"iPhone":h=="ipad"?"iPad":"iPod"},g&&(I.version=g)):/googlebot/i.test(l)?I={name:"Googlebot",googlebot:P,version:s(/googlebot\/(\d+(\.\d+))/i)||g}:I={name:s(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!I.msedge&&/(apple)?webkit/i.test(l)?(/(apple)?webkit\/537\.36/i.test(l)?(I.name=I.name||"Blink",I.blink=P):(I.name=I.name||"Webkit",I.webkit=P),!I.version&&g&&(I.version=g)):!I.opera&&/gecko\//i.test(l)&&(I.name=I.name||"Gecko",I.gecko=P,I.version=I.version||s(/gecko\/(\d+(\.\d+)?)/i)),!I.windowsphone&&(c||I.silk)?(I.android=P,I.osname="Android"):!I.windowsphone&&h?(I[h]=P,I.ios=P,I.osname="iOS"):O?(I.mac=P,I.osname="macOS"):N?(I.xbox=P,I.osname="Xbox"):k?(I.windows=P,I.osname="Windows"):b&&(I.linux=P,I.osname="Linux");function G(K){switch(K){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var z="";I.windows?z=G(s(/Windows ((NT|XP)( \d\d?.\d)?)/i)):I.windowsphone?z=s(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):I.mac?(z=s(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):h?(z=s(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):c?z=s(/android[ \/-](\d+(\.\d+)*)/i):I.webos?z=s(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):I.blackberry?z=s(/rim\stablet\sos\s(\d+(\.\d+)*)/i):I.bada?z=s(/bada\/(\d+(\.\d+)*)/i):I.tizen&&(z=s(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(I.osversion=z);var H=!I.windows&&z.split(".")[0];return w||_||h=="ipad"||c&&(H==3||H>=4&&!M)||I.silk?I.tablet=P:(M||h=="iphone"||h=="ipod"||c||m||I.blackberry||I.webos||I.bada)&&(I.mobile=P),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&&p([I.version,"1.0"])===1||I.mzbrowser&&p([I.version,"6.0"])===1||I.focus&&p([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=P: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=P:I.x=P,I}var T=d(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(l){for(var s=0;s<l.length;++s){var n=l[s];if(typeof n=="string"&&n in T)return!0}return!1};function D(l){return l.split(".").length}function u(l,s){var n=[],h;if(Array.prototype.map)return Array.prototype.map.call(l,s);for(h=0;h<l.length;h++)n.push(s(l[h]));return n}function p(l){for(var s=Math.max(D(l[0]),D(l[1])),n=u(l,function(h){var f=s-D(h);return h=h+new Array(f+1).join(".0"),u(h.split("."),function(c){return new Array(20-c.length).join("0")+c}).reverse()});--s>=0;){if(n[0][s]>n[1][s])return 1;if(n[0][s]===n[1][s]){if(s===0)return 0}else return-1}}function C(l,s,n){var h=T;typeof s=="string"&&(n=s,s=void 0),s===void 0&&(s=!1),n&&(h=d(n));var f=""+h.version;for(var c in l)if(l.hasOwnProperty(c)&&h[c]){if(typeof l[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(l));return p([f,l[c]])<0}return s}function E(l,s,n){return!C(l,s,n)}return T.isUnsupportedBrowser=C,T.compareVersions=p,T.check=E,T._detect=d,T.detect=d,T})},{}],71:[function(j,Z,L){},{}],72:[function(j,Z,L){var P=j("buffer").Buffer,d=P.isEncoding||function(E){switch(E&&E.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 T(E){if(E&&!d(E))throw new Error("Unknown encoding: "+E)}var D=L.StringDecoder=function(E){this.encoding=(E||"utf8").toLowerCase().replace(/[-_]/,""),T(E);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=p;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=C;break;default:this.write=u;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};D.prototype.write=function(E){for(var l="";this.charLength;){var s=E.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:E.length;if(E.copy(this.charBuffer,this.charReceived,0,s),this.charReceived+=s,this.charReceived<this.charLength)return"";E=E.slice(s,E.length),l=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var h=l.charCodeAt(l.length-1);if(h>=55296&&h<=56319){this.charLength+=this.surrogateSize,l="";continue}if(this.charReceived=this.charLength=0,E.length===0)return l;break}this.detectIncompleteChar(E);var n=E.length;this.charLength&&(E.copy(this.charBuffer,0,E.length-this.charReceived,n),n-=this.charReceived),l+=E.toString(this.encoding,0,n);var n=l.length-1,h=l.charCodeAt(n);if(h>=55296&&h<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),E.copy(this.charBuffer,0,0,f),l.substring(0,n)}return l},D.prototype.detectIncompleteChar=function(E){for(var l=E.length>=3?3:E.length;l>0;l--){var s=E[E.length-l];if(l==1&&s>>5==6){this.charLength=2;break}if(l<=2&&s>>4==14){this.charLength=3;break}if(l<=3&&s>>3==30){this.charLength=4;break}}this.charReceived=l},D.prototype.end=function(E){var l="";if(E&&E.length&&(l=this.write(E)),this.charReceived){var s=this.charReceived,n=this.charBuffer,h=this.encoding;l+=n.slice(0,s).toString(h)}return l};function u(E){return E.toString(this.encoding)}function p(E){this.charReceived=E.length%2,this.charLength=this.charReceived?2:0}function C(E){this.charReceived=E.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,Z,L){(function(P,d){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var T=j("base64-js"),D=j("ieee754"),u=j("isarray");L.Buffer=d,L.SlowBuffer=i,L.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:p(),L.kMaxLength=C();function p(){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 C(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function E(te,J){if(C()<J)throw new RangeError("Invalid typed array length");return d.TYPED_ARRAY_SUPPORT?(te=new Uint8Array(J),te.__proto__=d.prototype):(te===null&&(te=new d(J)),te.length=J),te}function d(te,J,X){if(!d.TYPED_ARRAY_SUPPORT&&!(this instanceof d))return new d(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 h(this,te)}return l(this,te,J,X)}d.poolSize=8192,d._augment=function(te){return te.__proto__=d.prototype,te};function l(te,J,X,Q){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?m(te,J,X,Q):typeof J=="string"?f(te,J,X):_(te,J)}d.from=function(te,J,X){return l(null,te,J,X)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0}));function s(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,Q){return s(J),J<=0?E(te,J):X!==void 0?typeof Q=="string"?E(te,J).fill(X,Q):E(te,J).fill(X):E(te,J)}d.alloc=function(te,J,X){return n(null,te,J,X)};function h(te,J){if(s(J),te=E(te,J<0?0:y(J)|0),!d.TYPED_ARRAY_SUPPORT)for(var X=0;X<J;++X)te[X]=0;return te}d.allocUnsafe=function(te){return h(null,te)},d.allocUnsafeSlow=function(te){return h(null,te)};function f(te,J,X){if((typeof X!="string"||X==="")&&(X="utf8"),!d.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Q=a(J,X)|0;te=E(te,Q);var Ee=te.write(J,X);return Ee!==Q&&(te=te.slice(0,Ee)),te}function c(te,J){var X=J.length<0?0:y(J.length)|0;te=E(te,X);for(var Q=0;Q<X;Q+=1)te[Q]=J[Q]&255;return te}function m(te,J,X,Q){if(J.byteLength,X<0||J.byteLength<X)throw new RangeError("'offset' is out of bounds");if(J.byteLength<X+(Q||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Q===void 0?J=new Uint8Array(J):Q===void 0?J=new Uint8Array(J,X):J=new Uint8Array(J,X,Q),d.TYPED_ARRAY_SUPPORT?(te=J,te.__proto__=d.prototype):te=c(te,J),te}function _(te,J){if(d.isBuffer(J)){var X=y(J.length)|0;return te=E(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"||Ce(J.length)?E(te,0):c(te,J);if(J.type==="Buffer"&&u(J.data))return c(te,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(te){if(te>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return te|0}function i(te){return+te!=te&&(te=0),d.alloc(+te)}d.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},d.compare=function(J,X){if(!d.isBuffer(J)||!d.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,Ee=X.length,ge=0,Oe=Math.min(Q,Ee);ge<Oe;++ge)if(J[ge]!==X[ge]){Q=J[ge],Ee=X[ge];break}return Q<Ee?-1:Ee<Q?1:0},d.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}},d.concat=function(J,X){if(!u(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return d.alloc(0);var Q;if(X===void 0)for(X=0,Q=0;Q<J.length;++Q)X+=J[Q].length;var Ee=d.allocUnsafe(X),ge=0;for(Q=0;Q<J.length;++Q){var Oe=J[Q];if(!d.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(Ee,ge),ge+=Oe.length}return Ee};function a(te,J){if(d.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 Q=!1;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return le(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(Q)return le(te).length;J=(""+J).toLowerCase(),Q=!0}}d.byteLength=a;function t(te,J,X){var Q=!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 K(this,J,X);case"utf8":case"utf-8":return N(this,J,X);case"ascii":return z(this,J,X);case"latin1":case"binary":return H(this,J,X);case"base64":return M(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,J,X);default:if(Q)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),Q=!0}}d.prototype._isBuffer=!0;function S(te,J,X){var Q=te[J];te[J]=te[X],te[X]=Q}d.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)S(this,X,X+1);return this},d.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)S(this,X,X+3),S(this,X+1,X+2);return this},d.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)S(this,X,X+7),S(this,X+1,X+6),S(this,X+2,X+5),S(this,X+3,X+4);return this},d.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?N(this,0,J):t.apply(this,arguments)},d.prototype.equals=function(J){if(!d.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:d.compare(this,J)===0},d.prototype.inspect=function(){var J="",X=L.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),"<Buffer "+J+">"},d.prototype.compare=function(J,X,Q,Ee,ge){if(!d.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),Ee===void 0&&(Ee=0),ge===void 0&&(ge=this.length),X<0||Q>J.length||Ee<0||ge>this.length)throw new RangeError("out of range index");if(Ee>=ge&&X>=Q)return 0;if(Ee>=ge)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,Ee>>>=0,ge>>>=0,this===J)return 0;for(var Oe=ge-Ee,Qe=Q-X,rt=Math.min(Oe,Qe),nt=this.slice(Ee,ge),ut=J.slice(X,Q),dt=0;dt<rt;++dt)if(nt[dt]!==ut[dt]){Oe=nt[dt],Qe=ut[dt];break}return Oe<Qe?-1:Qe<Oe?1:0};function x(te,J,X,Q,Ee){if(te.length===0)return-1;if(typeof X=="string"?(Q=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=Ee?0:te.length-1),X<0&&(X=te.length+X),X>=te.length){if(Ee)return-1;X=te.length-1}else if(X<0)if(Ee)X=0;else return-1;if(typeof J=="string"&&(J=d.from(J,Q)),d.isBuffer(J))return J.length===0?-1:o(te,J,X,Q,Ee);if(typeof J=="number")return J=J&255,d.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(te,J,X):Uint8Array.prototype.lastIndexOf.call(te,J,X):o(te,[J],X,Q,Ee);throw new TypeError("val must be string, number or Buffer")}function o(te,J,X,Q,Ee){var ge=1,Oe=te.length,Qe=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(te.length<2||J.length<2)return-1;ge=2,Oe/=2,Qe/=2,X/=2}function rt(He,De){return ge===1?He[De]:He.readUInt16BE(De*ge)}var nt;if(Ee){var ut=-1;for(nt=X;nt<Oe;nt++)if(rt(te,nt)===rt(J,ut===-1?0:nt-ut)){if(ut===-1&&(ut=nt),nt-ut+1===Qe)return ut*ge}else ut!==-1&&(nt-=nt-ut),ut=-1}else for(X+Qe>Oe&&(X=Oe-Qe),nt=X;nt>=0;nt--){for(var dt=!0,mt=0;mt<Qe;mt++)if(rt(te,nt+mt)!==rt(J,mt)){dt=!1;break}if(dt)return nt}return-1}d.prototype.includes=function(J,X,Q){return this.indexOf(J,X,Q)!==-1},d.prototype.indexOf=function(J,X,Q){return x(this,J,X,Q,!0)},d.prototype.lastIndexOf=function(J,X,Q){return x(this,J,X,Q,!1)};function k(te,J,X,Q){X=Number(X)||0;var Ee=te.length-X;Q?(Q=Number(Q),Q>Ee&&(Q=Ee)):Q=Ee;var ge=J.length;if(ge%2!==0)throw new TypeError("Invalid hex string");Q>ge/2&&(Q=ge/2);for(var Oe=0;Oe<Q;++Oe){var Qe=parseInt(J.substr(Oe*2,2),16);if(isNaN(Qe))return Oe;te[X+Oe]=Qe}return Oe}function O(te,J,X,Q){return ee(le(J,te.length-X),te,X,Q)}function b(te,J,X,Q){return ee(re(J),te,X,Q)}function v(te,J,X,Q){return b(te,J,X,Q)}function g(te,J,X,Q){return ee(q(J),te,X,Q)}function w(te,J,X,Q){return ee(fe(J,te.length-X),te,X,Q)}d.prototype.write=function(J,X,Q,Ee){if(X===void 0)Ee="utf8",Q=this.length,X=0;else if(Q===void 0&&typeof X=="string")Ee=X,Q=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Q)?(Q=Q|0,Ee===void 0&&(Ee="utf8")):(Ee=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-X;if((Q===void 0||Q>ge)&&(Q=ge),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ee||(Ee="utf8");for(var Oe=!1;;)switch(Ee){case"hex":return k(this,J,X,Q);case"utf8":case"utf-8":return O(this,J,X,Q);case"ascii":return b(this,J,X,Q);case"latin1":case"binary":return v(this,J,X,Q);case"base64":return g(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,J,X,Q);default:if(Oe)throw new TypeError("Unknown encoding: "+Ee);Ee=(""+Ee).toLowerCase(),Oe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(te,J,X){return J===0&&X===te.length?T.fromByteArray(te):T.fromByteArray(te.slice(J,X))}function N(te,J,X){X=Math.min(te.length,X);for(var Q=[],Ee=J;Ee<X;){var ge=te[Ee],Oe=null,Qe=ge>239?4:ge>223?3:ge>191?2:1;if(Ee+Qe<=X){var rt,nt,ut,dt;switch(Qe){case 1:ge<128&&(Oe=ge);break;case 2:rt=te[Ee+1],(rt&192)===128&&(dt=(ge&31)<<6|rt&63,dt>127&&(Oe=dt));break;case 3:rt=te[Ee+1],nt=te[Ee+2],(rt&192)===128&&(nt&192)===128&&(dt=(ge&15)<<12|(rt&63)<<6|nt&63,dt>2047&&(dt<55296||dt>57343)&&(Oe=dt));break;case 4:rt=te[Ee+1],nt=te[Ee+2],ut=te[Ee+3],(rt&192)===128&&(nt&192)===128&&(ut&192)===128&&(dt=(ge&15)<<18|(rt&63)<<12|(nt&63)<<6|ut&63,dt>65535&&dt<1114112&&(Oe=dt))}}Oe===null?(Oe=65533,Qe=1):Oe>65535&&(Oe-=65536,Q.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),Q.push(Oe),Ee+=Qe}return G(Q)}var I=4096;function G(te){var J=te.length;if(J<=I)return String.fromCharCode.apply(String,te);for(var X="",Q=0;Q<J;)X+=String.fromCharCode.apply(String,te.slice(Q,Q+=I));return X}function z(te,J,X){var Q="";X=Math.min(te.length,X);for(var Ee=J;Ee<X;++Ee)Q+=String.fromCharCode(te[Ee]&127);return Q}function H(te,J,X){var Q="";X=Math.min(te.length,X);for(var Ee=J;Ee<X;++Ee)Q+=String.fromCharCode(te[Ee]);return Q}function K(te,J,X){var Q=te.length;(!J||J<0)&&(J=0),(!X||X<0||X>Q)&&(X=Q);for(var Ee="",ge=J;ge<X;++ge)Ee+=ue(te[ge]);return Ee}function U(te,J,X){for(var Q=te.slice(J,X),Ee="",ge=0;ge<Q.length;ge+=2)Ee+=String.fromCharCode(Q[ge]+Q[ge+1]*256);return Ee}d.prototype.slice=function(J,X){var Q=this.length;J=~~J,X=X===void 0?Q:~~X,J<0?(J+=Q,J<0&&(J=0)):J>Q&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),X<J&&(X=J);var Ee;if(d.TYPED_ARRAY_SUPPORT)Ee=this.subarray(J,X),Ee.__proto__=d.prototype;else{var ge=X-J;Ee=new d(ge,void 0);for(var Oe=0;Oe<ge;++Oe)Ee[Oe]=this[Oe+J]}return Ee};function B(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")}d.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=this[J],ge=1,Oe=0;++Oe<X&&(ge*=256);)Ee+=this[J+Oe]*ge;return Ee},d.prototype.readUIntBE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=this[J+--X],ge=1;X>0&&(ge*=256);)Ee+=this[J+--X]*ge;return Ee},d.prototype.readUInt8=function(J,X){return X||B(J,1,this.length),this[J]},d.prototype.readUInt16LE=function(J,X){return X||B(J,2,this.length),this[J]|this[J+1]<<8},d.prototype.readUInt16BE=function(J,X){return X||B(J,2,this.length),this[J]<<8|this[J+1]},d.prototype.readUInt32LE=function(J,X){return X||B(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},d.prototype.readUInt32BE=function(J,X){return X||B(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},d.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=this[J],ge=1,Oe=0;++Oe<X&&(ge*=256);)Ee+=this[J+Oe]*ge;return ge*=128,Ee>=ge&&(Ee-=Math.pow(2,8*X)),Ee},d.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||B(J,X,this.length);for(var Ee=X,ge=1,Oe=this[J+--Ee];Ee>0&&(ge*=256);)Oe+=this[J+--Ee]*ge;return ge*=128,Oe>=ge&&(Oe-=Math.pow(2,8*X)),Oe},d.prototype.readInt8=function(J,X){return X||B(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},d.prototype.readInt16LE=function(J,X){X||B(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt16BE=function(J,X){X||B(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},d.prototype.readInt32LE=function(J,X){return X||B(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},d.prototype.readInt32BE=function(J,X){return X||B(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},d.prototype.readFloatLE=function(J,X){return X||B(J,4,this.length),D.read(this,J,!0,23,4)},d.prototype.readFloatBE=function(J,X){return X||B(J,4,this.length),D.read(this,J,!1,23,4)},d.prototype.readDoubleLE=function(J,X){return X||B(J,8,this.length),D.read(this,J,!0,52,8)},d.prototype.readDoubleBE=function(J,X){return X||B(J,8,this.length),D.read(this,J,!1,52,8)};function V(te,J,X,Q,Ee,ge){if(!d.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>Ee||J<ge)throw new RangeError('"value" argument is out of bounds');if(X+Q>te.length)throw new RangeError("Index out of range")}d.prototype.writeUIntLE=function(J,X,Q,Ee){if(J=+J,X=X|0,Q=Q|0,!Ee){var ge=Math.pow(2,8*Q)-1;V(this,J,X,Q,ge,0)}var Oe=1,Qe=0;for(this[X]=J&255;++Qe<Q&&(Oe*=256);)this[X+Qe]=J/Oe&255;return X+Q},d.prototype.writeUIntBE=function(J,X,Q,Ee){if(J=+J,X=X|0,Q=Q|0,!Ee){var ge=Math.pow(2,8*Q)-1;V(this,J,X,Q,ge,0)}var Oe=Q-1,Qe=1;for(this[X+Oe]=J&255;--Oe>=0&&(Qe*=256);)this[X+Oe]=J/Qe&255;return X+Q},d.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,1,255,0),d.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function ae(te,J,X,Q){J<0&&(J=65535+J+1);for(var Ee=0,ge=Math.min(te.length-X,2);Ee<ge;++Ee)te[X+Ee]=(J&255<<8*(Q?Ee:1-Ee))>>>(Q?Ee:1-Ee)*8}d.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ae(this,J,X,!0),X+2},d.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ae(this,J,X,!1),X+2};function he(te,J,X,Q){J<0&&(J=4294967295+J+1);for(var Ee=0,ge=Math.min(te.length-X,4);Ee<ge;++Ee)te[X+Ee]=J>>>(Q?Ee:3-Ee)*8&255}d.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):he(this,J,X,!0),X+4},d.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):he(this,J,X,!1),X+4},d.prototype.writeIntLE=function(J,X,Q,Ee){if(J=+J,X=X|0,!Ee){var ge=Math.pow(2,8*Q-1);V(this,J,X,Q,ge-1,-ge)}var Oe=0,Qe=1,rt=0;for(this[X]=J&255;++Oe<Q&&(Qe*=256);)J<0&&rt===0&&this[X+Oe-1]!==0&&(rt=1),this[X+Oe]=(J/Qe>>0)-rt&255;return X+Q},d.prototype.writeIntBE=function(J,X,Q,Ee){if(J=+J,X=X|0,!Ee){var ge=Math.pow(2,8*Q-1);V(this,J,X,Q,ge-1,-ge)}var Oe=Q-1,Qe=1,rt=0;for(this[X+Oe]=J&255;--Oe>=0&&(Qe*=256);)J<0&&rt===0&&this[X+Oe+1]!==0&&(rt=1),this[X+Oe]=(J/Qe>>0)-rt&255;return X+Q},d.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,1,127,-128),d.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},d.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):ae(this,J,X,!0),X+2},d.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):ae(this,J,X,!1),X+2},d.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):he(this,J,X,!0),X+4},d.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||V(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),d.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):he(this,J,X,!1),X+4};function pe(te,J,X,Q,Ee,ge){if(X+Q>te.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Re(te,J,X,Q,Ee){return Ee||pe(te,J,X,4,34028234663852886e22,-34028234663852886e22),D.write(te,J,X,Q,23,4),X+4}d.prototype.writeFloatLE=function(J,X,Q){return Re(this,J,X,!0,Q)},d.prototype.writeFloatBE=function(J,X,Q){return Re(this,J,X,!1,Q)};function ke(te,J,X,Q,Ee){return Ee||pe(te,J,X,8,17976931348623157e292,-17976931348623157e292),D.write(te,J,X,Q,52,8),X+8}d.prototype.writeDoubleLE=function(J,X,Q){return ke(this,J,X,!0,Q)},d.prototype.writeDoubleBE=function(J,X,Q){return ke(this,J,X,!1,Q)},d.prototype.copy=function(J,X,Q,Ee){if(Q||(Q=0),!Ee&&Ee!==0&&(Ee=this.length),X>=J.length&&(X=J.length),X||(X=0),Ee>0&&Ee<Q&&(Ee=Q),Ee===Q)return 0;if(J.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("sourceStart out of bounds");if(Ee<0)throw new RangeError("sourceEnd out of bounds");Ee>this.length&&(Ee=this.length),J.length-X<Ee-Q&&(Ee=J.length-X+Q);var ge=Ee-Q,Oe;if(this===J&&Q<X&&X<Ee)for(Oe=ge-1;Oe>=0;--Oe)J[Oe+X]=this[Oe+Q];else if(ge<1e3||!d.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<ge;++Oe)J[Oe+X]=this[Oe+Q];else Uint8Array.prototype.set.call(J,this.subarray(Q,Q+ge),X);return ge},d.prototype.fill=function(J,X,Q,Ee){if(typeof J=="string"){if(typeof X=="string"?(Ee=X,X=0,Q=this.length):typeof Q=="string"&&(Ee=Q,Q=this.length),J.length===1){var ge=J.charCodeAt(0);ge<256&&(J=ge)}if(Ee!==void 0&&typeof Ee!="string")throw new TypeError("encoding must be a string");if(typeof Ee=="string"&&!d.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee)}else typeof J=="number"&&(J=J&255);if(X<0||this.length<X||this.length<Q)throw new RangeError("Out of range index");if(Q<=X)return this;X=X>>>0,Q=Q===void 0?this.length:Q>>>0,J||(J=0);var Oe;if(typeof J=="number")for(Oe=X;Oe<Q;++Oe)this[Oe]=J;else{var Qe=d.isBuffer(J)?J:le(new d(J,Ee).toString()),rt=Qe.length;for(Oe=0;Oe<Q-X;++Oe)this[Oe+X]=Qe[Oe%rt]}return this};var ve=/[^+\/0-9A-Za-z-_]/g;function Te(te){if(te=be(te).replace(ve,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function be(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function ue(te){return te<16?"0"+te.toString(16):te.toString(16)}function le(te,J){J=J||Infinity;for(var X,Q=te.length,Ee=null,ge=[],Oe=0;Oe<Q;++Oe){if(X=te.charCodeAt(Oe),X>55295&&X<57344){if(!Ee){if(X>56319){(J-=3)>-1&&ge.push(239,191,189);continue}else if(Oe+1===Q){(J-=3)>-1&&ge.push(239,191,189);continue}Ee=X;continue}if(X<56320){(J-=3)>-1&&ge.push(239,191,189),Ee=X;continue}X=(Ee-55296<<10|X-56320)+65536}else Ee&&((J-=3)>-1&&ge.push(239,191,189));if(Ee=null,X<128){if((J-=1)<0)break;ge.push(X)}else if(X<2048){if((J-=2)<0)break;ge.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;ge.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;ge.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ge}function re(te){for(var J=[],X=0;X<te.length;++X)J.push(te.charCodeAt(X)&255);return J}function fe(te,J){for(var X,Q,Ee,ge=[],Oe=0;Oe<te.length&&!((J-=2)<0);++Oe)X=te.charCodeAt(Oe),Q=X>>8,Ee=X%256,ge.push(Ee),ge.push(Q);return ge}function q(te){return T.toByteArray(Te(te))}function ee(te,J,X,Q){for(var Ee=0;Ee<Q&&!(Ee+X>=J.length||Ee>=te.length);++Ee)J[Ee+X]=te[Ee];return Ee}function Ce(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,Z,L){Z.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,Z,L){Z.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,Z,L){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=Array.prototype.slice;Z.exports=d;function d(D,u){if(!(this instanceof d))return new d(D,u);this.src=D,this._withAccess=u}d.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},d.prototype.pick=function(D){return Array.isArray(D)||(D=P.call(arguments)),D.length&&(this.keys=D),this},d.prototype.to=function(D){if(D=D||{},!this.src)return D;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var p=0;p<u.length;p++){if(C=u[p],D[C]!==void 0)continue;D[C]=this.src[C]}return D}for(var p=0;p<u.length;p++){var C=u[p];if(!T(D,C))continue;var E=this.src.__lookupGetter__(C),l=this.src.__lookupSetter__(C);E&&D.__defineGetter__(C,E),l&&D.__defineSetter__(C,l),!E&&!l&&(D[C]=this.src[C])}return D},d.prototype.toCover=function(D){for(var u=this.keys||Object.keys(this.src),p=0;p<u.length;p++){var C=u[p];delete D[C];var E=this.src.__lookupGetter__(C),l=this.src.__lookupSetter__(C);E&&D.__defineGetter__(C,E),l&&D.__defineSetter__(C,l),!E&&!l&&(D[C]=this.src[C])}},d.prototype.override=d.prototype.toCover,d.prototype.and=function(D){var u={};return this.to(u),this.src=D,this.to(u),this.src=u,this};function T(D,u){return D[u]===void 0&&D.__lookupGetter__(u)===void 0&&D.__lookupSetter__(u)===void 0}},{}],77:[function(j,Z,L){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),Z.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,Z,L){var P=j("../../modules/_core"),d=P.JSON||(P.JSON={stringify:JSON.stringify});Z.exports=function(D){return d.stringify.apply(d,arguments)}},{"../../modules/_core":99}],79:[function(j,Z,L){j("../../modules/es6.object.assign"),Z.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,Z,L){j("../../modules/es6.object.create");var P=j("../../modules/_core").Object;Z.exports=function(T,D){return P.create(T,D)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,Z,L){j("../../modules/es6.object.define-property");var P=j("../../modules/_core").Object;Z.exports=function(T,D,u){return P.defineProperty(T,D,u)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,Z,L){j("../../modules/es7.object.entries"),Z.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,Z,L){j("../../modules/es6.object.get-own-property-names");var P=j("../../modules/_core").Object;Z.exports=function(T){return P.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,Z,L){j("../../modules/es6.object.get-prototype-of"),Z.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,Z,L){j("../../modules/es6.object.keys"),Z.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,Z,L){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"),Z.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,Z,L){j("../modules/web.immediate"),Z.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,Z,L){j("../../modules/es6.string.from-code-point"),Z.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,Z,L){j("../../modules/es6.function.has-instance"),Z.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,Z,L){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),Z.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,Z,L){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),Z.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,Z,L){Z.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(j,Z,L){Z.exports=function(){}},{}],94:[function(j,Z,L){Z.exports=function(P,d,T,D){if(!(P instanceof d)||D!==void 0&&D in P)throw TypeError(T+": incorrect invocation!");return P}},{}],95:[function(j,Z,L){var P=j("./_is-object");Z.exports=function(d){if(!P(d))throw TypeError(d+" is not an object!");return d}},{"./_is-object":119}],96:[function(j,Z,L){var P=j("./_to-iobject"),d=j("./_to-length"),T=j("./_to-absolute-index");Z.exports=function(D){return function(u,p,C){var E=P(u),l=d(E.length),s=T(C,l),n;if(D&&p!=p){for(;l>s;)if(n=E[s++],n!=n)return!0}else for(;l>s;s++)if((D||s in E)&&E[s]===p)return D||s||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Z,L){var P=j("./_cof"),d=j("./_wks")("toStringTag"),T=P(function(){return arguments}())=="Arguments",D=function(u,p){try{return u[p]}catch(C){}};Z.exports=function(u){var p,C,E;return u===void 0?"Undefined":u===null?"Null":typeof(C=D(p=Object(u),d))=="string"?C:T?P(p):(E=P(p))=="Object"&&typeof p.callee=="function"?"Arguments":E}},{"./_cof":98,"./_wks":166}],98:[function(j,Z,L){var P={}.toString;Z.exports=function(d){return P.call(d).slice(8,-1)}},{}],99:[function(j,Z,L){var P=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(j,Z,L){"use strict";var P=j("./_object-dp"),d=j("./_property-desc");Z.exports=function(T,D,u){D in T?P.f(T,D,d(0,u)):T[D]=u}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Z,L){var P=j("./_a-function");Z.exports=function(d,T,D){if(P(d),T===void 0)return d;switch(D){case 1:return function(u){return d.call(T,u)};case 2:return function(u,p){return d.call(T,u,p)};case 3:return function(u,p,C){return d.call(T,u,p,C)}}return function(){return d.apply(T,arguments)}}},{"./_a-function":92}],102:[function(j,Z,L){Z.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(j,Z,L){Z.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Z,L){var P=j("./_is-object"),d=j("./_global").document,T=P(d)&&P(d.createElement);Z.exports=function(D){return T?d.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Z,L){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Z,L){var P=j("./_object-keys"),d=j("./_object-gops"),T=j("./_object-pie");Z.exports=function(D){var u=P(D),p=d.f;if(p)for(var C=p(D),E=T.f,l=0,s;C.length>l;)E.call(D,s=C[l++])&&u.push(s);return u}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Z,L){var P=j("./_global"),d=j("./_core"),T=j("./_ctx"),D=j("./_hide"),u=j("./_has"),p="prototype",C=function(E,l,s){var n=E&C.F,h=E&C.G,f=E&C.S,c=E&C.P,m=E&C.B,_=E&C.W,y=h?d:d[l]||(d[l]={}),i=y[p],a=h?P:f?P[l]:(P[l]||{})[p],t,S,x;h&&(s=l);for(t in s){if(S=!n&&a&&a[t]!==void 0,S&&u(y,t))continue;x=S?a[t]:s[t],y[t]=h&&typeof a[t]!="function"?s[t]:m&&S?T(x,P):_&&a[t]==x?function(o){var k=function(O,b,v){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(O);case 2:return new o(O,b)}return new o(O,b,v)}return o.apply(this,arguments)};return k[p]=o[p],k}(x):c&&typeof x=="function"?T(Function.call,x):x,c&&((y.virtual||(y.virtual={}))[t]=x,E&C.R&&i&&!i[t]&&D(i,t,x))}};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128,Z.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Z,L){Z.exports=function(P){try{return!!P()}catch(d){return!0}}},{}],109:[function(j,Z,L){var P=j("./_ctx"),d=j("./_iter-call"),T=j("./_is-array-iter"),D=j("./_an-object"),u=j("./_to-length"),p=j("./core.get-iterator-method"),C={},E={},L=Z.exports=function(l,s,n,h,f){var c=f?function(){return l}:p(l),m=P(n,h,s?2:1),_=0,y,i,a,t;if(typeof c!="function")throw TypeError(l+" is not iterable!");if(T(c)){for(y=u(l.length);y>_;_++)if(t=s?m(D(i=l[_])[0],i[1]):m(l[_]),t===C||t===E)return t}else for(a=c.call(l);!(i=a.next()).done;)if(t=d(a,m,i.value,s),t===C||t===E)return t};L.BREAK=C,L.RETURN=E},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Z,L){var P=Z.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(j,Z,L){var P={}.hasOwnProperty;Z.exports=function(d,T){return P.call(d,T)}},{}],112:[function(j,Z,L){var P=j("./_object-dp"),d=j("./_property-desc");Z.exports=j("./_descriptors")?function(T,D,u){return P.f(T,D,d(1,u))}:function(T,D,u){return T[D]=u,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Z,L){var P=j("./_global").document;Z.exports=P&&P.documentElement},{"./_global":110}],114:[function(j,Z,L){Z.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,Z,L){Z.exports=function(P,d,T){var D=T===void 0;switch(d.length){case 0:return D?P():P.call(T);case 1:return D?P(d[0]):P.call(T,d[0]);case 2:return D?P(d[0],d[1]):P.call(T,d[0],d[1]);case 3:return D?P(d[0],d[1],d[2]):P.call(T,d[0],d[1],d[2]);case 4:return D?P(d[0],d[1],d[2],d[3]):P.call(T,d[0],d[1],d[2],d[3])}return P.apply(T,d)}},{}],116:[function(j,Z,L){var P=j("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(d){return P(d)=="String"?d.split(""):Object(d)}},{"./_cof":98}],117:[function(j,Z,L){var P=j("./_iterators"),d=j("./_wks")("iterator"),T=Array.prototype;Z.exports=function(D){return D!==void 0&&(P.Array===D||T[d]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Z,L){var P=j("./_cof");Z.exports=Array.isArray||function(T){return P(T)=="Array"}},{"./_cof":98}],119:[function(j,Z,L){Z.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(j,Z,L){var P=j("./_an-object");Z.exports=function(d,T,D,u){try{return u?T(P(D)[0],D[1]):T(D)}catch(C){var p=d.return;throw p!==void 0&&P(p.call(d)),C}}},{"./_an-object":95}],121:[function(j,Z,L){"use strict";var P=j("./_object-create"),d=j("./_property-desc"),T=j("./_set-to-string-tag"),D={};j("./_hide")(D,j("./_wks")("iterator"),function(){return this}),Z.exports=function(u,p,C){u.prototype=P(D,{next:d(1,C)}),T(u,p+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Z,L){"use strict";var P=j("./_library"),d=j("./_export"),T=j("./_redefine"),D=j("./_hide"),u=j("./_iterators"),p=j("./_iter-create"),C=j("./_set-to-string-tag"),E=j("./_object-gpo"),l=j("./_wks")("iterator"),s=!([].keys&&"next"in[].keys()),n="@@iterator",h="keys",f="values",c=function(){return this};Z.exports=function(m,_,y,i,a,t,S){p(y,_,i);var x=function(z){if(!s&&z in b)return b[z];switch(z){case h:return function(){return new y(this,z)};case f:return function(){return new y(this,z)}}return function(){return new y(this,z)}},o=_+" Iterator",k=a==f,O=!1,b=m.prototype,v=b[l]||b[n]||a&&b[a],g=v||x(a),w=a?k?x("entries"):g:void 0,M=_=="Array"&&b.entries||v,N,I,G;if(M&&(G=E(M.call(new m)),G!==Object.prototype&&G.next&&(C(G,o,!0),!P&&typeof G[l]!="function"&&D(G,l,c))),k&&v&&v.name!==f&&(O=!0,g=function(){return v.call(this)}),(!P||S)&&(s||O||!b[l])&&D(b,l,g),u[_]=g,u[o]=c,a)if(N={values:k?g:x(f),keys:t?g:x(h),entries:w},S)for(I in N)I in b||T(b,I,N[I]);else d(d.P+d.F*(s||O),_,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,Z,L){var P=j("./_wks")("iterator"),d=!1;try{var T=[7][P]();T.return=function(){d=!0},Array.from(T,function(){throw 2})}catch(D){}Z.exports=function(D,u){if(!u&&!d)return!1;var p=!1;try{var C=[7],E=C[P]();E.next=function(){return{done:p=!0}},C[P]=function(){return E},D(C)}catch(l){}return p}},{"./_wks":166}],124:[function(j,Z,L){Z.exports=function(P,d){return{value:d,done:!!P}}},{}],125:[function(j,Z,L){Z.exports={}},{}],126:[function(j,Z,L){Z.exports=!0},{}],127:[function(j,Z,L){var P=j("./_uid")("meta"),d=j("./_is-object"),T=j("./_has"),D=j("./_object-dp").f,u=0,p=Object.isExtensible||function(){return!0},C=!j("./_fails")(function(){return p(Object.preventExtensions({}))}),E=function(f){D(f,P,{value:{i:"O"+ ++u,w:{}}})},l=function(f,c){if(!d(f))return typeof f=="symbol"?f:(typeof f=="string"?"S":"P")+f;if(!T(f,P)){if(!p(f))return"F";if(!c)return"E";E(f)}return f[P].i},s=function(f,c){if(!T(f,P)){if(!p(f))return!0;if(!c)return!1;E(f)}return f[P].w},n=function(f){return C&&h.NEED&&p(f)&&!T(f,P)&&E(f),f},h=Z.exports={KEY:P,NEED:!1,fastKey:l,getWeak:s,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Z,L){var P=j("./_global"),d=j("./_task").set,T=P.MutationObserver||P.WebKitMutationObserver,D=P.process,u=P.Promise,p=j("./_cof")(D)=="process";Z.exports=function(){var C,E,l,s=function(){var c,m;for(p&&(c=D.domain)&&c.exit();C;){m=C.fn,C=C.next;try{m()}catch(_){throw C?l():E=void 0,_}}E=void 0,c&&c.enter()};if(p)l=function(){D.nextTick(s)};else if(T&&!(P.navigator&&P.navigator.standalone)){var n=!0,h=document.createTextNode("");new T(s).observe(h,{characterData:!0}),l=function(){h.data=n=!n}}else if(u&&u.resolve){var f=u.resolve(void 0);l=function(){f.then(s)}}else l=function(){d.call(P,s)};return function(c){var m={fn:c,next:void 0};E&&(E.next=m),C||(C=m,l()),E=m}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Z,L){"use strict";var P=j("./_a-function");function d(T){var D,u;this.promise=new T(function(p,C){if(D!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");D=p,u=C}),this.resolve=P(D),this.reject=P(u)}Z.exports.f=function(T){return new d(T)}},{"./_a-function":92}],130:[function(j,Z,L){"use strict";var P=j("./_descriptors"),d=j("./_object-keys"),T=j("./_object-gops"),D=j("./_object-pie"),u=j("./_to-object"),p=j("./_iobject"),C=Object.assign;Z.exports=!C||j("./_fails")(function(){var E={},l={},s=Symbol(),n="abcdefghijklmnopqrst";return E[s]=7,n.split("").forEach(function(h){l[h]=h}),C({},E)[s]!=7||Object.keys(C({},l)).join("")!=n})?function(l,s){for(var n=u(l),h=arguments.length,f=1,c=T.f,m=D.f;h>f;)for(var _=p(arguments[f++]),y=c?d(_).concat(c(_)):d(_),i=y.length,a=0,t;i>a;)t=y[a++],(!P||m.call(_,t))&&(n[t]=_[t]);return n}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Z,L){var P=j("./_an-object"),d=j("./_object-dps"),T=j("./_enum-bug-keys"),D=j("./_shared-key")("IE_PROTO"),u=function(){},p="prototype",C=function(){var E=j("./_dom-create")("iframe"),l=T.length,s="<",n=">",h;for(E.style.display="none",j("./_html").appendChild(E),E.src="javascript:",h=E.contentWindow.document,h.open(),h.write(s+"script"+n+"document.F=Object"+s+"/script"+n),h.close(),C=h.F;l--;)delete C[p][T[l]];return C()};Z.exports=Object.create||function(l,s){var n;return l!==null?(u[p]=P(l),n=new u,u[p]=null,n[D]=l):n=C(),s===void 0?n:d(n,s)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Z,L){var P=j("./_an-object"),d=j("./_ie8-dom-define"),T=j("./_to-primitive"),D=Object.defineProperty;L.f=j("./_descriptors")?Object.defineProperty:function(p,C,E){if(P(p),C=T(C,!0),P(E),d)try{return D(p,C,E)}catch(l){}if("get"in E||"set"in E)throw TypeError("Accessors not supported!");return"value"in E&&(p[C]=E.value),p}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Z,L){var P=j("./_object-dp"),d=j("./_an-object"),T=j("./_object-keys");Z.exports=j("./_descriptors")?Object.defineProperties:function(u,p){d(u);for(var C=T(p),E=C.length,l=0,s;E>l;)P.f(u,s=C[l++],p[s]);return u}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Z,L){var P=j("./_object-pie"),d=j("./_property-desc"),T=j("./_to-iobject"),D=j("./_to-primitive"),u=j("./_has"),p=j("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;L.f=j("./_descriptors")?C:function(l,s){if(l=T(l),s=D(s,!0),p)try{return C(l,s)}catch(n){}if(u(l,s))return d(!P.f.call(l,s),l[s])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Z,L){var P=j("./_to-iobject"),d=j("./_object-gopn").f,T={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(p){try{return d(p)}catch(C){return D.slice()}};Z.exports.f=function(C){return D&&T.call(C)=="[object Window]"?u(C):d(P(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Z,L){var P=j("./_object-keys-internal"),d=j("./_enum-bug-keys").concat("length","prototype");L.f=Object.getOwnPropertyNames||function(D){return P(D,d)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Z,L){L.f=Object.getOwnPropertySymbols},{}],138:[function(j,Z,L){var P=j("./_has"),d=j("./_to-object"),T=j("./_shared-key")("IE_PROTO"),D=Object.prototype;Z.exports=Object.getPrototypeOf||function(u){return u=d(u),P(u,T)?u[T]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?D:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Z,L){var P=j("./_has"),d=j("./_to-iobject"),T=j("./_array-includes")(!1),D=j("./_shared-key")("IE_PROTO");Z.exports=function(u,p){var C=d(u),E=0,l=[],s;for(s in C)s!=D&&(P(C,s)&&l.push(s));for(;p.length>E;)P(C,s=p[E++])&&(~T(l,s)||l.push(s));return l}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Z,L){var P=j("./_object-keys-internal"),d=j("./_enum-bug-keys");Z.exports=Object.keys||function(D){return P(D,d)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Z,L){L.f={}.propertyIsEnumerable},{}],142:[function(j,Z,L){var P=j("./_export"),d=j("./_core"),T=j("./_fails");Z.exports=function(D,u){var p=(d.Object||{})[D]||Object[D],C={};C[D]=u(p),P(P.S+P.F*T(function(){p(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Z,L){var P=j("./_descriptors"),d=j("./_object-keys"),T=j("./_to-iobject"),D=j("./_object-pie").f;Z.exports=function(u){return function(p){for(var C=T(p),E=d(C),l=E.length,s=0,n=[],h;l>s;)h=E[s++],(!P||D.call(C,h))&&n.push(u?[h,C[h]]:C[h]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Z,L){Z.exports=function(P){try{return{e:!1,v:P()}}catch(d){return{e:!0,v:d}}}},{}],145:[function(j,Z,L){var P=j("./_an-object"),d=j("./_is-object"),T=j("./_new-promise-capability");Z.exports=function(D,u){if(P(D),d(u)&&u.constructor===D)return u;var p=T.f(D),C=p.resolve;return C(u),p.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Z,L){Z.exports=function(P,d){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:d}}},{}],147:[function(j,Z,L){var P=j("./_hide");Z.exports=function(d,T,D){for(var u in T)D&&d[u]?d[u]=T[u]:P(d,u,T[u]);return d}},{"./_hide":112}],148:[function(j,Z,L){Z.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Z,L){"use strict";var P=j("./_global"),d=j("./_core"),T=j("./_object-dp"),D=j("./_descriptors"),u=j("./_wks")("species");Z.exports=function(p){var C=typeof d[p]=="function"?d[p]:P[p];D&&C&&!C[u]&&T.f(C,u,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Z,L){var P=j("./_object-dp").f,d=j("./_has"),T=j("./_wks")("toStringTag");Z.exports=function(D,u,p){D&&!d(D=p?D:D.prototype,T)&&P(D,T,{configurable:!0,value:u})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Z,L){var P=j("./_shared")("keys"),d=j("./_uid");Z.exports=function(T){return P[T]||(P[T]=d(T))}},{"./_shared":152,"./_uid":162}],152:[function(j,Z,L){var P=j("./_core"),d=j("./_global"),T="__core-js_shared__",D=d[T]||(d[T]={});(Z.exports=function(u,p){return D[u]||(D[u]=p!==void 0?p:{})})("versions",[]).push({version:P.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Z,L){var P=j("./_an-object"),d=j("./_a-function"),T=j("./_wks")("species");Z.exports=function(D,u){var p=P(D).constructor,C;return p===void 0||(C=P(p)[T])==null?u:d(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Z,L){var P=j("./_to-integer"),d=j("./_defined");Z.exports=function(T){return function(D,u){var p=String(d(D)),C=P(u),E=p.length,l,s;return C<0||C>=E?T?"":void 0:(l=p.charCodeAt(C),l<55296||l>56319||C+1===E||(s=p.charCodeAt(C+1))<56320||s>57343?T?p.charAt(C):l:T?p.slice(C,C+2):(l-55296<<10)+(s-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Z,L){var P=j("./_ctx"),d=j("./_invoke"),T=j("./_html"),D=j("./_dom-create"),u=j("./_global"),p=u.process,C=u.setImmediate,E=u.clearImmediate,l=u.MessageChannel,s=u.Dispatch,n=0,h={},f="onreadystatechange",c,m,_,y=function(){var a=+this;if(h.hasOwnProperty(a)){var t=h[a];delete h[a],t()}},i=function(a){y.call(a.data)};(!C||!E)&&(C=function(t){for(var S=[],x=1;arguments.length>x;)S.push(arguments[x++]);return h[++n]=function(){d(typeof t=="function"?t:Function(t),S)},c(n),n},E=function(t){delete h[t]},j("./_cof")(p)=="process"?c=function(a){p.nextTick(P(y,a,1))}:s&&s.now?c=function(a){s.now(P(y,a,1))}:l?(m=new l,_=m.port2,m.port1.onmessage=i,c=P(_.postMessage,_,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(c=function(a){u.postMessage(a+"","*")},u.addEventListener("message",i,!1)):f in D("script")?c=function(a){T.appendChild(D("script"))[f]=function(){T.removeChild(this),y.call(a)}}:c=function(a){setTimeout(P(y,a,1),0)}),Z.exports={set:C,clear:E}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Z,L){var P=j("./_to-integer"),d=Math.max,T=Math.min;Z.exports=function(D,u){return D=P(D),D<0?d(D+u,0):T(D,u)}},{"./_to-integer":157}],157:[function(j,Z,L){var P=Math.ceil,d=Math.floor;Z.exports=function(T){return isNaN(T=+T)?0:(T>0?d:P)(T)}},{}],158:[function(j,Z,L){var P=j("./_iobject"),d=j("./_defined");Z.exports=function(T){return P(d(T))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Z,L){var P=j("./_to-integer"),d=Math.min;Z.exports=function(T){return T>0?d(P(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Z,L){var P=j("./_defined");Z.exports=function(d){return Object(P(d))}},{"./_defined":102}],161:[function(j,Z,L){var P=j("./_is-object");Z.exports=function(d,T){if(!P(d))return d;var D,u;if(T&&typeof(D=d.toString)=="function"&&!P(u=D.call(d)))return u;if(typeof(D=d.valueOf)=="function"&&!P(u=D.call(d)))return u;if(!T&&typeof(D=d.toString)=="function"&&!P(u=D.call(d)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Z,L){var P=0,d=Math.random();Z.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++P+d).toString(36))}},{}],163:[function(j,Z,L){var P=j("./_global"),d=P.navigator;Z.exports=d&&d.userAgent||""},{"./_global":110}],164:[function(j,Z,L){var P=j("./_global"),d=j("./_core"),T=j("./_library"),D=j("./_wks-ext"),u=j("./_object-dp").f;Z.exports=function(p){var C=d.Symbol||(d.Symbol=T?{}:P.Symbol||{});p.charAt(0)!="_"&&!(p in C)&&u(C,p,{value:D.f(p)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Z,L){L.f=j("./_wks")},{"./_wks":166}],166:[function(j,Z,L){var P=j("./_shared")("wks"),d=j("./_uid"),T=j("./_global").Symbol,D=typeof T=="function",u=Z.exports=function(p){return P[p]||(P[p]=D&&T[p]||(D?T:d)("Symbol."+p))};u.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Z,L){var P=j("./_classof"),d=j("./_wks")("iterator"),T=j("./_iterators");Z.exports=j("./_core").getIteratorMethod=function(D){if(D!=null)return D[d]||D["@@iterator"]||T[P(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Z,L){"use strict";var P=j("./_ctx"),d=j("./_export"),T=j("./_to-object"),D=j("./_iter-call"),u=j("./_is-array-iter"),p=j("./_to-length"),C=j("./_create-property"),E=j("./core.get-iterator-method");d(d.S+d.F*!j("./_iter-detect")(function(l){Array.from(l)}),"Array",{from:function(s){var n=T(s),h=typeof this=="function"?this:Array,f=arguments.length,c=f>1?arguments[1]:void 0,m=c!==void 0,_=0,y=E(n),i,a,t,S;if(m&&(c=P(c,f>2?arguments[2]:void 0,2)),y!=null&&!(h==Array&&u(y)))for(S=y.call(n),a=new h;!(t=S.next()).done;_++)C(a,_,m?D(S,c,[t.value,_],!0):t.value);else for(i=p(n.length),a=new h(i);i>_;_++)C(a,_,m?c(n[_],_):n[_]);return a.length=_,a}})},{"./_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,Z,L){"use strict";var P=j("./_add-to-unscopables"),d=j("./_iter-step"),T=j("./_iterators"),D=j("./_to-iobject");Z.exports=j("./_iter-define")(Array,"Array",function(u,p){this._t=D(u),this._i=0,this._k=p},function(){var u=this._t,p=this._k,C=this._i++;return!u||C>=u.length?(this._t=void 0,d(1)):p=="keys"?d(0,C):p=="values"?d(0,u[C]):d(0,[C,u[C]])},"values"),T.Arguments=T.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Z,L){"use strict";var P=j("./_is-object"),d=j("./_object-gpo"),T=j("./_wks")("hasInstance"),D=Function.prototype;T in D||j("./_object-dp").f(D,T,{value:function(u){if(typeof this!="function"||!P(u))return!1;if(!P(this.prototype))return u instanceof this;for(;u=d(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Z,L){var P=j("./_export");P(P.S+P.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Z,L){var P=j("./_export");P(P.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Z,L){var P=j("./_export");P(P.S+P.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Z,L){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Z,L){var P=j("./_to-object"),d=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(D){return d(P(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Z,L){var P=j("./_to-object"),d=j("./_object-keys");j("./_object-sap")("keys",function(){return function(D){return d(P(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Z,L){arguments[4][71][0].apply(L,arguments)},{dup:71}],178:[function(j,Z,L){"use strict";var P=j("./_library"),d=j("./_global"),T=j("./_ctx"),D=j("./_classof"),u=j("./_export"),p=j("./_is-object"),C=j("./_a-function"),E=j("./_an-instance"),l=j("./_for-of"),s=j("./_species-constructor"),n=j("./_task").set,h=j("./_microtask")(),f=j("./_new-promise-capability"),c=j("./_perform"),m=j("./_user-agent"),_=j("./_promise-resolve"),y="Promise",i=d.TypeError,a=d.process,t=a&&a.versions,S=t&&t.v8||"",x=d[y],o=D(a)=="process",k=function(){},O,b,v,g,w=b=f.f,M=!!function(){try{var B=x.resolve(1),V=(B.constructor={})[j("./_wks")("species")]=function(ae){ae(k,k)};return(o||typeof PromiseRejectionEvent=="function")&&B.then(k)instanceof V&&S.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(ae){}}(),N=function(B){var V;return p(B)&&typeof(V=B.then)=="function"?V:!1},I=function(B,V){if(B._n)return;B._n=!0;var ae=B._c;h(function(){for(var he=B._v,pe=B._s==1,Re=0,ke=function(ve){var Te=pe?ve.ok:ve.fail,be=ve.resolve,ue=ve.reject,le=ve.domain,re,fe,q;try{Te?(pe||(B._h==2&&H(B),B._h=1),Te===!0?re=he:(le&&le.enter(),re=Te(he),le&&(le.exit(),q=!0)),re===ve.promise?ue(i("Promise-chain cycle")):(fe=N(re))?fe.call(re,be,ue):be(re)):ue(he)}catch(ee){le&&!q&&le.exit(),ue(ee)}};ae.length>Re;)ke(ae[Re++]);B._c=[],B._n=!1,V&&!B._h&&G(B)})},G=function(B){n.call(d,function(){var V=B._v,ae=z(B),he,pe,Re;if(ae&&(he=c(function(){o?a.emit("unhandledRejection",V,B):(pe=d.onunhandledrejection)?pe({promise:B,reason:V}):(Re=d.console)&&Re.error&&Re.error("Unhandled promise rejection",V)}),B._h=o||z(B)?2:1),B._a=void 0,ae&&he.e)throw he.v})},z=function(B){return B._h!==1&&(B._a||B._c).length===0},H=function(B){n.call(d,function(){var V;o?a.emit("rejectionHandled",B):(V=d.onrejectionhandled)&&V({promise:B,reason:B._v})})},K=function(B){var V=this;if(V._d)return;V._d=!0,V=V._w||V,V._v=B,V._s=2,V._a||(V._a=V._c.slice()),I(V,!0)},U=function(B){var V=this,ae;if(V._d)return;V._d=!0,V=V._w||V;try{if(V===B)throw i("Promise can't be resolved itself");(ae=N(B))?h(function(){var he={_w:V,_d:!1};try{ae.call(B,T(U,he,1),T(K,he,1))}catch(pe){K.call(he,pe)}}):(V._v=B,V._s=1,I(V,!1))}catch(he){K.call({_w:V,_d:!1},he)}};M||(x=function(V){E(this,x,y,"_h"),C(V),O.call(this);try{V(T(U,this,1),T(K,this,1))}catch(ae){K.call(this,ae)}},O=function(V){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")(x.prototype,{then:function(V,ae){var he=w(s(this,x));return he.ok=typeof V=="function"?V:!0,he.fail=typeof ae=="function"&&ae,he.domain=o?a.domain:void 0,this._c.push(he),this._a&&this._a.push(he),this._s&&I(this,!1),he.promise},catch:function(B){return this.then(void 0,B)}}),v=function(){var B=new O;this.promise=B,this.resolve=T(U,B,1),this.reject=T(K,B,1)},f.f=w=function(B){return B===x||B===g?new v(B):b(B)}),u(u.G+u.W+u.F*!M,{Promise:x}),j("./_set-to-string-tag")(x,y),j("./_set-species")(y),g=j("./_core")[y],u(u.S+u.F*!M,y,{reject:function(V){var ae=w(this),he=ae.reject;return he(V),ae.promise}}),u(u.S+u.F*(P||!M),y,{resolve:function(V){return _(P&&this===g?x:this,V)}}),u(u.S+u.F*!(M&&j("./_iter-detect")(function(B){x.all(B).catch(k)})),y,{all:function(V){var ae=this,he=w(ae),pe=he.resolve,Re=he.reject,ke=c(function(){var ve=[],Te=0,be=1;l(V,!1,function(ue){var le=Te++,re=!1;ve.push(void 0),be++,ae.resolve(ue).then(function(fe){if(re)return;re=!0,ve[le]=fe,--be||pe(ve)},Re)}),--be||pe(ve)});return ke.e&&Re(ke.v),he.promise},race:function(V){var ae=this,he=w(ae),pe=he.reject,Re=c(function(){l(V,!1,function(ke){ae.resolve(ke).then(he.resolve,pe)})});return Re.e&&pe(Re.v),he.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,Z,L){var P=j("./_export"),d=j("./_to-absolute-index"),T=String.fromCharCode,D=String.fromCodePoint;P(P.S+P.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(p){for(var C=[],E=arguments.length,l=0,s;E>l;){if(s=+arguments[l++],d(s,1114111)!==s)throw RangeError(s+" is not a valid code point");C.push(s<65536?T(s):T(((s-=65536)>>10)+55296,s%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Z,L){"use strict";var P=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(d){this._t=String(d),this._i=0},function(){var d=this._t,T=this._i,D;return T>=d.length?{value:void 0,done:!0}:(D=P(d,T),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Z,L){"use strict";var P=j("./_global"),d=j("./_has"),T=j("./_descriptors"),D=j("./_export"),u=j("./_redefine"),p=j("./_meta").KEY,C=j("./_fails"),E=j("./_shared"),l=j("./_set-to-string-tag"),s=j("./_uid"),n=j("./_wks"),h=j("./_wks-ext"),f=j("./_wks-define"),c=j("./_enum-keys"),m=j("./_is-array"),_=j("./_an-object"),y=j("./_is-object"),i=j("./_to-object"),a=j("./_to-iobject"),t=j("./_to-primitive"),S=j("./_property-desc"),x=j("./_object-create"),o=j("./_object-gopn-ext"),k=j("./_object-gopd"),O=j("./_object-gops"),b=j("./_object-dp"),v=j("./_object-keys"),g=k.f,w=b.f,M=o.f,N=P.Symbol,I=P.JSON,G=I&&I.stringify,z="prototype",H=n("_hidden"),K=n("toPrimitive"),U={}.propertyIsEnumerable,B=E("symbol-registry"),V=E("symbols"),ae=E("op-symbols"),he=Object[z],pe=typeof N=="function"&&!!O.f,Re=P.QObject,ke=!Re||!Re[z]||!Re[z].findChild,ve=T&&C(function(){return x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a!=7})?function(ge,Oe,Qe){var rt=g(he,Oe);rt&&delete he[Oe],w(ge,Oe,Qe),rt&&ge!==he&&w(he,Oe,rt)}:w,Te=function(ge){var Oe=V[ge]=x(N[z]);return Oe._k=ge,Oe},be=pe&&typeof N.iterator=="symbol"?function(ge){return typeof ge=="symbol"}:function(ge){return ge instanceof N},ue=function(Oe,Qe,rt){return Oe===he&&ue(ae,Qe,rt),_(Oe),Qe=t(Qe,!0),_(rt),d(V,Qe)?(rt.enumerable?(d(Oe,H)&&Oe[H][Qe]&&(Oe[H][Qe]=!1),rt=x(rt,{enumerable:S(0,!1)})):(d(Oe,H)||w(Oe,H,S(1,{})),Oe[H][Qe]=!0),ve(Oe,Qe,rt)):w(Oe,Qe,rt)},le=function(Oe,Qe){_(Oe);for(var rt=c(Qe=a(Qe)),nt=0,ut=rt.length,dt;ut>nt;)ue(Oe,dt=rt[nt++],Qe[dt]);return Oe},re=function(Oe,Qe){return Qe===void 0?x(Oe):le(x(Oe),Qe)},fe=function(Oe){var Qe=U.call(this,Oe=t(Oe,!0));return this===he&&d(V,Oe)&&!d(ae,Oe)?!1:Qe||!d(this,Oe)||!d(V,Oe)||d(this,H)&&this[H][Oe]?Qe:!0},q=function(Oe,Qe){if(Oe=a(Oe),Qe=t(Qe,!0),Oe===he&&d(V,Qe)&&!d(ae,Qe))return;var rt=g(Oe,Qe);return rt&&d(V,Qe)&&!(d(Oe,H)&&Oe[H][Qe])&&(rt.enumerable=!0),rt},ee=function(Oe){for(var Qe=M(a(Oe)),rt=[],nt=0,ut;Qe.length>nt;)!d(V,ut=Qe[nt++])&&ut!=H&&ut!=p&&rt.push(ut);return rt},Ce=function(Oe){for(var Qe=Oe===he,rt=M(Qe?ae:a(Oe)),nt=[],ut=0,dt;rt.length>ut;)d(V,dt=rt[ut++])&&(Qe?d(he,dt):!0)&&nt.push(V[dt]);return nt};pe||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var Oe=s(arguments.length>0?arguments[0]:void 0),Qe=function(rt){this===he&&Qe.call(ae,rt),d(this,H)&&d(this[H],Oe)&&(this[H][Oe]=!1),ve(this,Oe,S(1,rt))};return T&&ke&&ve(he,Oe,{configurable:!0,set:Qe}),Te(Oe)},u(N[z],"toString",function(){return this._k}),k.f=q,b.f=ue,j("./_object-gopn").f=o.f=ee,j("./_object-pie").f=fe,O.f=Ce,T&&!j("./_library")&&u(he,"propertyIsEnumerable",fe,!0),h.f=function(ge){return Te(n(ge))}),D(D.G+D.W+D.F*!pe,{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=v(n.store),Q=0;X.length>Q;)f(X[Q++]);D(D.S+D.F*!pe,"Symbol",{for:function(ge){return d(B,ge+="")?B[ge]:B[ge]=N(ge)},keyFor:function(Oe){if(!be(Oe))throw TypeError(Oe+" is not a symbol!");for(var Qe in B)if(B[Qe]===Oe)return Qe},useSetter:function(){ke=!0},useSimple:function(){ke=!1}}),D(D.S+D.F*!pe,"Object",{create:re,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:q,getOwnPropertyNames:ee,getOwnPropertySymbols:Ce});var Ee=C(function(){O.f(1)});D(D.S+D.F*Ee,"Object",{getOwnPropertySymbols:function(Oe){return O.f(i(Oe))}}),I&&D(D.S+D.F*(!pe||C(function(){var ge=N();return G([ge])!="[null]"||G({a:ge})!="{}"||G(Object(ge))!="{}"})),"JSON",{stringify:function(Oe){for(var Qe=[Oe],rt=1,nt,ut;arguments.length>rt;)Qe.push(arguments[rt++]);return ut=nt=Qe[1],!y(nt)&&Oe===void 0||be(Oe)?void 0:(m(nt)||(nt=function(dt,mt){if(typeof ut=="function"&&(mt=ut.call(this,dt,mt)),!be(mt))return mt}),Qe[1]=nt,G.apply(I,Qe))}}),N[z][K]||j("./_hide")(N[z],K,N[z].valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(P.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,Z,L){var P=j("./_export"),d=j("./_object-to-array")(!0);P(P.S,"Object",{entries:function(D){return d(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Z,L){"use strict";var P=j("./_export"),d=j("./_core"),T=j("./_global"),D=j("./_species-constructor"),u=j("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(p){var C=D(this,d.Promise||T.Promise),E=typeof p=="function";return this.then(E?function(l){return u(C,p()).then(function(){return l})}:p,E?function(l){return u(C,p()).then(function(){throw l})}:p)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Z,L){"use strict";var P=j("./_export"),d=j("./_new-promise-capability"),T=j("./_perform");P(P.S,"Promise",{try:function(D){var u=d.f(this),p=T(D);return(p.e?u.reject:u.resolve)(p.v),u.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Z,L){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Z,L){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Z,L){j("./es6.array.iterator");for(var P=j("./_global"),d=j("./_hide"),T=j("./_iterators"),D=j("./_wks")("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),p=0;p<u.length;p++){var C=u[p],E=P[C],l=E&&E.prototype;l&&!l[D]&&d(l,D,C),T[C]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,Z,L){var P=j("./_export"),d=j("./_task");P(P.G+P.B,{setImmediate:d.set,clearImmediate:d.clear})},{"./_export":107,"./_task":155}],189:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/helpers/typeof"),T=D(d);function D(t){return t&&t.__esModule?t:{default:t}}function u(t){return Array.isArray?Array.isArray(t):a(t)==="[object Array]"}L.isArray=u;function p(t){return typeof t=="boolean"}L.isBoolean=p;function C(t){return t===null}L.isNull=C;function E(t){return t==null}L.isNullOrUndefined=E;function l(t){return typeof t=="number"}L.isNumber=l;function s(t){return typeof t=="string"}L.isString=s;function n(t){return(typeof t=="undefined"?"undefined":(0,T.default)(t))==="symbol"}L.isSymbol=n;function h(t){return t===void 0}L.isUndefined=h;function f(t){return a(t)==="[object RegExp]"}L.isRegExp=f;function c(t){return(typeof t=="undefined"?"undefined":(0,T.default)(t))==="object"&&t!==null}L.isObject=c;function m(t){return a(t)==="[object Date]"}L.isDate=m;function _(t){return a(t)==="[object Error]"||t instanceof Error}L.isError=_;function y(t){return typeof t=="function"}L.isFunction=y;function i(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,T.default)(t))==="symbol"||typeof t=="undefined"}L.isPrimitive=i,L.isBuffer=P.isBuffer;function a(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,Z,L){"use strict";var P=j("babel-runtime/helpers/typeof"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(D){"use strict";var u=function(){var s=/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,h=/[^-+\dA-Z]/g;return function(f,c,m,_){if(arguments.length===1&&l(f)==="string"&&!/\d/.test(f)&&(c=f,f=void 0),f=f||new Date,f instanceof Date||(f=new Date(f)),isNaN(f))throw TypeError("Invalid date");c=String(u.masks[c]||c||u.masks.default);var y=c.slice(0,4);(y==="UTC:"||y==="GMT:")&&(c=c.slice(4),m=!0,y==="GMT:"&&(_=!0));var i=m?"getUTC":"get",a=f[i+"Date"](),t=f[i+"Day"](),S=f[i+"Month"](),x=f[i+"FullYear"](),o=f[i+"Hours"](),k=f[i+"Minutes"](),O=f[i+"Seconds"](),b=f[i+"Milliseconds"](),v=m?0:f.getTimezoneOffset(),g=C(f),w=E(f),M={d:a,dd:p(a),ddd:u.i18n.dayNames[t],dddd:u.i18n.dayNames[t+7],m:S+1,mm:p(S+1),mmm:u.i18n.monthNames[S],mmmm:u.i18n.monthNames[S+12],yy:String(x).slice(2),yyyy:x,h:o%12||12,hh:p(o%12||12),H:o,HH:p(o),M:k,MM:p(k),s:O,ss:p(O),l:p(b,3),L:p(Math.round(b/10)),t:o<12?"a":"p",tt:o<12?"am":"pm",T:o<12?"A":"P",TT:o<12?"AM":"PM",Z:_?"GMT":m?"UTC":(String(f).match(n)||[""]).pop().replace(h,""),o:(v>0?"-":"+")+p(Math.floor(Math.abs(v)/60)*100+Math.abs(v)%60,4),S:["th","st","nd","rd"][a%10>3?0:(a%100-a%10!=10)*a%10],W:g,N:w};return c.replace(s,function(N){return N in M?M[N]:N.slice(1,N.length-1)})}}();u.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},u.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function p(s,n){for(s=String(s),n=n||2;s.length<n;)s="0"+s;return s}function C(s){var n=new Date(s.getFullYear(),s.getMonth(),s.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var h=new Date(n.getFullYear(),0,4);h.setDate(h.getDate()-(h.getDay()+6)%7+3);var f=n.getTimezoneOffset()-h.getTimezoneOffset();n.setHours(n.getHours()-f);var c=(n-h)/(864e5*7);return 1+Math.floor(c)}function E(s){var n=s.getDay();return n===0&&(n=7),n}function l(s){return s===null?"null":s===void 0?"undefined":(typeof s=="undefined"?"undefined":(0,d.default)(s))!=="object"?typeof s=="undefined"?"undefined":(0,d.default)(s):Array.isArray(s)?"array":{}.toString.call(s).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return u}):(typeof L=="undefined"?"undefined":(0,d.default)(L))==="object"?Z.exports=u:D.dateFormat=u})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,Z,L){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var P=/["'&<>]/;Z.exports=d;function d(T){var D=""+T,u=P.exec(D);if(!u)return D;var p,C="",E=0,l=0;for(E=u.index;E<D.length;E++){switch(D.charCodeAt(E)){case 34:p="&quot;";break;case 38:p="&amp;";break;case 39:p="&#39;";break;case 60:p="&lt;";break;case 62:p="&gt;";break;default:continue}l!==E&&(C+=D.substring(l,E)),l=E+1,C+=p}return l!==E?C+D.substring(l,E):C}},{}],192:[function(j,Z,L){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Z.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(p){if(!T(p)||p<0||isNaN(p))throw TypeError("n must be a positive number");return this._maxListeners=p,this},P.prototype.emit=function(p){var C,E,l,s,n,h;if(this._events||(this._events={}),p==="error"&&(!this._events.error||D(this._events.error)&&!this._events.error.length)){if(C=arguments[1],C instanceof Error)throw C;var f=new Error('Uncaught, unspecified "error" event. ('+C+")");throw f.context=C,f}if(E=this._events[p],u(E))return!1;if(d(E))switch(arguments.length){case 1:E.call(this);break;case 2:E.call(this,arguments[1]);break;case 3:E.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),E.apply(this,s)}else if(D(E))for(s=Array.prototype.slice.call(arguments,1),h=E.slice(),l=h.length,n=0;n<l;n++)h[n].apply(this,s);return!0},P.prototype.addListener=function(p,C){var E;if(!d(C))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",p,d(C.listener)?C.listener:C),this._events[p]?D(this._events[p])?this._events[p].push(C):this._events[p]=[this._events[p],C]:this._events[p]=C,D(this._events[p])&&!this._events[p].warned&&(u(this._maxListeners)?E=P.defaultMaxListeners:E=this._maxListeners,E&&E>0&&this._events[p].length>E&&(this._events[p].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[p].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(p,C){if(!d(C))throw TypeError("listener must be a function");var E=!1;function l(){this.removeListener(p,l),E||(E=!0,C.apply(this,arguments))}return l.listener=C,this.on(p,l),this},P.prototype.removeListener=function(p,C){var E,l,s,n;if(!d(C))throw TypeError("listener must be a function");if(!this._events||!this._events[p])return this;if(E=this._events[p],s=E.length,l=-1,E===C||d(E.listener)&&E.listener===C)delete this._events[p],this._events.removeListener&&this.emit("removeListener",p,C);else if(D(E)){for(n=s;n-- >0;)if(E[n]===C||E[n].listener&&E[n].listener===C){l=n;break}if(l<0)return this;E.length===1?(E.length=0,delete this._events[p]):E.splice(l,1),this._events.removeListener&&this.emit("removeListener",p,C)}return this},P.prototype.removeAllListeners=function(p){var C,E;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[p]&&delete this._events[p],this;if(arguments.length===0){for(C in this._events){if(C==="removeListener")continue;this.removeAllListeners(C)}return this.removeAllListeners("removeListener"),this._events={},this}if(E=this._events[p],d(E))this.removeListener(p,E);else if(E)for(;E.length;)this.removeListener(p,E[E.length-1]);return delete this._events[p],this},P.prototype.listeners=function(p){var C;return!this._events||!this._events[p]?C=[]:d(this._events[p])?C=[this._events[p]]:C=this._events[p].slice(),C},P.prototype.listenerCount=function(p){if(this._events){var C=this._events[p];if(d(C))return 1;if(C)return C.length}return 0},P.listenerCount=function(p,C){return p.listenerCount(C)};function d(p){return typeof p=="function"}function T(p){return typeof p=="number"}function D(p){return typeof p=="object"&&p!==null}function u(p){return p===void 0}},{}],193:[function(j,Z,L){var P=j("http"),d=Z.exports;for(var T in P)P.hasOwnProperty(T)&&(d[T]=P[T]);d.request=function(D,u){return D||(D={}),D.scheme="https",D.protocol="https:",P.request.call(this,D,u)}},{http:231}],194:[function(j,Z,L){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=j("util"),d=j("ms");Z.exports=function(T){if(typeof T=="number")return T;var D=d(T);if(D===void 0){var u=new Error(P.format("humanize-ms(%j) result undefined",T));console.warn(u.stack)}return D}},{ms:204,util:243}],195:[function(j,Z,L){L.read=function(P,d,T,D,u){var p,C,E=u*8-D-1,l=(1<<E)-1,s=l>>1,n=-7,h=T?u-1:0,f=T?-1:1,c=P[d+h];for(h+=f,p=c&(1<<-n)-1,c>>=-n,n+=E;n>0;p=p*256+P[d+h],h+=f,n-=8);for(C=p&(1<<-n)-1,p>>=-n,n+=D;n>0;C=C*256+P[d+h],h+=f,n-=8);if(p===0)p=1-s;else{if(p===l)return C?NaN:(c?-1:1)*Infinity;C=C+Math.pow(2,D),p=p-s}return(c?-1:1)*C*Math.pow(2,p-D)},L.write=function(P,d,T,D,u,p){var C,E,l,s=p*8-u-1,n=(1<<s)-1,h=n>>1,f=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=D?0:p-1,m=D?1:-1,_=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===Infinity?(E=isNaN(d)?1:0,C=n):(C=Math.floor(Math.log(d)/Math.LN2),d*(l=Math.pow(2,-C))<1&&(C--,l*=2),C+h>=1?d+=f/l:d+=f*Math.pow(2,1-h),d*l>=2&&(C++,l/=2),C+h>=n?(E=0,C=n):C+h>=1?(E=(d*l-1)*Math.pow(2,u),C=C+h):(E=d*Math.pow(2,h-1)*Math.pow(2,u),C=0));u>=8;P[T+c]=E&255,c+=m,E/=256,u-=8);for(C=C<<u|E,s+=u;s>0;P[T+c]=C&255,c+=m,C/=256,s-=8);P[T+c-m]|=_*128}},{}],196:[function(j,Z,L){typeof Object.create=="function"?Z.exports=function(d,T){T&&(d.super_=T,d.prototype=Object.create(T.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(d,T){if(T){d.super_=T;var D=function(){};D.prototype=T.prototype,d.prototype=new D,d.prototype.constructor=d}}},{}],197:[function(j,Z,L){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/Z.exports=function(T){return T!=null&&(P(T)||d(T)||!!T._isBuffer)};function P(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function d(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&P(T.slice(0,0))}},{}],198:[function(j,Z,L){var P={}.toString;Z.exports=Array.isArray||function(d){return P.call(d)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(j):typeof define=="function"&&define.amd?define(Z):Z(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 Z={},L=0,P=j.length;L<P;L++)Z[j.charAt(L)]=L;return Z}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var Z=j.charCodeAt(0);return Z<128?j:Z<2048?fromCharCode(192|Z>>>6)+fromCharCode(128|Z&63):fromCharCode(224|Z>>>12&15)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}else{var Z=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Z>>>18&7)+fromCharCode(128|Z>>>12&63)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&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 Z=[0,2,1][j.length%3],L=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),P=[b64chars.charAt(L>>>18),b64chars.charAt(L>>>12&63),Z>=2?"=":b64chars.charAt(L>>>6&63),Z>=1?"=":b64chars.charAt(L&63)];return P.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 Z=Object.prototype.toString.call(j)==="[object Uint8Array]";return Z?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Z){return Z?_encode(String(j)).replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).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 Z=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),L=Z-65536;return fromCharCode((L>>>10)+55296)+fromCharCode((L&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 Z=j.length,L=Z%4,P=(Z>0?b64tab[j.charAt(0)]<<18:0)|(Z>1?b64tab[j.charAt(1)]<<12:0)|(Z>2?b64tab[j.charAt(2)]<<6:0)|(Z>3?b64tab[j.charAt(3)]:0),d=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return d.length-=[0,0,2,1][L],d.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(Z){return Z=="-"?"+":"/"}).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,Z,L){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";Z.exports=d;var P=Object.prototype.hasOwnProperty;function d(T,D,u){if(!T)throw new TypeError("argument dest is required");if(!D)throw new TypeError("argument src is required");return u===void 0&&(u=!0),Object.getOwnPropertyNames(D).forEach(function(C){if(!u&&P.call(T,C))return;var E=Object.getOwnPropertyDescriptor(D,C);Object.defineProperty(T,C,E)}),T}},{}],201:[function(j,Z,L){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var d=0;d<arguments.length;d++)this.define(arguments[d]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(d,T){for(var D in d){var u=d[D].map(function(E){return E.toLowerCase()});D=D.toLowerCase();for(var p=0;p<u.length;p++){var C=u[p];if(C[0]=="*")continue;if(!T&&C in this._types)throw new Error('Attempt to change mapping for "'+C+'" extension from "'+this._types[C]+'" to "'+D+'". Pass `force=true` to allow this, otherwise remove "'+C+'" from the list of extensions for "'+D+'".');this._types[C]=D}if(T||!this._extensions[D]){var C=u[0];this._extensions[D]=C[0]!="*"?C:C.substr(1)}}},P.prototype.getType=function(d){d=String(d);var T=d.replace(/^.*[/\\]/,"").toLowerCase(),D=T.replace(/^.*\./,"").toLowerCase(),u=T.length<d.length,p=D.length<T.length-1;return(p||!u)&&this._types[D]||null},P.prototype.getExtension=function(d){return d=/^\s*([^;\s]*)/.test(d)&&RegExp.$1,d&&this._extensions[d.toLowerCase()]||null},Z.exports=P},{}],202:[function(j,Z,L){"use strict";var P=j("./Mime");Z.exports=new P(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,Z,L){Z.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,Z,L){var P=1e3,d=P*60,T=d*60,D=T*24,u=D*7,p=D*365.25;Z.exports=function(n,h){h=h||{};var f=typeof n;if(f==="string"&&n.length>0)return C(n);if(f==="number"&&isFinite(n))return h.long?l(n):E(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function C(n){if(n=String(n),n.length>100)return;var h=/^(-?(?:\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(!h)return;var f=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return f*p;case"weeks":case"week":case"w":return f*u;case"days":case"day":case"d":return f*D;case"hours":case"hour":case"hrs":case"hr":case"h":return f*T;case"minutes":case"minute":case"mins":case"min":case"m":return f*d;case"seconds":case"second":case"secs":case"sec":case"s":return f*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}function E(n){var h=Math.abs(n);return h>=D?Math.round(n/D)+"d":h>=T?Math.round(n/T)+"h":h>=d?Math.round(n/d)+"m":h>=P?Math.round(n/P)+"s":n+"ms"}function l(n){var h=Math.abs(n);return h>=D?s(n,h,D,"day"):h>=T?s(n,h,T,"hour"):h>=d?s(n,h,d,"minute"):h>=P?s(n,h,P,"second"):n+" ms"}function s(n,h,f,c){var m=h>=f*1.5;return Math.round(n/f)+" "+c+(m?"s":"")}},{}],205:[function(j,Z,L){(function(P){function d(p,C){for(var E=0,l=p.length-1;l>=0;l--){var s=p[l];s==="."?p.splice(l,1):s===".."?(p.splice(l,1),E++):E&&(p.splice(l,1),E--)}if(C)for(;E--;E)p.unshift("..");return p}L.resolve=function(){for(var p="",C=!1,E=arguments.length-1;E>=-1&&!C;E--){var l=E>=0?arguments[E]:P.cwd();if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!l)continue;p=l+"/"+p,C=l.charAt(0)==="/"}return p=d(D(p.split("/"),function(s){return!!s}),!C).join("/"),(C?"/":"")+p||"."},L.normalize=function(p){var C=L.isAbsolute(p),E=u(p,-1)==="/";return p=d(D(p.split("/"),function(l){return!!l}),!C).join("/"),!p&&!C&&(p="."),p&&E&&(p+="/"),(C?"/":"")+p},L.isAbsolute=function(p){return p.charAt(0)==="/"},L.join=function(){var p=Array.prototype.slice.call(arguments,0);return L.normalize(D(p,function(C,E){if(typeof C!="string")throw new TypeError("Arguments to path.join must be strings");return C}).join("/"))},L.relative=function(p,C){p=L.resolve(p).substr(1),C=L.resolve(C).substr(1);function E(m){for(var _=0;_<m.length&&!(m[_]!=="");_++);for(var y=m.length-1;y>=0&&!(m[y]!=="");y--);return _>y?[]:m.slice(_,y-_+1)}for(var l=E(p.split("/")),s=E(C.split("/")),n=Math.min(l.length,s.length),h=n,f=0;f<n;f++)if(l[f]!==s[f]){h=f;break}for(var c=[],f=h;f<l.length;f++)c.push("..");return c=c.concat(s.slice(h)),c.join("/")},L.sep="/",L.delimiter=":",L.dirname=function(p){if(typeof p!="string"&&(p=p+""),p.length===0)return".";for(var C=p.charCodeAt(0),E=C===47,l=-1,s=!0,n=p.length-1;n>=1;--n)if(C=p.charCodeAt(n),C===47){if(!s){l=n;break}}else s=!1;return l===-1?E?"/":".":E&&l===1?"/":p.slice(0,l)};function T(p){typeof p!="string"&&(p=p+"");var C=0,E=-1,l=!0,s;for(s=p.length-1;s>=0;--s)if(p.charCodeAt(s)===47){if(!l){C=s+1;break}}else E===-1&&(l=!1,E=s+1);return E===-1?"":p.slice(C,E)}L.basename=function(p,C){var E=T(p);return C&&E.substr(-1*C.length)===C&&(E=E.substr(0,E.length-C.length)),E},L.extname=function(p){typeof p!="string"&&(p=p+"");for(var C=-1,E=0,l=-1,s=!0,n=0,h=p.length-1;h>=0;--h){var f=p.charCodeAt(h);if(f===47){if(!s){E=h+1;break}continue}l===-1&&(s=!1,l=h+1),f===46?C===-1?C=h:n!==1&&(n=1):C!==-1&&(n=-1)}return C===-1||l===-1||n===0||n===1&&C===l-1&&C===E+1?"":p.slice(C,l)};function D(p,C){if(p.filter)return p.filter(C);for(var E=[],l=0;l<p.length;l++)C(p[l],l,p)&&E.push(p[l]);return E}var u="ab".substr(-1)==="b"?function(p,C,E){return p.substr(C,E)}:function(p,C,E){return C<0&&(C=p.length+C),p.substr(C,E)}}).call(this,j("_process"))},{_process:208}],206:[function(j,Z,L){(function(P){/*!
* 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 d={function:!0,object:!0},T=d[typeof window]&&window||this,D=T,u=d[typeof L]&&L,p=d[typeof Z]&&Z&&!Z.nodeType&&Z,C=u&&p&&typeof P=="object"&&P;C&&(C.global===C||C.window===C||C.self===C)&&(T=C);var E=Math.pow(2,53)-1,l=/\bOpera/,s=this,n=Object.prototype,h=n.hasOwnProperty,f=n.toString;function c(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function m(b,v,g){var w={"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 v&&g&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(w=w[/[\d.]+$/.exec(b)])&&(b="Windows "+w),b=String(b),v&&g&&(b=b.replace(RegExp(v,"i"),g)),b=y(b.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),b}function _(b,v){var g=-1,w=b?b.length:0;if(typeof w=="number"&&w>-1&&w<=E)for(;++g<w;)v(b[g],g,b);else i(b,v)}function y(b){return b=o(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:c(b)}function i(b,v){for(var g in b)h.call(b,g)&&v(b[g],g,b)}function a(b){return b==null?c(b):f.call(b).slice(8,-1)}function t(b,v){var g=b!=null?typeof b[v]:"number";return!/^(?:boolean|number|string|undefined)$/.test(g)&&(g=="object"?!!b[v]:!0)}function S(b){return String(b).replace(/([ -])(?!$)/g,"$1?")}function x(b,v){var g=null;return _(b,function(w,M){g=v(g,w,M,b)}),g}function o(b){return String(b).replace(/^ +| +$/g,"")}function k(b){var v=T,g=b&&typeof b=="object"&&a(b)!="String";g&&(v=b,b=null);var w=v.navigator||{},M=w.userAgent||"";b||(b=M);var N=g||s==D,I=g?!!w.likeChrome:/\bChrome\b/.test(b)&&!/internal|\n/i.test(f.toString()),G="Object",z=g?G:"ScriptBridgingProxyObject",H=g?G:"Environment",K=g&&v.java?"JavaPackage":a(v.java),U=g?G:"RuntimeObject",B=/\bJava/.test(K)&&v.java,V=B&&a(v.environment)==H,ae=B?"a":"\u03B1",he=B?"b":"\u03B2",pe=v.document||{},Re=v.operamini||v.opera,ke=l.test(ke=g&&Re?Re["[[Class]]"]:a(Re))?ke:Re=null,ve,Te=b,be=[],ue=null,le=b==M,re=le&&Re&&typeof Re.version=="function"&&Re.version(),fe,q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ee=Ee(["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"]),Ce=Oe([{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=Q({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=ge(["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(ut){return x(ut,function(dt,mt){return dt||RegExp("\\b"+(mt.pattern||S(mt))+"\\b","i").exec(b)&&(mt.label||mt)})}function Q(ut){return x(ut,function(dt,mt,He){return dt||(mt[Ce]||mt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ce)]||RegExp("\\b"+S(He)+"(?:\\b|\\w*\\d)","i").exec(b))&&He})}function Ee(ut){return x(ut,function(dt,mt){return dt||RegExp("\\b"+(mt.pattern||S(mt))+"\\b","i").exec(b)&&(mt.label||mt)})}function ge(ut){return x(ut,function(dt,mt){var He=mt.pattern||S(mt);return!dt&&(dt=RegExp("\\b"+He+"(?:/[\\d.]+|[ \\w.]*)","i").exec(b))&&(dt=m(dt,He,mt.label||mt)),dt})}function Oe(ut){return x(ut,function(dt,mt){var He=mt.pattern||S(mt);return!dt&&(dt=RegExp("\\b"+He+" *\\d+[.\\w_]*","i").exec(b)||RegExp("\\b"+He+" *\\w+-[\\w]*","i").exec(b)||RegExp("\\b"+He+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(b))&&((dt=String(mt.label&&!RegExp(He,"i").test(mt.label)?mt.label:dt).split("/"))[1]&&!/[\d.]+/.test(dt[0])&&(dt[0]+=" "+dt[1]),mt=mt.label||mt,dt=y(dt[0].replace(RegExp(He,"i"),mt).replace(RegExp("; *(?:"+mt+"[_-])?","i")," ").replace(RegExp("("+mt+")[-_.]?(\\w)","i"),"$1 $2"))),dt})}function Qe(ut){return x(ut,function(dt,mt){return dt||(RegExp(mt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(b)||0)[1]||null})}function rt(){return this.description||""}if(q&&(q=[q]),te&&!Ce&&(Ce=Oe([te])),(ve=/\bGoogle TV\b/.exec(Ce))&&(Ce=ve[0]),/\bSimulator\b/i.test(b)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),ee=="Opera Mini"&&/\bOPiOS\b/.test(b)&&be.push("running in Turbo/Uncompressed mode"),ee=="IE"&&/\blike iPhone OS\b/.test(b)?(ve=k(b.replace(/like iPhone OS/,"")),te=ve.manufacturer,Ce=ve.product):/^iP/.test(Ce)?(ee||(ee="Safari"),J="iOS"+((ve=/ OS ([\d_]+)/i.exec(b))?" "+ve[1].replace(/_/g,"."):"")):ee=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":te&&te!="Google"&&(/Chrome/.test(ee)&&!/\bMobile Safari\b/i.test(b)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(J)&&/^Chrome/.test(ee)&&/\bVersion\//i.test(b)?(ee="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):ee=="Silk"?(/\bMobi/i.test(b)||(J="Android",be.unshift("desktop mode")),/Accelerated *= *true/i.test(b)&&be.unshift("accelerated")):ee=="PaleMoon"&&(ve=/\bFirefox\/([\d.]+)\b/.exec(b))?be.push("identifying as Firefox "+ve[1]):ee=="Firefox"&&(ve=/\b(Mobile|Tablet|TV)\b/i.exec(b))?(J||(J="Firefox OS"),Ce||(Ce=ve[1])):!ee||(ve=!/\bMinefield\b/i.test(b)&&/\b(?:Firefox|Safari)\b/.exec(ee))?(ee&&!Ce&&/[\/,]|^[^(]+?\)/.test(b.slice(b.indexOf(ve+"/")+8))&&(ee=null),(ve=Ce||te||J)&&(Ce||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(ee=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:ve)+" Browser")):ee=="Electron"&&(ve=(/\bChrome\/([\d.]+)\b/.exec(b)||0)[1])&&be.push("Chromium "+ve),re||(re=Qe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",S(ee),"(?:Firefox|Minefield|NetFront)"])),(ve=q=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(ee)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(b)&&(J=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ee)&&"NetFront")&&(q=[ve]),ee=="IE"&&(ve=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(ee+=" Mobile",J="Windows Phone "+(/\+$/.test(ve)?ve:ve+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(ee="IE Mobile",J="Windows Phone 8.x",be.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(b)||0)[1])):ee!="IE"&&q=="Trident"&&(ve=/\brv:([\d.]+)/.exec(b))&&(ee&&be.push("identifying as "+ee+(re?" "+re:"")),ee="IE",re=ve[1]),le){if(t(v,"global"))if(B&&(ve=B.lang.System,Te=ve.getProperty("os.arch"),J=J||ve.getProperty("os.name")+" "+ve.getProperty("os.version")),V){try{re=v.require("ringo/engine").version.join("."),ee="RingoJS"}catch(ut){(ve=v.system)&&ve.global.system==v.system&&(ee="Narwhal",J||(J=ve[0].os||null))}ee||(ee="Rhino")}else typeof v.process=="object"&&!v.process.browser&&(ve=v.process)&&(typeof ve.versions=="object"&&(typeof ve.versions.electron=="string"?(be.push("Node "+ve.versions.node),ee="Electron",re=ve.versions.electron):typeof ve.versions.nw=="string"&&(be.push("Chromium "+re,"Node "+ve.versions.node),ee="NW.js",re=ve.versions.nw)),ee||(ee="Node.js",Te=ve.arch,J=ve.platform,re=/[\d.]+/.exec(ve.version),re=re?re[0]:null));else a(ve=v.runtime)==z?(ee="Adobe AIR",J=ve.flash.system.Capabilities.os):a(ve=v.phantom)==U?(ee="PhantomJS",re=(ve=ve.version||null)&&ve.major+"."+ve.minor+"."+ve.patch):typeof pe.documentMode=="number"&&(ve=/\bTrident\/(\d+)/i.exec(b))?(re=[re,pe.documentMode],(ve=+ve[1]+4)!=re[1]&&(be.push("IE "+re[1]+" mode"),q&&(q[1]=""),re[1]=ve),re=ee=="IE"?String(re[1].toFixed(1)):re[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ee)&&(be.push("masking as "+ee+" "+re),ee="IE",re="11.0",q=["Trident"],J="Windows");J=J&&y(J)}if(re&&(ve=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(le&&w.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(ue=/b/i.test(ve)?"beta":"alpha",re=re.replace(RegExp(ve+"\\+?$"),"")+(ue=="beta"?he:ae)+(/\d+\+?/.exec(ve)||"")),ee=="Fennec"||ee=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ee="Firefox Mobile";else if(ee=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(J=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(b)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ee)||ee&&!Ce&&!/Browser|Mobi/.test(ee))&&(J=="Windows CE"||/Mobi/i.test(b)))ee+=" Mobile";else if(ee=="IE"&&le)try{v.external===null&&be.unshift("platform preview")}catch(ut){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(b))&&(ve=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||re)?(ve=[ve,/BB10/.test(b)],J=(ve[1]?(Ce=null,te="BlackBerry"):"Device Software")+" "+ve[0],re=null):this!=i&&Ce!="Wii"&&(le&&Re||/Opera/.test(ee)&&/\b(?:MSIE|Firefox)\b/i.test(b)||ee=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ee=="IE"&&(J&&!/^Win/.test(J)&&re>5.5||/\bWindows XP\b/.test(J)&&re>8||re==8&&!/\bTrident\b/.test(b)))&&!l.test(ve=k.call(i,b.replace(l,"")+";"))&&ve.name&&(ve="ing as "+ve.name+((ve=ve.version)?" "+ve:""),l.test(ee)?(/\bIE\b/.test(ve)&&J=="Mac OS"&&(J=null),ve="identify"+ve):(ve="mask"+ve,ke?ee=y(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):ee="Opera",/\bIE\b/.test(ve)&&(J=null),le||(re=null)),q=["Presto"],be.push(ve));(ve=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(ve=[parseFloat(ve.replace(/\.(\d)$/,".0$1")),ve],ee=="Safari"&&ve[1].slice(-1)=="+"?(ee="WebKit Nightly",ue="alpha",re=ve[1].slice(0,-1)):(re==ve[1]||re==(ve[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(re=null),ve[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],ve[0]==537.36&&ve[2]==537.36&&parseFloat(ve[1])>=28&&q=="WebKit"&&(q=["Blink"]),!le||!I&&!ve[1]?(q&&(q[1]="like Safari"),ve=(ve=ve[0],ve<400?1:ve<500?2:ve<526?3:ve<533?4:ve<534?"4+":ve<535?5:ve<537?6:ve<538?7:ve<601?8:"8")):(q&&(q[1]="like Chrome"),ve=ve[1]||(ve=ve[0],ve<530?1:ve<532?2:ve<532.05?3:ve<533?4:ve<534.03?5:ve<534.07?6:ve<534.1?7:ve<534.13?8:ve<534.16?9:ve<534.24?10:ve<534.3?11:ve<535.01?12:ve<535.02?"13+":ve<535.07?15:ve<535.11?16:ve<535.19?17:ve<536.05?18:ve<536.1?19:ve<537.01?20:ve<537.11?"21+":ve<537.13?23:ve<537.18?24:ve<537.24?25:ve<537.36?26:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(ve+=typeof ve=="number"?".x":/[.+]/.test(ve)?"":"+")),ee=="Safari"&&(!re||parseInt(re)>45)&&(re=ve)),ee=="Opera"&&(ve=/\bzbov|zvav$/.exec(J))?(ee+=" ",be.unshift("desktop mode"),ve=="zvav"?(ee+="Mini",re=null):ee+="Mobile",J=J.replace(RegExp(" *"+ve+"$"),"")):ee=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(be.unshift("desktop mode"),ee="Chrome Mobile",re=null,/\bOS X\b/.test(J)?(te="Apple",J="iOS 4.3+"):J=null),re&&re.indexOf(ve=/[\d.]+$/.exec(J))==0&&b.indexOf("/"+ve+"-")>-1&&(J=o(J.replace(ve,""))),q&&!/\b(?:Avant|Nook)\b/.test(ee)&&(/Browser|Lunascape|Maxthon/.test(ee)||ee!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ee)&&q[1])&&((ve=q[q.length-1])&&be.push(ve)),be.length&&(be=["("+be.join("; ")+")"]),te&&Ce&&Ce.indexOf(te)<0&&be.push("on "+te),Ce&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Ce),J&&(ve=/ ([\d.+]+)$/.exec(J),fe=ve&&J.charAt(J.length-ve[0].length-1)=="/",J={architecture:32,family:ve&&!fe?J.replace(ve[0],""):J,version:ve?ve[1]:null,toString:function(){var ut=this.version;return this.family+(ut&&!fe?" "+ut:"")+(this.architecture==64?" 64-bit":"")}}),(ve=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Te))&&!/\bi686\b/i.test(Te)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+ve),"")),ee&&(/\bWOW64\b/i.test(b)||le&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(b))&&be.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ee=="Chrome"&&parseFloat(re)>=39&&(J.architecture=64),b||(b=null);var nt={};return nt.description=b,nt.layout=q&&q[0],nt.manufacturer=te,nt.name=ee,nt.prerelease=ue,nt.product=Ce,nt.ua=b,nt.version=ee&&re,nt.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=k,nt.toString=rt,nt.version&&be.unshift(re),nt.name&&be.unshift(ee),J&&ee&&!(J==String(J).split(" ")[0]&&(J==ee.split(" ")[0]||Ce))&&be.push(Ce?"("+J+")":"on "+J),be.length&&(nt.description=be.join(" ")),nt}var O=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=O,define(function(){return O})):u&&p?i(O,function(b,v){u[v]=b}):T.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Z,L){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?Z.exports={nextTick:d}:Z.exports=P;function d(T,D,u,p){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var C=arguments.length,E,l;switch(C){case 0:case 1:return P.nextTick(T);case 2:return P.nextTick(function(){T.call(null,D)});case 3:return P.nextTick(function(){T.call(null,D,u)});case 4:return P.nextTick(function(){T.call(null,D,u,p)});default:for(E=new Array(C-1),l=0;l<E.length;)E[l++]=arguments[l];return P.nextTick(function(){T.apply(null,E)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,Z,L){var P=Z.exports={},d,T;function D(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?d=setTimeout:d=D}catch(_){d=D}try{typeof clearTimeout=="function"?T=clearTimeout:T=u}catch(_){T=u}})();function p(_){if(d===setTimeout)return setTimeout(_,0);if((d===D||!d)&&setTimeout)return d=setTimeout,setTimeout(_,0);try{return d(_,0)}catch(y){try{return d.call(null,_,0)}catch(i){return d.call(this,_,0)}}}function C(_){if(T===clearTimeout)return clearTimeout(_);if((T===u||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(_);try{return T(_)}catch(y){try{return T.call(null,_)}catch(i){return T.call(this,_)}}}var E=[],l=!1,s,n=-1;function h(){if(!l||!s)return;l=!1,s.length?E=s.concat(E):n=-1,E.length&&f()}function f(){if(l)return;var _=p(h);l=!0;for(var y=E.length;y;){for(s=E,E=[];++n<y;)s&&s[n].run();n=-1,y=E.length}s=null,l=!1,C(_)}P.nextTick=function(_){var y=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)y[i-1]=arguments[i];E.push(new c(_,y)),E.length===1&&!l&&p(f)};function c(_,y){this.fun=_,this.array=y}c.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function m(){}P.on=m,P.addListener=m,P.once=m,P.off=m,P.removeListener=m,P.removeAllListeners=m,P.emit=m,P.prependListener=m,P.prependOnceListener=m,P.listeners=function(_){return[]},P.binding=function(_){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(_){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(j,Z,L){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(d){var T=typeof L=="object"&&L&&!L.nodeType&&L,D=typeof Z=="object"&&Z&&!Z.nodeType&&Z,u=typeof P=="object"&&P;(u.global===u||u.window===u||u.self===u)&&(d=u);var p,C=2147483647,E=36,l=1,s=26,n=38,h=700,f=72,c=128,m="-",_=/^xn--/,y=/[^\x20-\x7E]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=E-l,S=Math.floor,x=String.fromCharCode,o;function k(K){throw new RangeError(a[K])}function O(K,U){for(var B=K.length,V=[];B--;)V[B]=U(K[B]);return V}function b(K,U){var B=K.split("@"),V="";B.length>1&&(V=B[0]+"@",K=B[1]),K=K.replace(i,".");var ae=K.split("."),he=O(ae,U).join(".");return V+he}function v(K){for(var U=[],B=0,V=K.length,ae,he;B<V;)ae=K.charCodeAt(B++),ae>=55296&&ae<=56319&&B<V?(he=K.charCodeAt(B++),(he&64512)==56320?U.push(((ae&1023)<<10)+(he&1023)+65536):(U.push(ae),B--)):U.push(ae);return U}function g(K){return O(K,function(U){var B="";return U>65535&&(U-=65536,B+=x(U>>>10&1023|55296),U=56320|U&1023),B+=x(U),B}).join("")}function w(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:E}function M(K,U){return K+22+75*(K<26)-((U!=0)<<5)}function N(K,U,B){var V=0;for(K=B?S(K/h):K>>1,K+=S(K/U);K>t*s>>1;V+=E)K=S(K/t);return S(V+(t+1)*K/(K+n))}function I(K){var U=[],B=K.length,V,ae=0,he=c,pe=f,Re,ke,ve,Te,be,ue,le,re,fe;for(Re=K.lastIndexOf(m),Re<0&&(Re=0),ke=0;ke<Re;++ke)K.charCodeAt(ke)>=128&&k("not-basic"),U.push(K.charCodeAt(ke));for(ve=Re>0?Re+1:0;ve<B;){for(Te=ae,be=1,ue=E;!(ve>=B&&k("invalid-input"),le=w(K.charCodeAt(ve++)),(le>=E||le>S((C-ae)/be))&&k("overflow"),ae+=le*be,re=ue<=pe?l:ue>=pe+s?s:ue-pe,le<re);ue+=E)fe=E-re,be>S(C/fe)&&k("overflow"),be*=fe;V=U.length+1,pe=N(ae-Te,V,Te==0),S(ae/V)>C-he&&k("overflow"),he+=S(ae/V),ae%=V,U.splice(ae++,0,he)}return g(U)}function G(K){var U,B,V,ae,he,pe,Re,ke,ve,Te,be,ue=[],le,re,fe,q;for(K=v(K),le=K.length,U=c,B=0,he=f,pe=0;pe<le;++pe)be=K[pe],be<128&&ue.push(x(be));for(V=ae=ue.length,ae&&ue.push(m);V<le;){for(Re=C,pe=0;pe<le;++pe)be=K[pe],be>=U&&be<Re&&(Re=be);for(re=V+1,Re-U>S((C-B)/re)&&k("overflow"),B+=(Re-U)*re,U=Re,pe=0;pe<le;++pe)if(be=K[pe],be<U&&++B>C&&k("overflow"),be==U){for(ke=B,ve=E;!(Te=ve<=he?l:ve>=he+s?s:ve-he,ke<Te);ve+=E)q=ke-Te,fe=E-Te,ue.push(x(M(Te+q%fe,0))),ke=S(q/fe);ue.push(x(M(ke,0))),he=N(B,re,V==ae),B=0,++V}++B,++U}return ue.join("")}function z(K){return b(K,function(U){return _.test(U)?I(U.slice(4).toLowerCase()):U})}function H(K){return b(K,function(U){return y.test(U)?"xn--"+G(U):U})}if(p={version:"1.4.1",ucs2:{decode:v,encode:g},decode:I,encode:G,toASCII:H,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return p});else if(T&&D)if(Z.exports==T)D.exports=p;else for(o in p)p.hasOwnProperty(o)&&(T[o]=p[o]);else d.punycode=p})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,Z,L){"use strict";function P(T,D){return Object.prototype.hasOwnProperty.call(T,D)}Z.exports=function(T,D,u,p){D=D||"&",u=u||"=";var C={};if(typeof T!="string"||T.length===0)return C;var E=/\+/g;T=T.split(D);var l=1e3;p&&typeof p.maxKeys=="number"&&(l=p.maxKeys);var s=T.length;l>0&&s>l&&(s=l);for(var n=0;n<s;++n){var h=T[n].replace(E,"%20"),f=h.indexOf(u),c,m,_,y;f>=0?(c=h.substr(0,f),m=h.substr(f+1)):(c=h,m=""),_=decodeURIComponent(c),y=decodeURIComponent(m),P(C,_)?d(C[_])?C[_].push(y):C[_]=[C[_],y]:C[_]=y}return C};var d=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,Z,L){"use strict";var P=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};Z.exports=function(u,p,C,E){return p=p||"&",C=C||"=",u===null&&(u=void 0),typeof u=="object"?T(D(u),function(l){var s=encodeURIComponent(P(l))+C;return d(u[l])?T(u[l],function(n){return s+encodeURIComponent(P(n))}).join(p):s+encodeURIComponent(P(u[l]))}).join(p):E?encodeURIComponent(P(E))+C+encodeURIComponent(P(u)):""};var d=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function T(u,p){if(u.map)return u.map(p);for(var C=[],E=0;E<u.length;E++)C.push(p(u[E],E));return C}var D=Object.keys||function(u){var p=[];for(var C in u)Object.prototype.hasOwnProperty.call(u,C)&&p.push(C);return p}},{}],212:[function(j,Z,L){"use strict";L.decode=L.parse=j("./decode"),L.encode=L.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,Z,L){Z.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=u(P),T=j("babel-runtime/core-js/object/keys"),D=u(T);function u(y){return y&&y.__esModule?y:{default:y}}var p=j("process-nextick-args"),C=D.default||function(y){var i=[];for(var a in y)i.push(a);return i};Z.exports=c;var E=(0,d.default)(j("core-util-is"));E.inherits=j("inherits");var l=j("./_stream_readable"),s=j("./_stream_writable");E.inherits(c,l);for(var n=C(s.prototype),h=0;h<n.length;h++){var f=n[h];c.prototype[f]||(c.prototype[f]=s.prototype[f])}function c(y){if(!(this instanceof c))return new c(y);l.call(this,y),s.call(this,y),y&&y.readable===!1&&(this.readable=!1),y&&y.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,y&&y.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m(){if(this.allowHalfOpen||this._writableState.ended)return;p.nextTick(_,this)}function _(y){y.end()}Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(i){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=i,this._writableState.destroyed=i}}),c.prototype._destroy=function(y,i){this.push(null),this.end(),p.nextTick(i,y)}},{"./_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,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(C){return C&&C.__esModule?C:{default:C}}Z.exports=p;var D=j("./_stream_transform"),u=(0,d.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(p,D);function p(C){if(!(this instanceof p))return new p(C);D.call(this,C)}p.prototype._transform=function(C,E,l){l(null,C)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,Z,L){(function(P,d){"use strict";var T=j("babel-runtime/core-js/object/get-prototype-of"),D=C(T),u=j("babel-runtime/core-js/object/create"),p=C(u);function C(q){return q&&q.__esModule?q:{default:q}}var E=j("process-nextick-args");Z.exports=v;var l=j("isarray"),s;v.ReadableState=b;var n=j("events").EventEmitter,h=function(ee,Ce){return ee.listeners(Ce).length},f=j("./internal/streams/stream"),c=j("safe-buffer").Buffer,m=d.Uint8Array||function(){};function _(q){return c.from(q)}function y(q){return c.isBuffer(q)||q instanceof m}var i=(0,p.default)(j("core-util-is"));i.inherits=j("inherits");var a=j("util"),t=void 0;a&&a.debuglog?t=a.debuglog("stream"):t=function(){};var S=j("./internal/streams/BufferList"),x=j("./internal/streams/destroy"),o;i.inherits(v,f);var k=["error","close","destroy","pause","resume"];function O(q,ee,Ce){if(typeof q.prependListener=="function")return q.prependListener(ee,Ce);!q._events||!q._events[ee]?q.on(ee,Ce):l(q._events[ee])?q._events[ee].unshift(Ce):q._events[ee]=[Ce,q._events[ee]]}function b(q,ee){s=s||j("./_stream_duplex"),q=q||{};var Ce=ee instanceof s;this.objectMode=!!q.objectMode,Ce&&(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:Ce&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(o||(o=j("string_decoder/").StringDecoder),this.decoder=new o(q.encoding),this.encoding=q.encoding)}function v(q){if(s=s||j("./_stream_duplex"),!(this instanceof v))return new v(q);this._readableState=new b(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),f.call(this)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){if(!this._readableState)return;this._readableState.destroyed=ee}}),v.prototype.destroy=x.destroy,v.prototype._undestroy=x.undestroy,v.prototype._destroy=function(q,ee){this.push(null),ee(q)},v.prototype.push=function(q,ee){var Ce=this._readableState,te;return Ce.objectMode?te=!0:typeof q=="string"&&(ee=ee||Ce.defaultEncoding,ee!==Ce.encoding&&(q=c.from(q,ee),ee=""),te=!0),g(this,q,ee,!1,te)},v.prototype.unshift=function(q){return g(this,q,null,!0,!1)};function g(q,ee,Ce,te,J){var X=q._readableState;if(ee===null)X.reading=!1,H(q,X);else{var Q;J||(Q=M(X,ee)),Q?q.emit("error",Q):X.objectMode||ee&&ee.length>0?(typeof ee!="string"&&!X.objectMode&&(0,D.default)(ee)!==c.prototype&&(ee=_(ee)),te?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):w(q,X,ee,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ce?(ee=X.decoder.write(ee),X.objectMode||ee.length!==0?w(q,X,ee,!1):B(q,X)):w(q,X,ee,!1))):te||(X.reading=!1)}return N(X)}function w(q,ee,Ce,te){ee.flowing&&ee.length===0&&!ee.sync?(q.emit("data",Ce),q.read(0)):(ee.length+=ee.objectMode?1:Ce.length,te?ee.buffer.unshift(Ce):ee.buffer.push(Ce),ee.needReadable&&K(q)),B(q,ee)}function M(q,ee){var Ce;return!y(ee)&&typeof ee!="string"&&ee!==void 0&&!q.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function N(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}v.prototype.isPaused=function(){return this._readableState.flowing===!1},v.prototype.setEncoding=function(q){return o||(o=j("string_decoder/").StringDecoder),this._readableState.decoder=new o(q),this._readableState.encoding=q,this};var I=8388608;function G(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 z(q,ee){return q<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:q!==q?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(q>ee.highWaterMark&&(ee.highWaterMark=G(q)),q<=ee.length?q:ee.ended?ee.length:(ee.needReadable=!0,0))}v.prototype.read=function(q){t("read",q),q=parseInt(q,10);var ee=this._readableState,Ce=q;if(q!==0&&(ee.emittedReadable=!1),q===0&&ee.needReadable&&(ee.length>=ee.highWaterMark||ee.ended))return t("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?le(this):K(this),null;if(q=z(q,ee),q===0&&ee.ended)return ee.length===0&&le(this),null;var te=ee.needReadable;t("need readable",te),(ee.length===0||ee.length-q<ee.highWaterMark)&&(te=!0,t("length less than watermark",te)),ee.ended||ee.reading?(te=!1,t("reading or ended",te)):te&&(t("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(q=z(Ce,ee)));var J;return q>0?J=ve(q,ee):J=null,J===null?(ee.needReadable=!0,q=0):ee.length-=q,ee.length===0&&(ee.ended||(ee.needReadable=!0),Ce!==q&&ee.ended&&le(this)),J!==null&&this.emit("data",J),J};function H(q,ee){if(ee.ended)return;if(ee.decoder){var Ce=ee.decoder.end();Ce&&Ce.length&&(ee.buffer.push(Ce),ee.length+=ee.objectMode?1:Ce.length)}ee.ended=!0,K(q)}function K(q){var ee=q._readableState;ee.needReadable=!1,ee.emittedReadable||(t("emitReadable",ee.flowing),ee.emittedReadable=!0,ee.sync?E.nextTick(U,q):U(q))}function U(q){t("emit readable"),q.emit("readable"),ke(q)}function B(q,ee){ee.readingMore||(ee.readingMore=!0,E.nextTick(V,q,ee))}function V(q,ee){for(var Ce=ee.length;!ee.reading&&!ee.flowing&&!ee.ended&&ee.length<ee.highWaterMark&&!(t("maybeReadMore read 0"),q.read(0),Ce===ee.length);)Ce=ee.length;ee.readingMore=!1}v.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(q,ee){var Ce=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,ee);var J=(!ee||ee.end!==!1)&&q!==P.stdout&&q!==P.stderr,X=J?Ee:He;te.endEmitted?E.nextTick(X):Ce.once("end",X),q.on("unpipe",Q);function Q(De,at){t("onunpipe"),De===Ce&&(at&&at.hasUnpiped===!1&&(at.hasUnpiped=!0,Qe()))}function Ee(){t("onend"),q.end()}var ge=ae(Ce);q.on("drain",ge);var Oe=!1;function Qe(){t("cleanup"),q.removeListener("close",dt),q.removeListener("finish",mt),q.removeListener("drain",ge),q.removeListener("error",ut),q.removeListener("unpipe",Q),Ce.removeListener("end",Ee),Ce.removeListener("end",He),Ce.removeListener("data",nt),Oe=!0,te.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ge()}var rt=!1;Ce.on("data",nt);function nt(De){t("ondata"),rt=!1;var at=q.write(De);at===!1&&!rt&&((te.pipesCount===1&&te.pipes===q||te.pipesCount>1&&fe(te.pipes,q)!==-1)&&!Oe&&(t("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,rt=!0),Ce.pause())}function ut(De){t("onerror",De),He(),q.removeListener("error",ut),h(q,"error")===0&&q.emit("error",De)}O(q,"error",ut);function dt(){q.removeListener("finish",mt),He()}q.once("close",dt);function mt(){t("onfinish"),q.removeListener("close",dt),He()}q.once("finish",mt);function He(){t("unpipe"),Ce.unpipe(q)}return q.emit("pipe",Ce),te.flowing||(t("pipe resume"),Ce.resume()),q};function ae(q){return function(){var ee=q._readableState;t("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&h(q,"data")&&(ee.flowing=!0,ke(q))}}v.prototype.unpipe=function(q){var ee=this._readableState,Ce={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return q&&q!==ee.pipes?this:(q||(q=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,q&&q.emit("unpipe",this,Ce),this);if(!q){var te=ee.pipes,J=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var X=0;X<J;X++)te[X].emit("unpipe",this,Ce);return this}var Q=fe(ee.pipes,q);return Q===-1?this:(ee.pipes.splice(Q,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),q.emit("unpipe",this,Ce),this)},v.prototype.on=function(q,ee){var Ce=f.prototype.on.call(this,q,ee);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&&K(this):E.nextTick(he,this))}return Ce},v.prototype.addListener=v.prototype.on;function he(q){t("readable nexttick read 0"),q.read(0)}v.prototype.resume=function(){var q=this._readableState;return q.flowing||(t("resume"),q.flowing=!0,pe(this,q)),this};function pe(q,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,E.nextTick(Re,q,ee))}function Re(q,ee){ee.reading||(t("resume read 0"),q.read(0)),ee.resumeScheduled=!1,ee.awaitDrain=0,q.emit("resume"),ke(q),ee.flowing&&!ee.reading&&q.read(0)}v.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 ke(q){var ee=q._readableState;for(t("flow",ee.flowing);ee.flowing&&q.read()!==null;);}v.prototype.wrap=function(q){var ee=this,Ce=this._readableState,te=!1;q.on("end",function(){if(t("wrapped end"),Ce.decoder&&!Ce.ended){var Q=Ce.decoder.end();Q&&Q.length&&ee.push(Q)}ee.push(null)}),q.on("data",function(Q){if(t("wrapped data"),Ce.decoder&&(Q=Ce.decoder.write(Q)),Ce.objectMode&&Q==null)return;if(!Ce.objectMode&&(!Q||!Q.length))return;var Ee=ee.push(Q);Ee||(te=!0,q.pause())});for(var J in q)this[J]===void 0&&typeof q[J]=="function"&&(this[J]=function(Q){return function(){return q[Q].apply(q,arguments)}}(J));for(var X=0;X<k.length;X++)q.on(k[X],this.emit.bind(this,k[X]));return this._read=function(Q){t("wrapped _read",Q),te&&(te=!1,q.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=ve;function ve(q,ee){if(ee.length===0)return null;var Ce;return ee.objectMode?Ce=ee.buffer.shift():!q||q>=ee.length?(ee.decoder?Ce=ee.buffer.join(""):ee.buffer.length===1?Ce=ee.buffer.head.data:Ce=ee.buffer.concat(ee.length),ee.buffer.clear()):Ce=Te(q,ee.buffer,ee.decoder),Ce}function Te(q,ee,Ce){var te;return q<ee.head.data.length?(te=ee.head.data.slice(0,q),ee.head.data=ee.head.data.slice(q)):q===ee.head.data.length?te=ee.shift():te=Ce?be(q,ee):ue(q,ee),te}function be(q,ee){var Ce=ee.head,te=1,J=Ce.data;for(q-=J.length;Ce=Ce.next;){var X=Ce.data,Q=q>X.length?X.length:q;if(Q===X.length?J+=X:J+=X.slice(0,q),q-=Q,q===0){Q===X.length?(++te,Ce.next?ee.head=Ce.next:ee.head=ee.tail=null):(ee.head=Ce,Ce.data=X.slice(Q));break}++te}return ee.length-=te,J}function ue(q,ee){var Ce=c.allocUnsafe(q),te=ee.head,J=1;for(te.data.copy(Ce),q-=te.data.length;te=te.next;){var X=te.data,Q=q>X.length?X.length:q;if(X.copy(Ce,Ce.length-q,0,Q),q-=Q,q===0){Q===X.length?(++J,te.next?ee.head=te.next:ee.head=ee.tail=null):(ee.head=te,te.data=X.slice(Q));break}++J}return ee.length-=J,Ce}function le(q){var ee=q._readableState;if(ee.length>0)throw new Error('"endReadable()" called on non-empty stream');ee.endEmitted||(ee.ended=!0,E.nextTick(re,ee,q))}function re(q,ee){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ee.readable=!1,ee.emit("end"))}function fe(q,ee){for(var Ce=0,te=q.length;Ce<te;Ce++)if(q[Ce]===ee)return Ce;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,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(s){return s&&s.__esModule?s:{default:s}}Z.exports=C;var D=j("./_stream_duplex"),u=(0,d.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(C,D);function p(s,n){var h=this._transformState;h.transforming=!1;var f=h.writecb;if(!f)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,n!=null&&this.push(n),f(s);var c=this._readableState;c.reading=!1,(c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}function C(s){if(!(this instanceof C))return new C(s);D.call(this,s),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(typeof s.transform=="function"&&(this._transform=s.transform),typeof s.flush=="function"&&(this._flush=s.flush)),this.on("prefinish",E)}function E(){var s=this;typeof this._flush=="function"?this._flush(function(n,h){l(s,n,h)}):l(this,null,null)}C.prototype.push=function(s,n){return this._transformState.needTransform=!1,D.prototype.push.call(this,s,n)},C.prototype._transform=function(s,n,h){throw new Error("_transform() is not implemented")},C.prototype._write=function(s,n,h){var f=this._transformState;if(f.writecb=h,f.writechunk=s,f.writeencoding=n,!f.transforming){var c=this._readableState;(f.needTransform||c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}},C.prototype._read=function(s){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},C.prototype._destroy=function(s,n){var h=this;D.prototype._destroy.call(this,s,function(f){n(f),h.emit("close")})};function l(s,n,h){if(n)return s.emit("error",n);if(h!=null&&s.push(h),s._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(s._transformState.transforming)throw new Error("Calling transform done when still transforming");return s.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(j,Z,L){(function(P,d){"use strict";var T=j("babel-runtime/core-js/object/define-property"),D=f(T),u=j("babel-runtime/core-js/symbol/has-instance"),p=f(u),C=j("babel-runtime/core-js/symbol"),E=f(C),l=j("babel-runtime/core-js/object/create"),s=f(l),n=j("babel-runtime/core-js/set-immediate"),h=f(n);function f(ue){return ue&&ue.__esModule?ue:{default:ue}}var c=j("process-nextick-args");Z.exports=M;function m(ue,le,re){this.chunk=ue,this.encoding=le,this.callback=re,this.next=null}function _(ue){var le=this;this.next=null,this.entry=null,this.finish=function(){be(le,ue)}}var y=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?h.default:c.nextTick,i;M.WritableState=g;var a=(0,s.default)(j("core-util-is"));a.inherits=j("inherits");var t={deprecate:j("util-deprecate")},S=j("./internal/streams/stream"),x=j("safe-buffer").Buffer,o=d.Uint8Array||function(){};function k(ue){return x.from(ue)}function O(ue){return x.isBuffer(ue)||ue instanceof o}var b=j("./internal/streams/destroy");a.inherits(M,S);function v(){}function g(ue,le){i=i||j("./_stream_duplex"),ue=ue||{};var re=le instanceof i;this.objectMode=!!ue.objectMode,re&&(this.objectMode=this.objectMode||!!ue.writableObjectMode);var fe=ue.highWaterMark,q=ue.writableHighWaterMark,ee=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:re&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ee,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 Ce=ue.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=ue.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){B(le,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 _(this)}g.prototype.getBuffer=function(){for(var le=this.bufferedRequest,re=[];le;)re.push(le),le=le.next;return re},function(){try{Object.defineProperty(g.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ue){}}();var w;typeof E.default=="function"&&p.default&&typeof Function.prototype[p.default]=="function"?(w=Function.prototype[p.default],(0,D.default)(M,p.default,{value:function(le){return w.call(this,le)?!0:this!==M?!1:le&&le._writableState instanceof g}})):w=function(le){return le instanceof this};function M(ue){if(i=i||j("./_stream_duplex"),!w.call(M,this)&&!(this instanceof i))return new M(ue);this._writableState=new g(ue,this),this.writable=!0,ue&&(typeof ue.write=="function"&&(this._write=ue.write),typeof ue.writev=="function"&&(this._writev=ue.writev),typeof ue.destroy=="function"&&(this._destroy=ue.destroy),typeof ue.final=="function"&&(this._final=ue.final)),S.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ue,le){var re=new Error("write after end");ue.emit("error",re),c.nextTick(le,re)}function I(ue,le,re,fe){var q=!0,ee=!1;return re===null?ee=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!le.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(ue.emit("error",ee),c.nextTick(fe,ee),q=!1),q}M.prototype.write=function(ue,le,re){var fe=this._writableState,q=!1,ee=!fe.objectMode&&O(ue);return ee&&!x.isBuffer(ue)&&(ue=k(ue)),typeof le=="function"&&(re=le,le=null),ee?le="buffer":le||(le=fe.defaultEncoding),typeof re!="function"&&(re=v),fe.ended?N(this,re):(ee||I(this,fe,ue,re))&&(fe.pendingcb++,q=z(this,fe,ee,ue,le,re)),q},M.prototype.cork=function(){var ue=this._writableState;ue.corked++},M.prototype.uncork=function(){var ue=this._writableState;ue.corked&&(ue.corked--,!ue.writing&&!ue.corked&&!ue.finished&&!ue.bufferProcessing&&ue.bufferedRequest&&he(this,ue))},M.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function G(ue,le,re){return!ue.objectMode&&ue.decodeStrings!==!1&&typeof le=="string"&&(le=x.from(le,re)),le}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ue,le,re,fe,q,ee){if(!re){var Ce=G(le,fe,q);fe!==Ce&&(re=!0,q="buffer",fe=Ce)}var te=le.objectMode?1:fe.length;le.length+=te;var J=le.length<le.highWaterMark;if(J||(le.needDrain=!0),le.writing||le.corked){var X=le.lastBufferedRequest;le.lastBufferedRequest={chunk:fe,encoding:q,isBuf:re,callback:ee,next:null},X?X.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else H(ue,le,!1,te,fe,q,ee);return J}function H(ue,le,re,fe,q,ee,Ce){le.writelen=fe,le.writecb=Ce,le.writing=!0,le.sync=!0,re?ue._writev(q,le.onwrite):ue._write(q,ee,le.onwrite),le.sync=!1}function K(ue,le,re,fe,q){--le.pendingcb,re?(c.nextTick(q,fe),c.nextTick(ve,ue,le),ue._writableState.errorEmitted=!0,ue.emit("error",fe)):(q(fe),ue._writableState.errorEmitted=!0,ue.emit("error",fe),ve(ue,le))}function U(ue){ue.writing=!1,ue.writecb=null,ue.length-=ue.writelen,ue.writelen=0}function B(ue,le){var re=ue._writableState,fe=re.sync,q=re.writecb;if(U(re),le)K(ue,re,fe,le,q);else{var ee=pe(re);!ee&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&he(ue,re),fe?y(V,ue,re,ee,q):V(ue,re,ee,q)}}function V(ue,le,re,fe){re||ae(ue,le),le.pendingcb--,fe(),ve(ue,le)}function ae(ue,le){le.length===0&&le.needDrain&&(le.needDrain=!1,ue.emit("drain"))}function he(ue,le){le.bufferProcessing=!0;var re=le.bufferedRequest;if(ue._writev&&re&&re.next){var fe=le.bufferedRequestCount,q=new Array(fe),ee=le.corkedRequestsFree;ee.entry=re;for(var Ce=0,te=!0;re;)q[Ce]=re,re.isBuf||(te=!1),re=re.next,Ce+=1;q.allBuffers=te,H(ue,le,!0,le.length,q,"",ee.finish),le.pendingcb++,le.lastBufferedRequest=null,ee.next?(le.corkedRequestsFree=ee.next,ee.next=null):le.corkedRequestsFree=new _(le),le.bufferedRequestCount=0}else{for(;re;){var J=re.chunk,X=re.encoding,Q=re.callback,Ee=le.objectMode?1:J.length;if(H(ue,le,!1,Ee,J,X,Q),re=re.next,le.bufferedRequestCount--,le.writing)break}re===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=re,le.bufferProcessing=!1}M.prototype._write=function(ue,le,re){re(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(ue,le,re){var fe=this._writableState;typeof ue=="function"?(re=ue,ue=null,le=null):typeof le=="function"&&(re=le,le=null),ue!=null&&this.write(ue,le),fe.corked&&(fe.corked=1,this.uncork()),!fe.ending&&!fe.finished&&Te(this,fe,re)};function pe(ue){return ue.ending&&ue.length===0&&ue.bufferedRequest===null&&!ue.finished&&!ue.writing}function Re(ue,le){ue._final(function(re){le.pendingcb--,re&&ue.emit("error",re),le.prefinished=!0,ue.emit("prefinish"),ve(ue,le)})}function ke(ue,le){!le.prefinished&&!le.finalCalled&&(typeof ue._final=="function"?(le.pendingcb++,le.finalCalled=!0,c.nextTick(Re,ue,le)):(le.prefinished=!0,ue.emit("prefinish")))}function ve(ue,le){var re=pe(le);return re&&(ke(ue,le),le.pendingcb===0&&(le.finished=!0,ue.emit("finish"))),re}function Te(ue,le,re){le.ending=!0,ve(ue,le),re&&(le.finished?c.nextTick(re):ue.once("finish",re)),le.ended=!0,ue.writable=!1}function be(ue,le,re){var fe=ue.entry;for(ue.entry=null;fe;){var q=fe.callback;le.pendingcb--,q(re),fe=fe.next}le.corkedRequestsFree?le.corkedRequestsFree.next=ue:le.corkedRequestsFree=ue}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){if(!this._writableState)return;this._writableState.destroyed=le}}),M.prototype.destroy=b.destroy,M.prototype._undestroy=b.undestroy,M.prototype._destroy=function(ue,le){this.end(),le(ue)}}).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,Z,L){"use strict";function P(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}var d=j("safe-buffer").Buffer,T=j("util");function D(u,p,C){u.copy(p,C)}Z.exports=function(){function u(){P(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(C){var E={data:C,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length},u.prototype.unshift=function(C){var E={data:C,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length},u.prototype.shift=function(){if(this.length===0)return;var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(C){if(this.length===0)return"";for(var E=this.head,l=""+E.data;E=E.next;)l+=C+E.data;return l},u.prototype.concat=function(C){if(this.length===0)return d.alloc(0);if(this.length===1)return this.head.data;for(var E=d.allocUnsafe(C>>>0),l=this.head,s=0;l;)D(l.data,E,s),s+=l.data.length,l=l.next;return E},u}(),T&&T.inspect&&T.inspect.custom&&(Z.exports.prototype[T.inspect.custom]=function(){var u=T.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":228,util:71}],220:[function(j,Z,L){"use strict";var P=j("process-nextick-args");function d(u,p){var C=this,E=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return E||l?(p?p(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(D,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(s){!p&&s?(P.nextTick(D,C,s),C._writableState&&(C._writableState.errorEmitted=!0)):p&&p(s)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function D(u,p){u.emit("error",p)}Z.exports={destroy:d,undestroy:T}},{"process-nextick-args":207}],221:[function(j,Z,L){"use strict";Z.exports=j("events").EventEmitter},{events:192}],222:[function(j,Z,L){Z.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Z,L){L=Z.exports=j("./lib/_stream_readable.js"),L.Stream=L,L.Readable=L,L.Writable=j("./lib/_stream_writable.js"),L.Duplex=j("./lib/_stream_duplex.js"),L.Transform=j("./lib/_stream_transform.js"),L.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,Z,L){Z.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Z,L){Z.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Z,L){var P=function(){return this}()||Function("return this")(),d=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,T=d&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Z.exports=j("./runtime"),d)P.regeneratorRuntime=T;else try{delete P.regeneratorRuntime}catch(D){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Z,L){!function(P){"use strict";var d=Object.prototype,T=d.hasOwnProperty,D,u=typeof Symbol=="function"?Symbol:{},p=u.iterator||"@@iterator",C=u.asyncIterator||"@@asyncIterator",E=u.toStringTag||"@@toStringTag",l=typeof Z=="object",s=P.regeneratorRuntime;if(s){l&&(Z.exports=s);return}s=P.regeneratorRuntime=l?Z.exports:{};function n(z,H,K,U){var B=H&&H.prototype instanceof i?H:i,V=Object.create(B.prototype),ae=new N(U||[]);return V._invoke=v(z,K,ae),V}s.wrap=n;function h(z,H,K){try{return{type:"normal",arg:z.call(H,K)}}catch(U){return{type:"throw",arg:U}}}var f="suspendedStart",c="suspendedYield",m="executing",_="completed",y={};function i(){}function a(){}function t(){}var S={};S[p]=function(){return this};var x=Object.getPrototypeOf,o=x&&x(x(I([])));o&&o!==d&&T.call(o,p)&&(S=o);var k=t.prototype=i.prototype=Object.create(S);a.prototype=k.constructor=t,t.constructor=a,t[E]=a.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(H){z[H]=function(K){return this._invoke(H,K)}})}s.isGeneratorFunction=function(z){var H=typeof z=="function"&&z.constructor;return H?H===a||(H.displayName||H.name)==="GeneratorFunction":!1},s.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,t):(z.__proto__=t,E in z||(z[E]="GeneratorFunction")),z.prototype=Object.create(k),z},s.awrap=function(z){return{__await:z}};function b(z){function H(B,V,ae,he){var pe=h(z[B],z,V);if(pe.type==="throw")he(pe.arg);else{var Re=pe.arg,ke=Re.value;return ke&&typeof ke=="object"&&T.call(ke,"__await")?Promise.resolve(ke.__await).then(function(ve){H("next",ve,ae,he)},function(ve){H("throw",ve,ae,he)}):Promise.resolve(ke).then(function(ve){Re.value=ve,ae(Re)},he)}}var K;function U(B,V){function ae(){return new Promise(function(he,pe){H(B,V,he,pe)})}return K=K?K.then(ae,ae):ae()}this._invoke=U}O(b.prototype),b.prototype[C]=function(){return this},s.AsyncIterator=b,s.async=function(z,H,K,U){var B=new b(n(z,H,K,U));return s.isGeneratorFunction(H)?B:B.next().then(function(V){return V.done?V.value:B.next()})};function v(z,H,K){var U=f;return function(V,ae){if(U===m)throw new Error("Generator is already running");if(U===_){if(V==="throw")throw ae;return G()}for(K.method=V,K.arg=ae;;){var he=K.delegate;if(he){var pe=g(he,K);if(pe){if(pe===y)continue;return pe}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(U===f)throw U=_,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);U=m;var Re=h(z,H,K);if(Re.type==="normal"){if(U=K.done?_:c,Re.arg===y)continue;return{value:Re.arg,done:K.done}}else Re.type==="throw"&&(U=_,K.method="throw",K.arg=Re.arg)}}}function g(z,H){var K=z.iterator[H.method];if(K===D){if(H.delegate=null,H.method==="throw"){if(z.iterator.return&&(H.method="return",H.arg=D,g(z,H),H.method==="throw"))return y;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var U=h(K,z.iterator,H.arg);if(U.type==="throw")return H.method="throw",H.arg=U.arg,H.delegate=null,y;var B=U.arg;if(!B)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,y;if(B.done)H[z.resultName]=B.value,H.next=z.nextLoc,H.method!=="return"&&(H.method="next",H.arg=D);else return B;return H.delegate=null,y}O(k),k[E]="Generator",k[p]=function(){return this},k.toString=function(){return"[object Generator]"};function w(z){var H={tryLoc:z[0]};1 in z&&(H.catchLoc=z[1]),2 in z&&(H.finallyLoc=z[2],H.afterLoc=z[3]),this.tryEntries.push(H)}function M(z){var H=z.completion||{};H.type="normal",delete H.arg,z.completion=H}function N(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(w,this),this.reset(!0)}s.keys=function(z){var H=[];for(var K in z)H.push(K);return H.reverse(),function U(){for(;H.length;){var B=H.pop();if(B in z)return U.value=B,U.done=!1,U}return U.done=!0,U}};function I(z){if(z){var H=z[p];if(H)return H.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var K=-1,U=function B(){for(;++K<z.length;)if(T.call(z,K))return B.value=z[K],B.done=!1,B;return B.value=D,B.done=!0,B};return U.next=U}}return{next:G}}s.values=I;function G(){return{value:D,done:!0}}N.prototype={constructor:N,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=D,this.done=!1,this.delegate=null,this.method="next",this.arg=D,this.tryEntries.forEach(M),!z)for(var H in this)H.charAt(0)==="t"&&T.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=D)},stop:function(){this.done=!0;var z=this.tryEntries[0],H=z.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var H=this;function K(pe,Re){return V.type="throw",V.arg=z,H.next=pe,Re&&(H.method="next",H.arg=D),!!Re}for(var U=this.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],V=B.completion;if(B.tryLoc==="root")return K("end");if(B.tryLoc<=this.prev){var ae=T.call(B,"catchLoc"),he=T.call(B,"finallyLoc");if(ae&&he){if(this.prev<B.catchLoc)return K(B.catchLoc,!0);if(this.prev<B.finallyLoc)return K(B.finallyLoc)}else if(ae){if(this.prev<B.catchLoc)return K(B.catchLoc,!0)}else if(he){if(this.prev<B.finallyLoc)return K(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,H){for(var K=this.tryEntries.length-1;K>=0;--K){var U=this.tryEntries[K];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var B=U;break}}B&&(z==="break"||z==="continue")&&B.tryLoc<=H&&H<=B.finallyLoc&&(B=null);var V=B?B.completion:{};return V.type=z,V.arg=H,B?(this.method="next",this.next=B.finallyLoc,y):this.complete(V)},complete:function(z,H){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&H&&(this.next=H),y},finish:function(z){for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H];if(K.finallyLoc===z)return this.complete(K.completion,K.afterLoc),M(K),y}},catch:function(z){for(var H=this.tryEntries.length-1;H>=0;--H){var K=this.tryEntries[H];if(K.tryLoc===z){var U=K.completion;if(U.type==="throw"){var B=U.arg;M(K)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(z,H,K){return this.delegate={iterator:I(z),resultName:H,nextLoc:K},this.method==="next"&&(this.arg=D),y}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Z,L){var P=j("buffer"),d=P.Buffer;function T(u,p){for(var C in u)p[C]=u[C]}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?Z.exports=P:(T(P,L),L.Buffer=D);function D(u,p,C){return d(u,p,C)}T(d,D),D.from=function(u,p,C){if(typeof u=="number")throw new TypeError("Argument must not be a number");return d(u,p,C)},D.alloc=function(u,p,C){if(typeof u!="number")throw new TypeError("Argument must be a number");var E=d(u);return p!==void 0?typeof C=="string"?E.fill(p,C):E.fill(p):E.fill(0),E},D.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return d(u)},D.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(u)}},{buffer:73}],229:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/core-js/string/from-code-point"),T=c(d),D=j("babel-runtime/core-js/json/stringify"),u=c(D),p=j("babel-runtime/helpers/typeof"),C=c(p),E=j("babel-runtime/core-js/object/define-property"),l=c(E),s=j("babel-runtime/core-js/object/keys"),n=c(s),h=j("babel-runtime/core-js/object/create"),f=c(h);function c(m){return m&&m.__esModule?m:{default:m}}(function(m){m.parser=function(X,Q){return new y(X,Q)},m.SAXParser=y,m.SAXStream=k,m.createStream=o,m.MAX_BUFFER_LENGTH=64*1024;var _=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];m.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function y(X,Q){if(!(this instanceof y))return new y(X,Q);var Ee=this;a(Ee),Ee.q=Ee.c="",Ee.bufferCheckPosition=m.MAX_BUFFER_LENGTH,Ee.opt=Q||{},Ee.opt.lowercase=Ee.opt.lowercase||Ee.opt.lowercasetags,Ee.looseCase=Ee.opt.lowercase?"toLowerCase":"toUpperCase",Ee.tags=[],Ee.closed=Ee.closedRoot=Ee.sawRoot=!1,Ee.tag=Ee.error=null,Ee.strict=!!X,Ee.noscript=!!(X||Ee.opt.noscript),Ee.state=V.BEGIN,Ee.strictEntities=Ee.opt.strictEntities,Ee.ENTITIES=Ee.strictEntities?(0,f.default)(m.XML_ENTITIES):(0,f.default)(m.ENTITIES),Ee.attribList=[],Ee.opt.xmlns&&(Ee.ns=(0,f.default)(w)),Ee.trackPosition=Ee.opt.position!==!1,Ee.trackPosition&&(Ee.position=Ee.line=Ee.column=0),he(Ee,"onready")}f.default||(Object.create=function(X){function Q(){}Q.prototype=X;var Ee=new Q;return Ee}),n.default||(Object.keys=function(X){var Q=[];for(var Ee in X)X.hasOwnProperty(Ee)&&Q.push(Ee);return Q});function i(X){for(var Q=Math.max(m.MAX_BUFFER_LENGTH,10),Ee=0,ge=0,Oe=_.length;ge<Oe;ge++){var Qe=X[_[ge]].length;if(Qe>Q)switch(_[ge]){case"textNode":Re(X);break;case"cdata":pe(X,"oncdata",X.cdata),X.cdata="";break;case"script":pe(X,"onscript",X.script),X.script="";break;default:ve(X,"Max buffer length exceeded: "+_[ge])}Ee=Math.max(Ee,Qe)}var rt=m.MAX_BUFFER_LENGTH-Ee;X.bufferCheckPosition=rt+X.position}function a(X){for(var Q=0,Ee=_.length;Q<Ee;Q++)X[_[Q]]=""}function t(X){Re(X),X.cdata!==""&&(pe(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(pe(X,"onscript",X.script),X.script="")}y.prototype={end:function(){Te(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var S;try{S=j("stream").Stream}catch(X){S=function(){}}var x=m.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function o(X,Q){return new k(X,Q)}function k(X,Q){if(!(this instanceof k))return new k(X,Q);S.apply(this),this._parser=new y(X,Q),this.writable=!0,this.readable=!0;var Ee=this;this._parser.onend=function(){Ee.emit("end")},this._parser.onerror=function(ge){Ee.emit("error",ge),Ee._parser.error=null},this._decoder=null,x.forEach(function(ge){(0,l.default)(Ee,"on"+ge,{get:function(){return Ee._parser["on"+ge]},set:function(Qe){if(!Qe)return Ee.removeAllListeners(ge),Ee._parser["on"+ge]=Qe,Qe;Ee.on(ge,Qe)},enumerable:!0,configurable:!1})})}k.prototype=(0,f.default)(S.prototype,{constructor:{value:k}}),k.prototype.write=function(X){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer(X)){if(!this._decoder){var Q=j("string_decoder").StringDecoder;this._decoder=new Q("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},k.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},k.prototype.on=function(X,Q){var Ee=this;return!Ee._parser["on"+X]&&x.indexOf(X)!==-1&&(Ee._parser["on"+X]=function(){var ge=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ge.splice(0,0,X),Ee.emit.apply(Ee,ge)}),S.prototype.on.call(Ee,X,Q)};var O="[CDATA[",b="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",w={xml:v,xmlns:g},M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,I=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function z(X){return X===" "||X===`
`||X==="\r"||X===" "}function H(X){return X==='"'||X==="'"}function K(X){return X===">"||z(X)}function U(X,Q){return X.test(Q)}function B(X,Q){return!U(X,Q)}var V=0;m.STATE={BEGIN:V++,BEGIN_WHITESPACE:V++,TEXT:V++,TEXT_ENTITY:V++,OPEN_WAKA:V++,SGML_DECL:V++,SGML_DECL_QUOTED:V++,DOCTYPE:V++,DOCTYPE_QUOTED:V++,DOCTYPE_DTD:V++,DOCTYPE_DTD_QUOTED:V++,COMMENT_STARTING:V++,COMMENT:V++,COMMENT_ENDING:V++,COMMENT_ENDED:V++,CDATA:V++,CDATA_ENDING:V++,CDATA_ENDING_2:V++,PROC_INST:V++,PROC_INST_BODY:V++,PROC_INST_ENDING:V++,OPEN_TAG:V++,OPEN_TAG_SLASH:V++,ATTRIB:V++,ATTRIB_NAME:V++,ATTRIB_NAME_SAW_WHITE:V++,ATTRIB_VALUE:V++,ATTRIB_VALUE_QUOTED:V++,ATTRIB_VALUE_CLOSED:V++,ATTRIB_VALUE_UNQUOTED:V++,ATTRIB_VALUE_ENTITY_Q:V++,ATTRIB_VALUE_ENTITY_U:V++,CLOSE_TAG:V++,CLOSE_TAG_SAW_WHITE:V++,SCRIPT:V++,SCRIPT_ENDING:V++},m.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},m.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)(m.ENTITIES).forEach(function(X){var Q=m.ENTITIES[X],Ee=typeof Q=="number"?String.fromCharCode(Q):Q;m.ENTITIES[X]=Ee});for(var ae in m.STATE)m.STATE[m.STATE[ae]]=ae;V=m.STATE;function he(X,Q,Ee){X[Q]&&X[Q](Ee)}function pe(X,Q,Ee){X.textNode&&Re(X),he(X,Q,Ee)}function Re(X){X.textNode=ke(X.opt,X.textNode),X.textNode&&he(X,"ontext",X.textNode),X.textNode=""}function ke(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function ve(X,Q){return Re(X),X.trackPosition&&(Q+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Q=new Error(Q),X.error=Q,he(X,"onerror",Q),X}function Te(X){return X.sawRoot&&!X.closedRoot&&be(X,"Unclosed root tag"),X.state!==V.BEGIN&&X.state!==V.BEGIN_WHITESPACE&&X.state!==V.TEXT&&ve(X,"Unexpected end"),Re(X),X.c="",X.closed=!0,he(X,"onend"),y.call(X,X.strict,X.opt),X}function be(X,Q){if((typeof X=="undefined"?"undefined":(0,C.default)(X))!=="object"||!(X instanceof y))throw new Error("bad call to strictFail");X.strict&&ve(X,Q)}function ue(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,Ee=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(Ee.ns=Q.ns),X.attribList.length=0,pe(X,"onopentagstart",Ee)}function le(X,Q){var Ee=X.indexOf(":"),ge=Ee<0?["",X]:X.split(":"),Oe=ge[0],Qe=ge[1];return Q&&X==="xmlns"&&(Oe="xmlns",Qe=""),{prefix:Oe,local:Qe}}function re(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 Q=le(X.attribName,!0),Ee=Q.prefix,ge=Q.local;if(Ee==="xmlns")if(ge==="xml"&&X.attribValue!==v)be(X,"xml: prefix must be bound to "+v+`
Actual: `+X.attribValue);else if(ge==="xmlns"&&X.attribValue!==g)be(X,"xmlns: prefix must be bound to "+g+`
Actual: `+X.attribValue);else{var Oe=X.tag,Qe=X.tags[X.tags.length-1]||X;Oe.ns===Qe.ns&&(Oe.ns=(0,f.default)(Qe.ns)),Oe.ns[ge]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,pe(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function fe(X,Q){if(X.opt.xmlns){var Ee=X.tag,ge=le(X.tagName);Ee.prefix=ge.prefix,Ee.local=ge.local,Ee.uri=Ee.ns[ge.prefix]||"",Ee.prefix&&!Ee.uri&&(be(X,"Unbound namespace prefix: "+(0,u.default)(X.tagName)),Ee.uri=ge.prefix);var Oe=X.tags[X.tags.length-1]||X;Ee.ns&&Oe.ns!==Ee.ns&&(0,n.default)(Ee.ns).forEach(function(Ze){pe(X,"onopennamespace",{prefix:Ze,uri:Ee.ns[Ze]})});for(var Qe=0,rt=X.attribList.length;Qe<rt;Qe++){var nt=X.attribList[Qe],ut=nt[0],dt=nt[1],mt=le(ut,!0),He=mt.prefix,De=mt.local,at=He===""?"":Ee.ns[He]||"",ht={name:ut,value:dt,prefix:He,local:De,uri:at};He&&He!=="xmlns"&&!at&&(be(X,"Unbound namespace prefix: "+(0,u.default)(He)),ht.uri=He),X.tag.attributes[ut]=ht,pe(X,"onattribute",ht)}X.attribList.length=0}X.tag.isSelfClosing=!!Q,X.sawRoot=!0,X.tags.push(X.tag),pe(X,"onopentag",X.tag),Q||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=V.SCRIPT:X.state=V.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function q(X){if(!X.tagName){be(X,"Weird empty close tag."),X.textNode+="</>",X.state=V.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=V.SCRIPT;return}pe(X,"onscript",X.script),X.script=""}var Q=X.tags.length,Ee=X.tagName;X.strict||(Ee=Ee[X.looseCase]());for(var ge=Ee;Q--;){var Oe=X.tags[Q];if(Oe.name!==ge)be(X,"Unexpected close tag");else break}if(Q<0){be(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=V.TEXT;return}X.tagName=Ee;for(var Qe=X.tags.length;Qe-- >Q;){var rt=X.tag=X.tags.pop();X.tagName=X.tag.name,pe(X,"onclosetag",X.tagName);var nt={};for(var ut in rt.ns)nt[ut]=rt.ns[ut];var dt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&rt.ns!==dt.ns&&(0,n.default)(rt.ns).forEach(function(mt){var He=rt.ns[mt];pe(X,"onclosenamespace",{prefix:mt,uri:He})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=V.TEXT}function ee(X){var Q=X.entity,Ee=Q.toLowerCase(),ge,Oe="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[Ee]?X.ENTITIES[Ee]:(Q=Ee,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ge=parseInt(Q,16),Oe=ge.toString(16)):(Q=Q.slice(1),ge=parseInt(Q,10),Oe=ge.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ge)||Oe.toLowerCase()!==Q?(be(X,"Invalid character entity"),"&"+X.entity+";"):(0,T.default)(ge))}function Ce(X,Q){Q==="<"?(X.state=V.OPEN_WAKA,X.startTagPosition=X.position):z(Q)||(be(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=V.TEXT)}function te(X,Q){var Ee="";return Q<X.length&&(Ee=X.charAt(Q)),Ee}function J(X){var Q=this;if(this.error)throw this.error;if(Q.closed)return ve(Q,"Cannot write after close. Assign an onready handler.");if(X===null)return Te(Q);(typeof X=="undefined"?"undefined":(0,C.default)(X))==="object"&&(X=X.toString());for(var Ee=0,ge="";!(ge=te(X,Ee++),Q.c=ge,!ge);){Q.trackPosition&&(Q.position++,ge===`
`?(Q.line++,Q.column=0):Q.column++);switch(Q.state){case V.BEGIN:if(Q.state=V.BEGIN_WHITESPACE,ge==="\uFEFF")continue;Ce(Q,ge);continue;case V.BEGIN_WHITESPACE:Ce(Q,ge);continue;case V.TEXT:if(Q.sawRoot&&!Q.closedRoot){for(var Oe=Ee-1;ge&&ge!=="<"&&ge!=="&";)ge=te(X,Ee++),ge&&Q.trackPosition&&(Q.position++,ge===`
`?(Q.line++,Q.column=0):Q.column++);Q.textNode+=X.substring(Oe,Ee-1)}ge==="<"&&!(Q.sawRoot&&Q.closedRoot&&!Q.strict)?(Q.state=V.OPEN_WAKA,Q.startTagPosition=Q.position):(!z(ge)&&(!Q.sawRoot||Q.closedRoot)&&be(Q,"Text data outside of root node."),ge==="&"?Q.state=V.TEXT_ENTITY:Q.textNode+=ge);continue;case V.SCRIPT:ge==="<"?Q.state=V.SCRIPT_ENDING:Q.script+=ge;continue;case V.SCRIPT_ENDING:ge==="/"?Q.state=V.CLOSE_TAG:(Q.script+="<"+ge,Q.state=V.SCRIPT);continue;case V.OPEN_WAKA:if(ge==="!")Q.state=V.SGML_DECL,Q.sgmlDecl="";else if(!z(ge))if(U(M,ge))Q.state=V.OPEN_TAG,Q.tagName=ge;else if(ge==="/")Q.state=V.CLOSE_TAG,Q.tagName="";else if(ge==="?")Q.state=V.PROC_INST,Q.procInstName=Q.procInstBody="";else{if(be(Q,"Unencoded <"),Q.startTagPosition+1<Q.position){var Qe=Q.position-Q.startTagPosition;ge=new Array(Qe).join(" ")+ge}Q.textNode+="<"+ge,Q.state=V.TEXT}continue;case V.SGML_DECL:(Q.sgmlDecl+ge).toUpperCase()===O?(pe(Q,"onopencdata"),Q.state=V.CDATA,Q.sgmlDecl="",Q.cdata=""):Q.sgmlDecl+ge==="--"?(Q.state=V.COMMENT,Q.comment="",Q.sgmlDecl=""):(Q.sgmlDecl+ge).toUpperCase()===b?(Q.state=V.DOCTYPE,(Q.doctype||Q.sawRoot)&&be(Q,"Inappropriately located doctype declaration"),Q.doctype="",Q.sgmlDecl=""):ge===">"?(pe(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=V.TEXT):(H(ge)&&(Q.state=V.SGML_DECL_QUOTED),Q.sgmlDecl+=ge);continue;case V.SGML_DECL_QUOTED:ge===Q.q&&(Q.state=V.SGML_DECL,Q.q=""),Q.sgmlDecl+=ge;continue;case V.DOCTYPE:ge===">"?(Q.state=V.TEXT,pe(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ge,ge==="["?Q.state=V.DOCTYPE_DTD:H(ge)&&(Q.state=V.DOCTYPE_QUOTED,Q.q=ge));continue;case V.DOCTYPE_QUOTED:Q.doctype+=ge,ge===Q.q&&(Q.q="",Q.state=V.DOCTYPE);continue;case V.DOCTYPE_DTD:Q.doctype+=ge,ge==="]"?Q.state=V.DOCTYPE:H(ge)&&(Q.state=V.DOCTYPE_DTD_QUOTED,Q.q=ge);continue;case V.DOCTYPE_DTD_QUOTED:Q.doctype+=ge,ge===Q.q&&(Q.state=V.DOCTYPE_DTD,Q.q="");continue;case V.COMMENT:ge==="-"?Q.state=V.COMMENT_ENDING:Q.comment+=ge;continue;case V.COMMENT_ENDING:ge==="-"?(Q.state=V.COMMENT_ENDED,Q.comment=ke(Q.opt,Q.comment),Q.comment&&pe(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ge,Q.state=V.COMMENT);continue;case V.COMMENT_ENDED:ge!==">"?(be(Q,"Malformed comment"),Q.comment+="--"+ge,Q.state=V.COMMENT):Q.state=V.TEXT;continue;case V.CDATA:ge==="]"?Q.state=V.CDATA_ENDING:Q.cdata+=ge;continue;case V.CDATA_ENDING:ge==="]"?Q.state=V.CDATA_ENDING_2:(Q.cdata+="]"+ge,Q.state=V.CDATA);continue;case V.CDATA_ENDING_2:ge===">"?(Q.cdata&&pe(Q,"oncdata",Q.cdata),pe(Q,"onclosecdata"),Q.cdata="",Q.state=V.TEXT):ge==="]"?Q.cdata+="]":(Q.cdata+="]]"+ge,Q.state=V.CDATA);continue;case V.PROC_INST:ge==="?"?Q.state=V.PROC_INST_ENDING:z(ge)?Q.state=V.PROC_INST_BODY:Q.procInstName+=ge;continue;case V.PROC_INST_BODY:if(!Q.procInstBody&&z(ge))continue;ge==="?"?Q.state=V.PROC_INST_ENDING:Q.procInstBody+=ge;continue;case V.PROC_INST_ENDING:ge===">"?(pe(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=V.TEXT):(Q.procInstBody+="?"+ge,Q.state=V.PROC_INST_BODY);continue;case V.OPEN_TAG:U(N,ge)?Q.tagName+=ge:(ue(Q),ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:(z(ge)||be(Q,"Invalid character in tag name"),Q.state=V.ATTRIB));continue;case V.OPEN_TAG_SLASH:ge===">"?(fe(Q,!0),q(Q)):(be(Q,"Forward-slash in opening tag not followed by >"),Q.state=V.ATTRIB);continue;case V.ATTRIB:if(z(ge))continue;ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:U(M,ge)?(Q.attribName=ge,Q.attribValue="",Q.state=V.ATTRIB_NAME):be(Q,"Invalid attribute name");continue;case V.ATTRIB_NAME:ge==="="?Q.state=V.ATTRIB_VALUE:ge===">"?(be(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),fe(Q)):z(ge)?Q.state=V.ATTRIB_NAME_SAW_WHITE:U(N,ge)?Q.attribName+=ge:be(Q,"Invalid attribute name");continue;case V.ATTRIB_NAME_SAW_WHITE:if(ge==="=")Q.state=V.ATTRIB_VALUE;else{if(z(ge))continue;be(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",pe(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ge===">"?fe(Q):U(M,ge)?(Q.attribName=ge,Q.state=V.ATTRIB_NAME):(be(Q,"Invalid attribute name"),Q.state=V.ATTRIB)}continue;case V.ATTRIB_VALUE:if(z(ge))continue;H(ge)?(Q.q=ge,Q.state=V.ATTRIB_VALUE_QUOTED):(be(Q,"Unquoted attribute value"),Q.state=V.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ge);continue;case V.ATTRIB_VALUE_QUOTED:if(ge!==Q.q){ge==="&"?Q.state=V.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ge;continue}re(Q),Q.q="",Q.state=V.ATTRIB_VALUE_CLOSED;continue;case V.ATTRIB_VALUE_CLOSED:z(ge)?Q.state=V.ATTRIB:ge===">"?fe(Q):ge==="/"?Q.state=V.OPEN_TAG_SLASH:U(M,ge)?(be(Q,"No whitespace between attributes"),Q.attribName=ge,Q.attribValue="",Q.state=V.ATTRIB_NAME):be(Q,"Invalid attribute name");continue;case V.ATTRIB_VALUE_UNQUOTED:if(!K(ge)){ge==="&"?Q.state=V.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ge;continue}re(Q),ge===">"?fe(Q):Q.state=V.ATTRIB;continue;case V.CLOSE_TAG:if(Q.tagName)ge===">"?q(Q):U(N,ge)?Q.tagName+=ge:Q.script?(Q.script+="</"+Q.tagName,Q.tagName="",Q.state=V.SCRIPT):(z(ge)||be(Q,"Invalid tagname in closing tag"),Q.state=V.CLOSE_TAG_SAW_WHITE);else{if(z(ge))continue;B(M,ge)?Q.script?(Q.script+="</"+ge,Q.state=V.SCRIPT):be(Q,"Invalid tagname in closing tag."):Q.tagName=ge}continue;case V.CLOSE_TAG_SAW_WHITE:if(z(ge))continue;ge===">"?q(Q):be(Q,"Invalid characters in closing tag");continue;case V.TEXT_ENTITY:case V.ATTRIB_VALUE_ENTITY_Q:case V.ATTRIB_VALUE_ENTITY_U:var rt,nt;switch(Q.state){case V.TEXT_ENTITY:rt=V.TEXT,nt="textNode";break;case V.ATTRIB_VALUE_ENTITY_Q:rt=V.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case V.ATTRIB_VALUE_ENTITY_U:rt=V.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ge===";"?(Q[nt]+=ee(Q),Q.entity="",Q.state=rt):U(Q.entity.length?G:I,ge)?Q.entity+=ge:(be(Q,"Invalid character in entity name"),Q[nt]+="&"+Q.entity+ge,Q.entity="",Q.state=rt);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&i(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var X=String.fromCharCode,Q=Math.floor,Ee=function(){var Oe=16384,Qe=[],rt,nt,ut=-1,dt=arguments.length;if(!dt)return"";for(var mt="";++ut<dt;){var He=Number(arguments[ut]);if(!isFinite(He)||He<0||He>1114111||Q(He)!==He)throw RangeError("Invalid code point: "+He);He<=65535?Qe.push(He):(He-=65536,rt=(He>>10)+55296,nt=He%1024+56320,Qe.push(rt,nt)),(ut+1===dt||Qe.length>Oe)&&(mt+=X.apply(null,Qe),Qe.length=0)}return mt};l.default?Object.defineProperty(String,"fromCodePoint",{value:Ee,configurable:!0,writable:!0}):String.fromCodePoint=Ee}()})(typeof L=="undefined"?(void 0).sax={}:L)}).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,Z,L){Z.exports=T;var P=j("events").EventEmitter,d=j("inherits");d(T,P),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){P.call(this)}T.prototype.pipe=function(D,u){var p=this;function C(c){D.writable&&(D.write(c)===!1&&p.pause&&p.pause())}p.on("data",C);function E(){p.readable&&p.resume&&p.resume()}D.on("drain",E),!D._isStdio&&(!u||u.end!==!1)&&(p.on("end",s),p.on("close",n));var l=!1;function s(){if(l)return;l=!0,D.end()}function n(){if(l)return;l=!0,typeof D.destroy=="function"&&D.destroy()}function h(c){if(f(),P.listenerCount(this,"error")===0)throw c}p.on("error",h),D.on("error",h);function f(){p.removeListener("data",C),D.removeListener("drain",E),p.removeListener("end",s),p.removeListener("close",n),p.removeListener("error",h),D.removeListener("error",h),p.removeListener("end",f),p.removeListener("close",f),D.removeListener("close",f)}return p.on("end",f),p.on("close",f),D.on("close",f),D.emit("pipe",p),D}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(j,Z,L){(function(P){var d=j("./lib/request"),T=j("./lib/response"),D=j("xtend"),u=j("builtin-status-codes"),p=j("url"),C=L;C.request=function(E,l){typeof E=="string"?E=p.parse(E):E=D(E);var s=P.location.protocol.search(/^https?:$/)===-1?"http:":"",n=E.protocol||s,h=E.hostname||E.host,f=E.port,c=E.path||"/";h&&h.indexOf(":")!==-1&&(h="["+h+"]"),E.url=(h?n+"//"+h:"")+(f?":"+f:"")+c,E.method=(E.method||"GET").toUpperCase(),E.headers=E.headers||{};var m=new d(E);return l&&m.on("response",l),m},C.get=function(l,s){var n=C.request(l,s);return n.end(),n},C.ClientRequest=d,C.IncomingMessage=T.IncomingMessage,C.Agent=function(){},C.Agent.defaultMaxSockets=4,C.globalAgent=new C.Agent,C.STATUS_CODES=u,C.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,Z,L){(function(P){"use strict";L.fetch=C(P.fetch)&&C(P.ReadableStream),L.writableStream=C(P.WritableStream),L.abortController=C(P.AbortController),L.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),L.blobConstructor=!0}catch(E){}var d;function T(){if(d!==void 0)return d;if(P.XMLHttpRequest){d=new P.XMLHttpRequest;try{d.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(E){d=null}}else d=null;return d}function D(E){var l=T();if(!l)return!1;try{return l.responseType=E,l.responseType===E}catch(s){}return!1}var u=typeof P.ArrayBuffer!="undefined",p=u&&C(P.ArrayBuffer.prototype.slice);L.arraybuffer=L.fetch||u&&D("arraybuffer"),L.msstream=!L.fetch&&p&&D("ms-stream"),L.mozchunkedarraybuffer=!L.fetch&&u&&D("moz-chunked-arraybuffer"),L.overrideMimeType=L.fetch||(T()?C(T().overrideMimeType):!1),L.vbArray=C(P.VBArray);function C(E){return typeof E=="function"}d=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Z,L){(function(P,d,T){"use strict";var D=j("babel-runtime/core-js/object/keys"),u=p(D);function p(i){return i&&i.__esModule?i:{default:i}}var C=j("./capability"),E=j("inherits"),l=j("./response"),s=j("readable-stream"),n=j("to-arraybuffer"),h=l.IncomingMessage,f=l.readyStates;function c(i,a){return C.fetch&&a?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&i?"arraybuffer":C.vbArray&&i?"text:vbarray":"text"}var m=Z.exports=function(i){var a=this;s.Writable.call(a),a._opts=i,a._body=[],a._headers={},i.auth&&a.setHeader("Authorization","Basic "+new T(i.auth).toString("base64")),(0,u.default)(i.headers).forEach(function(x){a.setHeader(x,i.headers[x])});var t,S=!0;if(i.mode==="disable-fetch"||"requestTimeout"in i&&!C.abortController)S=!1,t=!0;else if(i.mode==="prefer-streaming")t=!1;else if(i.mode==="allow-wrong-content-type")t=!C.overrideMimeType;else if(!i.mode||i.mode==="default"||i.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");a._mode=c(t,S),a._fetchTimer=null,a.on("finish",function(){a._onFinish()})};E(m,s.Writable),m.prototype.setHeader=function(i,a){var t=this,S=i.toLowerCase();if(y.indexOf(S)!==-1)return;t._headers[S]={name:i,value:a}},m.prototype.getHeader=function(i){var a=this._headers[i.toLowerCase()];return a?a.value:null},m.prototype.removeHeader=function(i){var a=this;delete a._headers[i.toLowerCase()]},m.prototype._onFinish=function(){var i=this;if(i._destroyed)return;var a=i._opts,t=i._headers,S=null;a.method!=="GET"&&a.method!=="HEAD"&&(C.arraybuffer?S=n(T.concat(i._body)):C.blobConstructor?S=new d.Blob(i._body.map(function(v){return n(v)}),{type:(t["content-type"]||{}).value||""}):S=T.concat(i._body).toString());var x=[];if((0,u.default)(t).forEach(function(v){var g=t[v].name,w=t[v].value;Array.isArray(w)?w.forEach(function(M){x.push([g,M])}):x.push([g,w])}),i._mode==="fetch"){var o=null,k=null;if(C.abortController){var O=new AbortController;o=O.signal,i._fetchAbortController=O,"requestTimeout"in a&&a.requestTimeout!==0&&(i._fetchTimer=d.setTimeout(function(){i.emit("requestTimeout"),i._fetchAbortController&&i._fetchAbortController.abort()},a.requestTimeout))}d.fetch(i._opts.url,{method:i._opts.method,headers:x,body:S||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:o}).then(function(v){i._fetchResponse=v,i._connect()},function(v){d.clearTimeout(i._fetchTimer),i._destroyed||i.emit("error",v)})}else{var b=i._xhr=new d.XMLHttpRequest;try{b.open(i._opts.method,i._opts.url,!0)}catch(v){P.nextTick(function(){i.emit("error",v)});return}"responseType"in b&&(b.responseType=i._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!a.withCredentials),i._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(b.timeout=a.requestTimeout,b.ontimeout=function(){i.emit("requestTimeout")}),x.forEach(function(v){b.setRequestHeader(v[0],v[1])}),i._response=null,b.onreadystatechange=function(){switch(b.readyState){case f.LOADING:case f.DONE:i._onXHRProgress();break}},i._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){i._onXHRProgress()}),b.onerror=function(){if(i._destroyed)return;i.emit("error",new Error("XHR error"))};try{b.send(S)}catch(v){P.nextTick(function(){i.emit("error",v)});return}}};function _(i){try{var a=i.status;return a!==null&&a!==0}catch(t){return!1}}m.prototype._onXHRProgress=function(){var i=this;if(!_(i._xhr)||i._destroyed)return;i._response||i._connect(),i._response._onXHRProgress()},m.prototype._connect=function(){var i=this;if(i._destroyed)return;i._response=new h(i._xhr,i._fetchResponse,i._mode,i._fetchTimer),i._response.on("error",function(a){i.emit("error",a)}),i.emit("response",i._response)},m.prototype._write=function(i,a,t){var S=this;S._body.push(i),t()},m.prototype.abort=m.prototype.destroy=function(){var i=this;i._destroyed=!0,d.clearTimeout(i._fetchTimer),i._response&&(i._response._destroyed=!0),i._xhr?i._xhr.abort():i._fetchAbortController&&i._fetchAbortController.abort()},m.prototype.end=function(i,a,t){var S=this;typeof i=="function"&&(t=i,i=void 0),s.Writable.prototype.end.call(S,i,a,t)},m.prototype.flushHeaders=function(){},m.prototype.setTimeout=function(){},m.prototype.setNoDelay=function(){},m.prototype.setSocketKeepAlive=function(){};var y=["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,Z,L){(function(P,d,T){"use strict";var D=j("babel-runtime/core-js/promise"),u=p(D);function p(h){return h&&h.__esModule?h:{default:h}}var C=j("./capability"),E=j("inherits"),l=j("readable-stream"),s=L.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=L.IncomingMessage=function(h,f,c,m){var _=this;if(l.Readable.call(_),_._mode=c,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){P.nextTick(function(){_.emit("close")})}),c==="fetch"){var y=function o(){a.read().then(function(k){if(_._destroyed)return;if(k.done){d.clearTimeout(m),_.push(null);return}_.push(new T(k.value)),o()}).catch(function(k){d.clearTimeout(m),_._destroyed||_.emit("error",k)})};if(_._fetchResponse=f,_.url=f.url,_.statusCode=f.status,_.statusMessage=f.statusText,f.headers.forEach(function(o,k){_.headers[k.toLowerCase()]=o,_.rawHeaders.push(k,o)}),C.writableStream){var i=new WritableStream({write:function(k){return new u.default(function(O,b){_._destroyed?b():_.push(new T(k))?O():_._resumeFetch=O})},close:function(){d.clearTimeout(m),_._destroyed||_.push(null)},abort:function(k){_._destroyed||_.emit("error",k)}});try{f.body.pipeTo(i).catch(function(o){d.clearTimeout(m),_._destroyed||_.emit("error",o)});return}catch(o){}}var a=f.body.getReader();y()}else{_._xhr=h,_._pos=0,_.url=h.responseURL,_.statusCode=h.status,_.statusMessage=h.statusText;var t=h.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(o){var k=o.match(/^([^:]+):\s*(.*)/);if(k){var O=k[1].toLowerCase();O==="set-cookie"?(_.headers[O]===void 0&&(_.headers[O]=[]),_.headers[O].push(k[2])):_.headers[O]!==void 0?_.headers[O]+=", "+k[2]:_.headers[O]=k[2],_.rawHeaders.push(k[1],k[2])}}),_._charset="x-user-defined",!C.overrideMimeType){var S=_.rawHeaders["mime-type"];if(S){var x=S.match(/;\s*charset=([^;])(;|$)/);x&&(_._charset=x[1].toLowerCase())}_._charset||(_._charset="utf-8")}}};E(n,l.Readable),n.prototype._read=function(){var h=this,f=h._resumeFetch;f&&(h._resumeFetch=null,f())},n.prototype._onXHRProgress=function(){var h=this,f=h._xhr,c=null;switch(h._mode){case"text:vbarray":if(f.readyState!==s.DONE)break;try{c=new d.VBArray(f.responseBody).toArray()}catch(a){}if(c!==null){h.push(new T(c));break}case"text":try{c=f.responseText}catch(a){h._mode="text:vbarray";break}if(c.length>h._pos){var m=c.substr(h._pos);if(h._charset==="x-user-defined"){for(var _=new T(m.length),y=0;y<m.length;y++)_[y]=m.charCodeAt(y)&255;h.push(_)}else h.push(m,h._charset);h._pos=c.length}break;case"arraybuffer":if(f.readyState!==s.DONE||!f.response)break;c=f.response,h.push(new T(new Uint8Array(c)));break;case"moz-chunked-arraybuffer":if(c=f.response,f.readyState!==s.LOADING||!c)break;h.push(new T(new Uint8Array(c)));break;case"ms-stream":if(c=f.response,f.readyState!==s.LOADING)break;var i=new d.MSStreamReader;i.onprogress=function(){i.result.byteLength>h._pos&&(h.push(new T(new Uint8Array(i.result.slice(h._pos)))),h._pos=i.result.byteLength)},i.onload=function(){h.push(null)},i.readAsArrayBuffer(c);break}h._xhr.readyState===s.DONE&&h._mode!=="ms-stream"&&h.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,Z,L){"use strict";var P=j("safe-buffer").Buffer,d=P.isEncoding||function(i){i=""+i;switch(i&&i.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 T(i){if(!i)return"utf8";for(var a;;)switch(i){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 i;default:if(a)return;i=(""+i).toLowerCase(),a=!0}}function D(i){var a=T(i);if(typeof a!="string"&&(P.isEncoding===d||!d(i)))throw new Error("Unknown encoding: "+i);return a||i}L.StringDecoder=u;function u(i){this.encoding=D(i);var a;switch(this.encoding){case"utf16le":this.text=h,this.end=f,a=4;break;case"utf8":this.fillLast=l,a=4;break;case"base64":this.text=c,this.end=m,a=3;break;default:this.write=_,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(a)}u.prototype.write=function(i){if(i.length===0)return"";var a,t;if(this.lastNeed){if(a=this.fillLast(i),a===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<i.length?a?a+this.text(i,t):this.text(i,t):a||""},u.prototype.end=n,u.prototype.text=s,u.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length};function p(i){return i<=127?0:i>>5===6?2:i>>4===14?3:i>>3===30?4:i>>6===2?-1:-2}function C(i,a,t){var S=a.length-1;if(S<t)return 0;var x=p(a[S]);return x>=0?(x>0&&(i.lastNeed=x-1),x):--S<t||x===-2?0:(x=p(a[S]),x>=0?(x>0&&(i.lastNeed=x-2),x):--S<t||x===-2?0:(x=p(a[S]),x>=0?(x>0&&(x===2?x=0:i.lastNeed=x-3),x):0))}function E(i,a,t){if((a[0]&192)!==128)return i.lastNeed=0,"\uFFFD";if(i.lastNeed>1&&a.length>1){if((a[1]&192)!==128)return i.lastNeed=1,"\uFFFD";if(i.lastNeed>2&&a.length>2&&(a[2]&192)!==128)return i.lastNeed=2,"\uFFFD"}}function l(i){var a=this.lastTotal-this.lastNeed,t=E(this,i,a);if(t!==void 0)return t;if(this.lastNeed<=i.length)return i.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,a,0,i.length),this.lastNeed-=i.length}function s(i,a){var t=C(this,i,a);if(!this.lastNeed)return i.toString("utf8",a);this.lastTotal=t;var S=i.length-(t-this.lastNeed);return i.copy(this.lastChar,0,S),i.toString("utf8",a,S)}function n(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+"\uFFFD":a}function h(i,a){if((i.length-a)%2===0){var t=i.toString("utf16le",a);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",a,i.length-1)}function f(i){var a=i&&i.length?this.write(i):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function c(i,a){var t=(i.length-a)%3;return t===0?i.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",a,i.length-t))}function m(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function _(i){return i.toString(this.encoding)}function y(i){return i&&i.length?this.write(i):""}},{"safe-buffer":228}],236:[function(j,Z,L){(function(P,d){var T=j("process/browser.js").nextTick,D=Function.prototype.apply,u=Array.prototype.slice,p={},C=0;L.setTimeout=function(){return new E(D.call(setTimeout,window,arguments),clearTimeout)},L.setInterval=function(){return new E(D.call(setInterval,window,arguments),clearInterval)},L.clearTimeout=L.clearInterval=function(l){l.close()};function E(l,s){this._id=l,this._clearFn=s}E.prototype.unref=E.prototype.ref=function(){},E.prototype.close=function(){this._clearFn.call(window,this._id)},L.enroll=function(l,s){clearTimeout(l._idleTimeoutId),l._idleTimeout=s},L.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},L._unrefActive=L.active=function(l){clearTimeout(l._idleTimeoutId);var s=l._idleTimeout;s>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},s))},L.setImmediate=typeof P=="function"?P:function(l){var s=C++,n=arguments.length<2?!1:u.call(arguments,1);return p[s]=!0,T(function(){p[s]&&(n?l.apply(null,n):l.call(null),L.clearImmediate(s))}),s},L.clearImmediate=typeof d=="function"?d:function(l){delete p[l]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Z,L){var P=j("buffer").Buffer;Z.exports=function(d){if(d instanceof Uint8Array){if(d.byteOffset===0&&d.byteLength===d.buffer.byteLength)return d.buffer;if(typeof d.buffer.slice=="function")return d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)}if(P.isBuffer(d)){for(var T=new Uint8Array(d.length),D=d.length,u=0;u<D;u++)T[u]=d[u];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,Z,L){"use strict";var P=j("punycode"),d=j("./util");L.parse=a,L.resolve=S,L.resolveObject=x,L.format=t,L.Url=T;function T(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var D=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,C=["<",">",'"',"`"," ","\r",`
`," "],E=["{","}","|","\\","^","`"].concat(C),l=["'"].concat(E),s=["%","/","?",";","#"].concat(l),n=["/","?","#"],h=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},i=j("querystring");function a(o,k,O){if(o&&d.isObject(o)&&o instanceof T)return o;var b=new T;return b.parse(o,k,O),b}T.prototype.parse=function(o,k,O){if(!d.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var b=o.indexOf("?"),v=b!==-1&&b<o.indexOf("#")?"?":"#",g=o.split(v),w=/\\/g;g[0]=g[0].replace(w,"/"),o=g.join(v);var M=o;if(M=M.trim(),!O&&o.split("#").length===1){var N=p.exec(M);if(N)return this.path=M,this.href=M,this.pathname=N[1],N[2]?(this.search=N[2],k?this.query=i.parse(this.search.substr(1)):this.query=this.search.substr(1)):k&&(this.search="",this.query={}),this}var I=D.exec(M);if(I){I=I[0];var G=I.toLowerCase();this.protocol=G,M=M.substr(I.length)}if(O||I||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=M.substr(0,2)==="//";z&&!(I&&_[I])&&(M=M.substr(2),this.slashes=!0)}if(!_[I]&&(z||I&&!y[I])){for(var H=-1,K=0;K<n.length;K++){var U=M.indexOf(n[K]);U!==-1&&(H===-1||U<H)&&(H=U)}var B,V;H===-1?V=M.lastIndexOf("@"):V=M.lastIndexOf("@",H),V!==-1&&(B=M.slice(0,V),M=M.slice(V+1),this.auth=decodeURIComponent(B)),H=-1;for(var K=0;K<s.length;K++){var U=M.indexOf(s[K]);U!==-1&&(H===-1||U<H)&&(H=U)}H===-1&&(H=M.length),this.host=M.slice(0,H),M=M.slice(H),this.parseHost(),this.hostname=this.hostname||"";var ae=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ae)for(var he=this.hostname.split(/\./),K=0,pe=he.length;K<pe;K++){var Re=he[K];if(!Re)continue;if(!Re.match(f)){for(var ke="",ve=0,Te=Re.length;ve<Te;ve++)Re.charCodeAt(ve)>127?ke+="x":ke+=Re[ve];if(!ke.match(f)){var be=he.slice(0,K),ue=he.slice(K+1),le=Re.match(c);le&&(be.push(le[1]),ue.unshift(le[2])),ue.length&&(M="/"+ue.join(".")+M),this.hostname=be.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),ae||(this.hostname=P.toASCII(this.hostname));var re=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+re,this.href+=this.host,ae&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!m[G])for(var K=0,pe=l.length;K<pe;K++){var q=l[K];if(M.indexOf(q)===-1)continue;var ee=encodeURIComponent(q);ee===q&&(ee=escape(q)),M=M.split(q).join(ee)}var Ce=M.indexOf("#");Ce!==-1&&(this.hash=M.substr(Ce),M=M.slice(0,Ce));var te=M.indexOf("?");if(te!==-1?(this.search=M.substr(te),this.query=M.substr(te+1),k&&(this.query=i.parse(this.query)),M=M.slice(0,te)):k&&(this.search="",this.query={}),M&&(this.pathname=M),y[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",J=this.search||"";this.path=re+J}return this.href=this.format(),this};function t(o){return d.isString(o)&&(o=a(o)),o instanceof T?o.format():T.prototype.format.call(o)}T.prototype.format=function(){var o=this.auth||"";o&&(o=encodeURIComponent(o),o=o.replace(/%3A/i,":"),o+="@");var k=this.protocol||"",O=this.pathname||"",b=this.hash||"",v=!1,g="";this.host?v=o+this.host:this.hostname&&(v=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(v+=":"+this.port)),this.query&&d.isObject(this.query)&&Object.keys(this.query).length&&(g=i.stringify(this.query));var w=this.search||g&&"?"+g||"";return k&&k.substr(-1)!==":"&&(k+=":"),this.slashes||(!k||y[k])&&v!==!1?(v="//"+(v||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):v||(v=""),b&&b.charAt(0)!=="#"&&(b="#"+b),w&&w.charAt(0)!=="?"&&(w="?"+w),O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),w=w.replace("#","%23"),k+v+O+w+b};function S(o,k){return a(o,!1,!0).resolve(k)}T.prototype.resolve=function(o){return this.resolveObject(a(o,!1,!0)).format()};function x(o,k){return o?a(o,!1,!0).resolveObject(k):k}T.prototype.resolveObject=function(o){if(d.isString(o)){var k=new T;k.parse(o,!1,!0),o=k}for(var O=new T,b=Object.keys(this),v=0;v<b.length;v++){var g=b[v];O[g]=this[g]}if(O.hash=o.hash,o.href==="")return O.href=O.format(),O;if(o.slashes&&!o.protocol){for(var w=Object.keys(o),M=0;M<w.length;M++){var N=w[M];N!=="protocol"&&(O[N]=o[N])}return y[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(o.protocol&&o.protocol!==O.protocol){if(!y[o.protocol]){for(var I=Object.keys(o),G=0;G<I.length;G++){var z=I[G];O[z]=o[z]}return O.href=O.format(),O}if(O.protocol=o.protocol,!o.host&&!_[o.protocol]){for(var pe=(o.pathname||"").split("/");pe.length&&!(o.host=pe.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),pe[0]!==""&&pe.unshift(""),pe.length<2&&pe.unshift(""),O.pathname=pe.join("/")}else O.pathname=o.pathname;if(O.search=o.search,O.query=o.query,O.host=o.host||"",O.auth=o.auth,O.hostname=o.hostname||o.host,O.port=o.port,O.pathname||O.search){var H=O.pathname||"",K=O.search||"";O.path=H+K}return O.slashes=O.slashes||o.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",B=o.host||o.pathname&&o.pathname.charAt(0)==="/",V=B||U||O.host&&o.pathname,ae=V,he=O.pathname&&O.pathname.split("/")||[],pe=o.pathname&&o.pathname.split("/")||[],Re=O.protocol&&!y[O.protocol];if(Re&&(O.hostname="",O.port=null,O.host&&(he[0]===""?he[0]=O.host:he.unshift(O.host)),O.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(pe[0]===""?pe[0]=o.host:pe.unshift(o.host)),o.host=null),V=V&&(pe[0]===""||he[0]==="")),B)O.host=o.host||o.host===""?o.host:O.host,O.hostname=o.hostname||o.hostname===""?o.hostname:O.hostname,O.search=o.search,O.query=o.query,he=pe;else if(pe.length)he||(he=[]),he.pop(),he=he.concat(pe),O.search=o.search,O.query=o.query;else if(!d.isNullOrUndefined(o.search)){if(Re){O.hostname=O.host=he.shift();var ke=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ke&&(O.auth=ke.shift(),O.host=O.hostname=ke.shift())}return O.search=o.search,O.query=o.query,(!d.isNull(O.pathname)||!d.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!he.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ve=he.slice(-1)[0],Te=(O.host||o.host||he.length>1)&&(ve==="."||ve==="..")||ve==="",be=0,ue=he.length;ue>=0;ue--)ve=he[ue],ve==="."?he.splice(ue,1):ve===".."?(he.splice(ue,1),be++):be&&(he.splice(ue,1),be--);if(!V&&!ae)for(;be--;be)he.unshift("..");V&&he[0]!==""&&(!he[0]||he[0].charAt(0)!=="/")&&he.unshift(""),Te&&he.join("/").substr(-1)!=="/"&&he.push("");var le=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(Re){O.hostname=O.host=le?"":he.length?he.shift():"";var ke=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ke&&(O.auth=ke.shift(),O.host=O.hostname=ke.shift())}return V=V||O.host&&he.length,V&&!le&&he.unshift(""),he.length?O.pathname=he.join("/"):(O.pathname=null,O.path=null),(!d.isNull(O.pathname)||!d.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=o.auth||O.auth,O.slashes=O.slashes||o.slashes,O.href=O.format(),O},T.prototype.parseHost=function(){var o=this.host,k=u.exec(o);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),o=o.substr(0,o.length-k.length)),o&&(this.hostname=o)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Z,L){"use strict";Z.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(j,Z,L){(function(P){Z.exports=d;function d(D,u){if(T("noDeprecation"))return D;var p=!1;function C(){if(!p){if(T("throwDeprecation"))throw new Error(u);T("traceDeprecation")?console.trace(u):console.warn(u),p=!0}return D.apply(this,arguments)}return C}function T(D){try{if(!P.localStorage)return!1}catch(p){return!1}var u=P.localStorage[D];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Z,L){typeof Object.create=="function"?Z.exports=function(d,T){d.super_=T,d.prototype=Object.create(T.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(d,T){d.super_=T;var D=function(){};D.prototype=T.prototype,d.prototype=new D,d.prototype.constructor=d}},{}],242:[function(j,Z,L){Z.exports=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}},{}],243:[function(j,Z,L){(function(P,d){var T=/%[sdj%]/g;L.format=function(H){if(!S(H)){for(var K=[],U=0;U<arguments.length;U++)K.push(p(arguments[U]));return K.join(" ")}for(var U=1,B=arguments,V=B.length,ae=String(H).replace(T,function(pe){if(pe==="%%")return"%";if(U>=V)return pe;switch(pe){case"%s":return String(B[U++]);case"%d":return Number(B[U++]);case"%j":try{return JSON.stringify(B[U++])}catch(Re){return"[Circular]"}default:return pe}}),he=B[U];U<V;he=B[++U])i(he)||!O(he)?ae+=" "+he:ae+=" "+p(he);return ae},L.deprecate=function(H,K){if(o(d.process))return function(){return L.deprecate(H,K).apply(this,arguments)};if(P.noDeprecation===!0)return H;var U=!1;function B(){if(!U){if(P.throwDeprecation)throw new Error(K);P.traceDeprecation?console.trace(K):console.error(K),U=!0}return H.apply(this,arguments)}return B};var D={},u;L.debuglog=function(H){if(o(u)&&(u=P.env.NODE_DEBUG||""),H=H.toUpperCase(),!D[H])if(new RegExp("\\b"+H+"\\b","i").test(u)){var K=P.pid;D[H]=function(){var U=L.format.apply(L,arguments);console.error("%s %d: %s",H,K,U)}}else D[H]=function(){};return D[H]};function p(H,K){var U={seen:[],stylize:E};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),y(K)?U.showHidden=K:K&&L._extend(U,K),o(U.showHidden)&&(U.showHidden=!1),o(U.depth)&&(U.depth=2),o(U.colors)&&(U.colors=!1),o(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=C),s(U,H,U.depth)}L.inspect=p,p.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]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(H,K){var U=p.styles[K];return U?"["+p.colors[U][0]+"m"+H+"["+p.colors[U][1]+"m":H}function E(H,K){return H}function l(H){var K={};return H.forEach(function(U,B){K[U]=!0}),K}function s(H,K,U){if(H.customInspect&&K&&g(K.inspect)&&K.inspect!==L.inspect&&!(K.constructor&&K.constructor.prototype===K)){var B=K.inspect(U,H);return S(B)||(B=s(H,B,U)),B}var V=n(H,K);if(V)return V;var ae=Object.keys(K),he=l(ae);if(H.showHidden&&(ae=Object.getOwnPropertyNames(K)),v(K)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return h(K);if(ae.length===0){if(g(K)){var pe=K.name?": "+K.name:"";return H.stylize("[Function"+pe+"]","special")}if(k(K))return H.stylize(RegExp.prototype.toString.call(K),"regexp");if(b(K))return H.stylize(Date.prototype.toString.call(K),"date");if(v(K))return h(K)}var Re="",ke=!1,ve=["{","}"];if(_(K)&&(ke=!0,ve=["[","]"]),g(K)){var Te=K.name?": "+K.name:"";Re=" [Function"+Te+"]"}if(k(K)&&(Re=" "+RegExp.prototype.toString.call(K)),b(K)&&(Re=" "+Date.prototype.toUTCString.call(K)),v(K)&&(Re=" "+h(K)),ae.length===0&&(!ke||K.length==0))return ve[0]+Re+ve[1];if(U<0)return k(K)?H.stylize(RegExp.prototype.toString.call(K),"regexp"):H.stylize("[Object]","special");H.seen.push(K);var be;return ke?be=f(H,K,U,he,ae):be=ae.map(function(ue){return c(H,K,U,he,ue,ke)}),H.seen.pop(),m(be,Re,ve)}function n(H,K){if(o(K))return H.stylize("undefined","undefined");if(S(K)){var U="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(U,"string")}if(t(K))return H.stylize(""+K,"number");if(y(K))return H.stylize(""+K,"boolean");if(i(K))return H.stylize("null","null")}function h(H){return"["+Error.prototype.toString.call(H)+"]"}function f(H,K,U,B,V){for(var ae=[],he=0,pe=K.length;he<pe;++he)z(K,String(he))?ae.push(c(H,K,U,B,String(he),!0)):ae.push("");return V.forEach(function(Re){Re.match(/^\d+$/)||ae.push(c(H,K,U,B,Re,!0))}),ae}function c(H,K,U,B,V,ae){var he,pe,Re;if(Re=Object.getOwnPropertyDescriptor(K,V)||{value:K[V]},Re.get?Re.set?pe=H.stylize("[Getter/Setter]","special"):pe=H.stylize("[Getter]","special"):Re.set&&(pe=H.stylize("[Setter]","special")),z(B,V)||(he="["+V+"]"),pe||(H.seen.indexOf(Re.value)<0?(i(U)?pe=s(H,Re.value,null):pe=s(H,Re.value,U-1),pe.indexOf(`
`)>-1&&(ae?pe=pe.split(`
`).map(function(ke){return" "+ke}).join(`
`).substr(2):pe=`
`+pe.split(`
`).map(function(ke){return" "+ke}).join(`
`))):pe=H.stylize("[Circular]","special")),o(he)){if(ae&&V.match(/^\d+$/))return pe;he=JSON.stringify(""+V),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.substr(1,he.length-2),he=H.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=H.stylize(he,"string"))}return he+": "+pe}function m(H,K,U){var B=0,V=H.reduce(function(ae,he){return B++,he.indexOf(`
`)>=0&&B++,ae+he.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?U[0]+(K===""?"":K+`
`)+" "+H.join(`,
`)+" "+U[1]:U[0]+K+" "+H.join(", ")+" "+U[1]}function _(H){return Array.isArray(H)}L.isArray=_;function y(H){return typeof H=="boolean"}L.isBoolean=y;function i(H){return H===null}L.isNull=i;function a(H){return H==null}L.isNullOrUndefined=a;function t(H){return typeof H=="number"}L.isNumber=t;function S(H){return typeof H=="string"}L.isString=S;function x(H){return typeof H=="symbol"}L.isSymbol=x;function o(H){return H===void 0}L.isUndefined=o;function k(H){return O(H)&&M(H)==="[object RegExp]"}L.isRegExp=k;function O(H){return typeof H=="object"&&H!==null}L.isObject=O;function b(H){return O(H)&&M(H)==="[object Date]"}L.isDate=b;function v(H){return O(H)&&(M(H)==="[object Error]"||H instanceof Error)}L.isError=v;function g(H){return typeof H=="function"}L.isFunction=g;function w(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}L.isPrimitive=w,L.isBuffer=j("./support/isBuffer");function M(H){return Object.prototype.toString.call(H)}function N(H){return H<10?"0"+H.toString(10):H.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var H=new Date,K=[N(H.getHours()),N(H.getMinutes()),N(H.getSeconds())].join(":");return[H.getDate(),I[H.getMonth()],K].join(" ")}L.log=function(){console.log("%s - %s",G(),L.format.apply(L,arguments))},L.inherits=j("inherits"),L._extend=function(H,K){if(!K||!O(K))return H;for(var U=Object.keys(K),B=U.length;B--;)H[U[B]]=K[U[B]];return H};function z(H,K){return Object.prototype.hasOwnProperty.call(H,K)}}).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,Z,L){"use strict";(function(){"use strict";L.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(j,Z,L){"use strict";var P=j("babel-runtime/helpers/typeof"),d=u(P),T=j("babel-runtime/core-js/object/keys"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}(function(){"use strict";var p,C,E,l,s,n={}.hasOwnProperty;p=j("xmlbuilder"),C=j("./defaults").defaults,l=function(f){return typeof f=="string"&&(f.indexOf("&")>=0||f.indexOf(">")>=0||f.indexOf("<")>=0)},s=function(f){return"<![CDATA["+E(f)+"]]>"},E=function(f){return f.replace("]]>","]]]]><![CDATA[>")},L.Builder=function(){function h(f){var c,m,_;this.options={},m=C["0.2"];for(c in m){if(!n.call(m,c))continue;_=m[c],this.options[c]=_}for(c in f){if(!n.call(f,c))continue;_=f[c],this.options[c]=_}}return h.prototype.buildObject=function(f){var c,m,_,y,i;return c=this.options.attrkey,m=this.options.charkey,(0,D.default)(f).length===1&&this.options.rootName===C["0.2"].rootName?(i=(0,D.default)(f)[0],f=f[i]):i=this.options.rootName,_=function(a){return function(t,S){var x,o,k,O,b,v;if((typeof S=="undefined"?"undefined":(0,d.default)(S))!=="object")a.options.cdata&&l(S)?t.raw(s(S)):t.txt(S);else if(Array.isArray(S))for(O in S){if(!n.call(S,O))continue;o=S[O];for(b in o)k=o[b],t=_(t.ele(b),k).up()}else for(b in S){if(!n.call(S,b))continue;if(o=S[b],b===c){if((typeof o=="undefined"?"undefined":(0,d.default)(o))==="object")for(x in o)v=o[x],t=t.att(x,v)}else if(b===m)a.options.cdata&&l(o)?t=t.raw(s(o)):t=t.txt(o);else if(Array.isArray(o))for(O in o){if(!n.call(o,O))continue;k=o[O],typeof k=="string"?a.options.cdata&&l(k)?t=t.ele(b).raw(s(k)).up():t=t.ele(b,k).up():t=_(t.ele(b),k).up()}else(typeof o=="undefined"?"undefined":(0,d.default)(o))==="object"?t=_(t.ele(b),o).up():typeof o=="string"&&a.options.cdata&&l(o)?t=t.ele(b).raw(s(o)).up():(o==null&&(o=""),t=t.ele(b,o.toString()).up())}return t}}(this),y=p.create(i,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),_(y,f).end(this.options.renderOpts)},h}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,Z,L){"use strict";(function(){L.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,Z,L){"use strict";var P=j("babel-runtime/core-js/promise"),d=l(P),T=j("babel-runtime/core-js/object/get-own-property-names"),D=l(T),u=j("babel-runtime/core-js/object/keys"),p=l(u),C=j("babel-runtime/helpers/typeof"),E=l(C);function l(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,n,h,f,c,m,_,y,i=function(x,o){return function(){return x.apply(o,arguments)}},a=function(x,o){for(var k in o)t.call(o,k)&&(x[k]=o[k]);function O(){this.constructor=x}return O.prototype=o.prototype,x.prototype=new O,x.__super__=o.prototype,x},t={}.hasOwnProperty;_=j("sax"),h=j("events"),s=j("./bom"),m=j("./processors"),y=j("timers").setImmediate,n=j("./defaults").defaults,f=function(x){return(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&x!=null&&(0,p.default)(x).length===0},c=function(x,o,k){var O,b,v;for(O=0,b=x.length;O<b;O++)v=x[O],o=v(o,k);return o},L.Parser=function(S){a(x,S);function x(o){this.parseStringPromise=i(this.parseStringPromise,this),this.parseString=i(this.parseString,this),this.reset=i(this.reset,this),this.assignOrPush=i(this.assignOrPush,this),this.processAsync=i(this.processAsync,this);var k,O,b;if(!(this instanceof L.Parser))return new L.Parser(o);this.options={},O=n["0.2"];for(k in O){if(!t.call(O,k))continue;b=O[k],this.options[k]=b}for(k in o){if(!t.call(o,k))continue;b=o[k],this.options[k]=b}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(m.normalize)),this.reset()}return x.prototype.processAsync=function(){var o,k;try{return this.remaining.length<=this.options.chunkSize?(o=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(o),this.saxParser.close()):(o=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(o),y(this.processAsync))}catch(O){if(k=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(k)}},x.prototype.assignOrPush=function(o,k,O){return k in o?(o[k]instanceof Array||(o[k]=[o[k]]),o[k].push(O)):this.options.explicitArray?o[k]=[O]:o[k]=O},x.prototype.reset=function(){var o,k,O,b;return this.removeAllListeners(),this.saxParser=_.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(v){return function(g){if(v.saxParser.resume(),!v.saxParser.errThrown)return v.saxParser.errThrown=!0,v.emit("error",g)}}(this),this.saxParser.onend=function(v){return function(){if(!v.saxParser.ended)return v.saxParser.ended=!0,v.emit("end",v.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],o=this.options.attrkey,k=this.options.charkey,this.saxParser.onopentag=function(v){return function(g){var w,M,N,I,G;if(N={},N[k]="",!v.options.ignoreAttrs){G=g.attributes;for(w in G){if(!t.call(G,w))continue;!(o in N)&&!v.options.mergeAttrs&&(N[o]={}),M=v.options.attrValueProcessors?c(v.options.attrValueProcessors,g.attributes[w],w):g.attributes[w],I=v.options.attrNameProcessors?c(v.options.attrNameProcessors,w):w,v.options.mergeAttrs?v.assignOrPush(N,I,M):N[o][I]=M}}return N["#name"]=v.options.tagNameProcessors?c(v.options.tagNameProcessors,g.name):g.name,v.options.xmlns&&(N[v.options.xmlnskey]={uri:g.uri,local:g.local}),b.push(N)}}(this),this.saxParser.onclosetag=function(v){return function(){var g,w,M,N,I,G,z,H,K,U;if(G=b.pop(),I=G["#name"],(!v.options.explicitChildren||!v.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(g=G.cdata,delete G.cdata),K=b[b.length-1],G[k].match(/^\s*$/)&&!g?(w=G[k],delete G[k]):(v.options.trim&&(G[k]=G[k].trim()),v.options.normalize&&(G[k]=G[k].replace(/\s{2,}/g," ").trim()),G[k]=v.options.valueProcessors?c(v.options.valueProcessors,G[k],I):G[k],(0,p.default)(G).length===1&&k in G&&!v.EXPLICIT_CHARKEY&&(G=G[k])),f(G)&&(G=v.options.emptyTag!==""?v.options.emptyTag:w),v.options.validator!=null&&(U="/"+function(){var B,V,ae;for(ae=[],B=0,V=b.length;B<V;B++)N=b[B],ae.push(N["#name"]);return ae}().concat(I).join("/"),function(){var B;try{return G=v.options.validator(U,K&&K[I],G)}catch(V){return B=V,v.emit("error",B)}}()),v.options.explicitChildren&&!v.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,E.default)(G))==="object"){if(!v.options.preserveChildrenOrder)N={},v.options.attrkey in G&&(N[v.options.attrkey]=G[v.options.attrkey],delete G[v.options.attrkey]),!v.options.charsAsChildren&&v.options.charkey in G&&(N[v.options.charkey]=G[v.options.charkey],delete G[v.options.charkey]),(0,D.default)(G).length>0&&(N[v.options.childkey]=G),G=N;else if(K){K[v.options.childkey]=K[v.options.childkey]||[],z={};for(M in G){if(!t.call(G,M))continue;z[M]=G[M]}K[v.options.childkey].push(z),delete G["#name"],(0,p.default)(G).length===1&&k in G&&!v.EXPLICIT_CHARKEY&&(G=G[k])}}return b.length>0?v.assignOrPush(K,I,G):(v.options.explicitRoot&&(H=G,G={},G[I]=H),v.resultObject=G,v.saxParser.ended=!0,v.emit("end",v.resultObject))}}(this),O=function(v){return function(g){var w,M;if(M=b[b.length-1],M)return M[k]+=g,v.options.explicitChildren&&v.options.preserveChildrenOrder&&v.options.charsAsChildren&&(v.options.includeWhiteChars||g.replace(/\\n/g,"").trim()!=="")&&(M[v.options.childkey]=M[v.options.childkey]||[],w={"#name":"__text__"},w[k]=g,v.options.normalize&&(w[k]=w[k].replace(/\s{2,}/g," ").trim()),M[v.options.childkey].push(w)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(v){return function(g){var w;if(w=O(g),w)return w.cdata=!0}}(this)},x.prototype.parseString=function(o,k){var O;k!=null&&typeof k=="function"&&(this.on("end",function(b){return this.reset(),k(null,b)}),this.on("error",function(b){return this.reset(),k(b)}));try{return o=o.toString(),o.trim()===""?(this.emit("end",null),!0):(o=s.stripBOM(o),this.options.async?(this.remaining=o,y(this.processAsync),this.saxParser):this.saxParser.write(o).close())}catch(b){if(O=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(o){return new d.default(function(k){return function(O,b){return k.parseString(o,function(v,g){return v?b(v):O(g)})}}(this))},x}(h),L.parseString=function(S,x,o){var k,O,b;return o!=null?(typeof o=="function"&&(k=o),(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&(O=x)):(typeof x=="function"&&(k=x),O={}),b=new L.Parser(O),b.parseString(S,k)},L.parseStringPromise=function(S,x){var o,k;return(typeof x=="undefined"?"undefined":(0,E.default)(x))==="object"&&(o=x),k=new L.Parser(o),k.parseStringPromise(S)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(j,Z,L){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),L.normalize=function(d){return d.toLowerCase()},L.firstCharLowerCase=function(d){return d.charAt(0).toLowerCase()+d.slice(1)},L.stripPrefix=function(d){return d.replace(P,"")},L.parseNumbers=function(d){return isNaN(d)||(d=d%1===0?parseInt(d,10):parseFloat(d)),d},L.parseBooleans=function(d){return/^(?:true|false)$/i.test(d)&&(d=d.toLowerCase()==="true"),d}}).call(void 0)},{}],249:[function(j,Z,L){"use strict";(function(){"use strict";var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;d=j("./defaults"),P=j("./builder"),T=j("./parser"),D=j("./processors"),L.defaults=d.defaults,L.processors=D,L.ValidationError=function(C){u(E,C);function E(l){this.message=l}return E}(Error),L.Builder=P.Builder,L.Parser=T.Parser,L.parseString=T.parseString,L.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Z,L){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Z,L){"use strict";(function(){Z.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,Z,L){"use strict";var P=j("babel-runtime/core-js/object/get-prototype-of"),d=C(P),T=j("babel-runtime/helpers/typeof"),D=C(T),u=j("babel-runtime/core-js/object/assign"),p=C(u);function C(E){return E&&E.__esModule?E:{default:E}}(function(){var E,l,s,n,h,f,c,m=[].slice,_={}.hasOwnProperty;E=function(){var i,a,t,S,x,o;if(o=arguments[0],x=2<=arguments.length?m.call(arguments,1):[],h(p.default))p.default.apply(null,arguments);else for(i=0,t=x.length;i<t;i++)if(S=x[i],S!=null)for(a in S){if(!_.call(S,a))continue;o[a]=S[a]}return o},h=function(i){return!!i&&Object.prototype.toString.call(i)==="[object Function]"},f=function(i){var a;return!!i&&((a=typeof i=="undefined"?"undefined":(0,D.default)(i))==="function"||a==="object")},s=function(i){return h(Array.isArray)?Array.isArray(i):Object.prototype.toString.call(i)==="[object Array]"},n=function(i){var a;if(s(i))return!i.length;for(a in i){if(!_.call(i,a))continue;return!1}return!0},c=function(i){var a,t;return f(i)&&(t=(0,d.default)(i))&&(a=t.constructor)&&typeof a=="function"&&a instanceof a&&Function.prototype.toString.call(a)===Function.prototype.toString.call(Object)},l=function(i){return h(i.valueOf)?i.valueOf():i},Z.exports.assign=E,Z.exports.isFunction=h,Z.exports.isObject=f,Z.exports.isArray=s,Z.exports.isEmpty=n,Z.exports.isPlainObject=c,Z.exports.getValue=l}).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,Z,L){"use strict";(function(){Z.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p;D=j("./NodeType"),p=j("./XMLNode"),Z.exports=u=function(){function C(E,l,s){if(this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),l==null)throw new Error("Missing attribute name. "+this.debugInfo(l));this.name=this.stringify.name(l),this.value=this.stringify.attValue(s),this.type=D.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(C.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(C.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(C.prototype,"textContent",{get:function(){return this.value},set:function(l){return this.value=l||""}}),Object.defineProperty(C.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(C.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(C.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(C.prototype,"specified",{get:function(){return!0}}),C.prototype.clone=function(){return(0,d.default)(this)},C.prototype.toString=function(E){return this.options.writer.attribute(this,this.options.writer.filterOptions(E))},C.prototype.debugInfo=function(E){return E=E||this.name,E==null?"parent: <"+this.parent.name+">":"attribute: {"+E+"}, parent: <"+this.parent.name+">"},C.prototype.isEqualNode=function(E){return E.namespaceURI!==this.namespaceURI||(E.prefix!==this.prefix||E.localName!==this.localName)?!1:!(E.value!==this.value)},C}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),p=j("./XMLCharacterData"),Z.exports=u=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(h)}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},s}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p=function(l,s){for(var n in s)C.call(s,n)&&(l[n]=s[n]);function h(){this.constructor=l}return h.prototype=s.prototype,l.prototype=new h,l.__super__=s.prototype,l},C={}.hasOwnProperty;u=j("./XMLNode"),Z.exports=D=function(E){p(l,E);function l(s){l.__super__.constructor.call(this,s),this.value=""}return Object.defineProperty(l.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(l.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),l.prototype.clone=function(){return(0,d.default)(this)},l.prototype.substringData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendData=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.insertData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.deleteData=function(s,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceData=function(s,n,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(s){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(s)?!(s.data!==this.data):!1},l}(u)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Z.exports=p=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(h)}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},s}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=u(P),T=j("babel-runtime/core-js/object/create"),D=u(T);function u(p){return p&&p.__esModule?p:{default:p}}(function(){var p,C,E;C=j("./XMLDOMErrorHandler"),E=j("./XMLDOMStringList"),Z.exports=p=function(){function l(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new C,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=s=(0,D.default)(this.defaultParams)}return Object.defineProperty(l.prototype,"parameterNames",{get:function(){return new E((0,d.default)(this.defaultParams))}}),l.prototype.getParameter=function(s){return this.params.hasOwnProperty(s)?this.params[s]:null},l.prototype.canSetParameter=function(s,n){return!0},l.prototype.setParameter=function(s,n){return n!=null?this.params[s]=n:delete this.params[s]},l}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(){}return d.prototype.handleError=function(T){throw new Error(T)},d}()}).call(void 0)},{}],260:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(){}return d.prototype.hasFeature=function(T,D){return!0},d.prototype.createDocumentType=function(T,D,u){throw new Error("This DOM method is not implemented.")},d.prototype.createDocument=function(T,D,u){throw new Error("This DOM method is not implemented.")},d.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},d.prototype.getFeature=function(T,D){throw new Error("This DOM method is not implemented.")},d}()}).call(void 0)},{}],261:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(T){this.arr=T||[]}return Object.defineProperty(d.prototype,"length",{get:function(){return this.arr.length}}),d.prototype.item=function(T){return this.arr[T]||null},d.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},d}()}).call(void 0)},{}],262:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s,n,h,f){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(s==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(l));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(l));if(!h)throw new Error("Missing DTD attribute default. "+this.debugInfo(l));if(h.indexOf("#")!==0&&(h="#"+h),!h.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(l));if(f&&!h.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(l));this.elementName=this.stringify.name(l),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(s),this.attributeType=this.stringify.dtdAttType(n),f&&(this.defaultValue=this.stringify.dtdAttDefault(f)),this.defaultValueType=h}return C.prototype.toString=function(E){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD element name. "+this.debugInfo());s||(s="(#PCDATA)"),Array.isArray(s)&&(s="("+s.join(",")+")"),this.name=this.stringify.name(l),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(s)}return C.prototype.toString=function(E){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;D=j("./Utility").isObject,T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(C){u(E,C);function E(l,s,n,h){if(E.__super__.constructor.call(this,l),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(h==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!s,this.name=this.stringify.name(n),this.type=P.EntityDeclaration,!D(h))this.value=this.stringify.dtdEntityValue(h),this.internal=!0;else{if(!h.pubID&&!h.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(h.pubID&&!h.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID)),h.nData!=null&&(this.nData=this.stringify.dtdNData(h.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(E.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(E.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(E.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(E.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"xmlVersion",{get:function(){return null}}),E.prototype.toString=function(l){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(l))},E}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Z,L){"use strict";(function(){var P,d,T,D=function(C,E){for(var l in E)u.call(E,l)&&(C[l]=E[l]);function s(){this.constructor=C}return s.prototype=E.prototype,C.prototype=new s,C.__super__=E.prototype,C},u={}.hasOwnProperty;T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(p){D(C,p);function C(E,l,s){if(C.__super__.constructor.call(this,E),l==null)throw new Error("Missing DTD notation name. "+this.debugInfo(l));if(!s.pubID&&!s.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(l));this.name=this.stringify.name(l),this.type=P.NotationDeclaration,s.pubID!=null&&(this.pubID=this.stringify.dtdPubID(s.pubID)),s.sysID!=null&&(this.sysID=this.stringify.dtdSysID(s.sysID))}return Object.defineProperty(C.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(C.prototype,"systemId",{get:function(){return this.sysID}}),C.prototype.toString=function(E){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(E))},C}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;D=j("./Utility").isObject,T=j("./XMLNode"),P=j("./NodeType"),Z.exports=d=function(C){u(E,C);function E(l,s,n,h){var f;E.__super__.constructor.call(this,l),D(s)&&(f=s,s=f.version,n=f.encoding,h=f.standalone),s||(s="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(s),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),h!=null&&(this.standalone=this.stringify.xmlStandalone(h))}return E.prototype.toString=function(l){return this.options.writer.declaration(this,this.options.writer.filterOptions(l))},E}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s=function(f,c){for(var m in c)n.call(c,m)&&(f[m]=c[m]);function _(){this.constructor=f}return _.prototype=c.prototype,f.prototype=new _,f.__super__=c.prototype,f},n={}.hasOwnProperty;l=j("./Utility").isObject,E=j("./XMLNode"),P=j("./NodeType"),d=j("./XMLDTDAttList"),D=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),u=j("./XMLDTDNotation"),C=j("./XMLNamedNodeMap"),Z.exports=p=function(h){s(f,h);function f(c,m,_){var y,i,a,t,S,x;if(f.__super__.constructor.call(this,c),this.type=P.DocType,c.children){for(t=c.children,i=0,a=t.length;i<a;i++)if(y=t[i],y.type===P.Element){this.name=y.name;break}}this.documentObject=c,l(m)&&(S=m,m=S.pubID,_=S.sysID),_==null&&(x=[m,_],_=x[0],m=x[1]),m!=null&&(this.pubID=this.stringify.dtdPubID(m)),_!=null&&(this.sysID=this.stringify.dtdSysID(_))}return Object.defineProperty(f.prototype,"entities",{get:function(){var m,_,y,i,a;for(i={},a=this.children,_=0,y=a.length;_<y;_++)m=a[_],m.type===P.EntityDeclaration&&!m.pe&&(i[m.name]=m);return new C(i)}}),Object.defineProperty(f.prototype,"notations",{get:function(){var m,_,y,i,a;for(i={},a=this.children,_=0,y=a.length;_<y;_++)m=a[_],m.type===P.NotationDeclaration&&(i[m.name]=m);return new C(i)}}),Object.defineProperty(f.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(f.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(f.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),f.prototype.element=function(c,m){var _;return _=new T(this,c,m),this.children.push(_),this},f.prototype.attList=function(c,m,_,y,i){var a;return a=new d(this,c,m,_,y,i),this.children.push(a),this},f.prototype.entity=function(c,m){var _;return _=new D(this,!1,c,m),this.children.push(_),this},f.prototype.pEntity=function(c,m){var _;return _=new D(this,!0,c,m),this.children.push(_),this},f.prototype.notation=function(c,m){var _;return _=new u(this,c,m),this.children.push(_),this},f.prototype.toString=function(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))},f.prototype.ele=function(c,m){return this.element(c,m)},f.prototype.att=function(c,m,_,y,i){return this.attList(c,m,_,y,i)},f.prototype.ent=function(c,m){return this.entity(c,m)},f.prototype.pent=function(c,m){return this.pEntity(c,m)},f.prototype.not=function(c,m){return this.notation(c,m)},f.prototype.up=function(){return this.root()||this.documentObject},f.prototype.isEqualNode=function(c){return f.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)?c.name!==this.name||c.publicId!==this.publicId?!1:!(c.systemId!==this.systemId):!1},f}(E)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l=function(h,f){for(var c in f)s.call(f,c)&&(h[c]=f[c]);function m(){this.constructor=h}return m.prototype=f.prototype,h.prototype=new m,h.__super__=f.prototype,h},s={}.hasOwnProperty;E=j("./Utility").isPlainObject,T=j("./XMLDOMImplementation"),d=j("./XMLDOMConfiguration"),u=j("./XMLNode"),P=j("./NodeType"),C=j("./XMLStringifier"),p=j("./XMLStringWriter"),Z.exports=D=function(n){l(h,n);function h(f){h.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new d,f||(f={}),f.writer||(f.writer=new p),this.options=f,this.stringify=new C(f)}return Object.defineProperty(h.prototype,"implementation",{value:new T}),Object.defineProperty(h.prototype,"doctype",{get:function(){var c,m,_,y;for(y=this.children,m=0,_=y.length;m<_;m++)if(c=y[m],c.type===P.DocType)return c;return null}}),Object.defineProperty(h.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(h.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(h.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(h.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(h.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(h.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(h.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(h.prototype,"origin",{get:function(){return null}}),Object.defineProperty(h.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(h.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(h.prototype,"contentType",{get:function(){return null}}),h.prototype.end=function(f){var c;return c={},f?E(f)&&(c=f,f=this.options.writer):f=this.options.writer,f.document(this,f.filterOptions(c))},h.prototype.toString=function(f){return this.options.writer.document(this,this.options.writer.filterOptions(f))},h.prototype.createElement=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTextNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createComment=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createCDATASection=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createProcessingInstruction=function(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttribute=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEntityReference=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.importNode=function(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createElementNS=function(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttributeNS=function(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementById=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.adoptNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.renameNode=function(f,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEvent=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createNodeIterator=function(f,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTreeWalker=function(f,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(u)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s,n,h,f,c,m,_,y,i,a,t,S,x,o,k,O={}.hasOwnProperty;k=j("./Utility"),x=k.isObject,S=k.isFunction,o=k.isPlainObject,t=k.getValue,P=j("./NodeType"),h=j("./XMLDocument"),c=j("./XMLElement"),D=j("./XMLCData"),u=j("./XMLComment"),_=j("./XMLRaw"),a=j("./XMLText"),m=j("./XMLProcessingInstruction"),s=j("./XMLDeclaration"),n=j("./XMLDocType"),p=j("./XMLDTDAttList"),E=j("./XMLDTDEntity"),C=j("./XMLDTDElement"),l=j("./XMLDTDNotation"),T=j("./XMLAttribute"),i=j("./XMLStringifier"),y=j("./XMLStringWriter"),d=j("./WriterState"),Z.exports=f=function(){function b(v,g,w){var M;this.name="?xml",this.type=P.Document,v||(v={}),M={},v.writer?o(v.writer)&&(M=v.writer,v.writer=new y):v.writer=new y,this.options=v,this.writer=v.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new i(v),this.onDataCallback=g||function(){},this.onEndCallback=w||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return b.prototype.createChildNode=function(v){var g,w,M,N,I,G,z,H;switch(v.type){case P.CData:this.cdata(v.value);break;case P.Comment:this.comment(v.value);break;case P.Element:M={},z=v.attribs;for(w in z){if(!O.call(z,w))continue;g=z[w],M[w]=g.value}this.node(v.name,M);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(v.value);break;case P.Text:this.text(v.value);break;case P.ProcessingInstruction:this.instruction(v.target,v.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+v.constructor.name)}for(H=v.children,I=0,G=H.length;I<G;I++)N=H[I],this.createChildNode(N),N.type===P.Element&&this.up();return this},b.prototype.dummy=function(){return this},b.prototype.node=function(v,g,w){var M;if(v==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(v));return this.openCurrent(),v=t(v),g==null&&(g={}),g=t(g),x(g)||(M=[g,w],w=M[0],g=M[1]),this.currentNode=new c(this,v,g),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,w!=null&&this.text(w),this},b.prototype.element=function(v,g,w){var M,N,I,G,z,H;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(v)||x(v)||S(v))for(G=this.options.noValidation,this.options.noValidation=!0,H=new h(this.options).element("TEMP_ROOT"),H.element(v),this.options.noValidation=G,z=H.children,N=0,I=z.length;N<I;N++)M=z[N],this.createChildNode(M),M.type===P.Element&&this.up();else this.node(v,g,w);return this},b.prototype.attribute=function(v,g){var w,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(v));if(v!=null&&(v=t(v)),x(v))for(w in v){if(!O.call(v,w))continue;M=v[w],this.attribute(w,M)}else S(g)&&(g=g.apply()),this.options.keepNullAttributes&&g==null?this.currentNode.attribs[v]=new T(this,v,""):g!=null&&(this.currentNode.attribs[v]=new T(this,v,g));return this},b.prototype.text=function(v){var g;return this.openCurrent(),g=new a(this,v),this.onData(this.writer.text(g,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.cdata=function(v){var g;return this.openCurrent(),g=new D(this,v),this.onData(this.writer.cdata(g,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.comment=function(v){var g;return this.openCurrent(),g=new u(this,v),this.onData(this.writer.comment(g,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.raw=function(v){var g;return this.openCurrent(),g=new _(this,v),this.onData(this.writer.raw(g,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.instruction=function(v,g){var w,M,N,I,G;if(this.openCurrent(),v!=null&&(v=t(v)),g!=null&&(g=t(g)),Array.isArray(v))for(w=0,I=v.length;w<I;w++)M=v[w],this.instruction(M);else if(x(v))for(M in v){if(!O.call(v,M))continue;N=v[M],this.instruction(M,N)}else S(g)&&(g=g.apply()),G=new m(this,v,g),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},b.prototype.declaration=function(v,g,w){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new s(this,v,g,w),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.doctype=function(v,g,w){if(this.openCurrent(),v==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,g,w),this.currentNode.rootNodeName=v,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},b.prototype.dtdElement=function(v,g){var w;return this.openCurrent(),w=new C(this,v,g),this.onData(this.writer.dtdElement(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.attList=function(v,g,w,M,N){var I;return this.openCurrent(),I=new p(this,v,g,w,M,N),this.onData(this.writer.dtdAttList(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.entity=function(v,g){var w;return this.openCurrent(),w=new E(this,!1,v,g),this.onData(this.writer.dtdEntity(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.pEntity=function(v,g){var w;return this.openCurrent(),w=new E(this,!0,v,g),this.onData(this.writer.dtdEntity(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.notation=function(v,g){var w;return this.openCurrent(),w=new l(this,v,g),this.onData(this.writer.dtdNotation(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},b.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(v){var g,w,M,N;if(!v.isOpen){if(!this.root&&this.currentLevel===0&&v.type===P.Element&&(this.root=v),w="",v.type===P.Element){this.writerOptions.state=d.OpenTag,w=this.writer.indent(v,this.writerOptions,this.currentLevel)+"<"+v.name,N=v.attribs;for(M in N){if(!O.call(N,M))continue;g=N[M],w+=this.writer.attribute(g,this.writerOptions,this.currentLevel)}w+=(v.children?">":"/>")+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=d.InsideTag}else this.writerOptions.state=d.OpenTag,w=this.writer.indent(v,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+v.rootNodeName,v.pubID&&v.sysID?w+=' PUBLIC "'+v.pubID+'" "'+v.sysID+'"':v.sysID&&(w+=' SYSTEM "'+v.sysID+'"'),v.children?(w+=" [",this.writerOptions.state=d.InsideTag):(this.writerOptions.state=d.CloseTag,w+=">"),w+=this.writer.endline(v,this.writerOptions,this.currentLevel);return this.onData(w,this.currentLevel),v.isOpen=!0}},b.prototype.closeNode=function(v){var g;if(!v.isClosed)return g="",this.writerOptions.state=d.CloseTag,v.type===P.Element?g=this.writer.indent(v,this.writerOptions,this.currentLevel)+"</"+v.name+">"+this.writer.endline(v,this.writerOptions,this.currentLevel):g=this.writer.indent(v,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=d.None,this.onData(g,this.currentLevel),v.isClosed=!0},b.prototype.onData=function(v,g){return this.documentStarted=!0,this.onDataCallback(v,g+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(v){return v==null?"":"node: <"+v+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(v,g,w){return this.node(v,g,w)},b.prototype.txt=function(v){return this.text(v)},b.prototype.dat=function(v){return this.cdata(v)},b.prototype.com=function(v){return this.comment(v)},b.prototype.ins=function(v,g){return this.instruction(v,g)},b.prototype.dec=function(v,g,w){return this.declaration(v,g,w)},b.prototype.dtd=function(v,g,w){return this.doctype(v,g,w)},b.prototype.e=function(v,g,w){return this.element(v,g,w)},b.prototype.n=function(v,g,w){return this.node(v,g,w)},b.prototype.t=function(v){return this.text(v)},b.prototype.d=function(v){return this.cdata(v)},b.prototype.c=function(v){return this.comment(v)},b.prototype.r=function(v){return this.raw(v)},b.prototype.i=function(v,g){return this.instruction(v,g)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(v,g){return this.entity(v,g)},b.prototype.pent=function(v,g){return this.pEntity(v,g)},b.prototype.not=function(v,g){return this.notation(v,g)},b}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;p=j("./XMLNode"),D=j("./NodeType"),Z.exports=u=function(l){C(s,l);function s(n){s.__super__.constructor.call(this,n),this.type=D.Dummy}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return""},s}(p)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C,E,l,s,n,h,f=function(_,y){for(var i in y)c.call(y,i)&&(_[i]=y[i]);function a(){this.constructor=_}return a.prototype=y.prototype,_.prototype=new a,_.__super__=y.prototype,_},c={}.hasOwnProperty;h=j("./Utility"),n=h.isObject,s=h.isFunction,l=h.getValue,E=j("./XMLNode"),D=j("./NodeType"),u=j("./XMLAttribute"),C=j("./XMLNamedNodeMap"),Z.exports=p=function(m){f(_,m);function _(y,i,a){var t,S,x,o;if(_.__super__.constructor.call(this,y),i==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(i),this.type=D.Element,this.attribs={},this.schemaTypeInfo=null,a!=null&&this.attribute(a),y.type===D.Document&&(this.isRoot=!0,this.documentObject=y,y.rootObject=this,y.children)){for(o=y.children,S=0,x=o.length;S<x;S++)if(t=o[S],t.type===D.DocType){t.name=this.name;break}}}return Object.defineProperty(_.prototype,"tagName",{get:function(){return this.name}}),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,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new C(this.attribs)),this.attributeMap}}),_.prototype.clone=function(){var y,i,a,t;a=(0,d.default)(this),a.isRoot&&(a.documentObject=null),a.attribs={},t=this.attribs;for(i in t){if(!c.call(t,i))continue;y=t[i],a.attribs[i]=y.clone()}return a.children=[],this.children.forEach(function(S){var x;return x=S.clone(),x.parent=a,a.children.push(x)}),a},_.prototype.attribute=function(y,i){var a,t;if(y!=null&&(y=l(y)),n(y))for(a in y){if(!c.call(y,a))continue;t=y[a],this.attribute(a,t)}else s(i)&&(i=i.apply()),this.options.keepNullAttributes&&i==null?this.attribs[y]=new u(this,y,""):i!=null&&(this.attribs[y]=new u(this,y,i));return this},_.prototype.removeAttribute=function(y){var i,a,t;if(y==null)throw new Error("Missing attribute name. "+this.debugInfo());if(y=l(y),Array.isArray(y))for(a=0,t=y.length;a<t;a++)i=y[a],delete this.attribs[i];else delete this.attribs[y];return this},_.prototype.toString=function(y){return this.options.writer.element(this,this.options.writer.filterOptions(y))},_.prototype.att=function(y,i){return this.attribute(y,i)},_.prototype.a=function(y,i){return this.attribute(y,i)},_.prototype.getAttribute=function(y){return this.attribs.hasOwnProperty(y)?this.attribs[y].value:null},_.prototype.setAttribute=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNode=function(y){return this.attribs.hasOwnProperty(y)?this.attribs[y]:null},_.prototype.setAttributeNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.removeAttributeNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setAttributeNS=function(y,i,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.removeAttributeNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNodeNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setAttributeNodeNS=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.hasAttribute=function(y){return this.attribs.hasOwnProperty(y)},_.prototype.hasAttributeNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setIdAttribute=function(y,i){return this.attribs.hasOwnProperty(y)?this.attribs[y].isId:i},_.prototype.setIdAttributeNS=function(y,i,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setIdAttributeNode=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(y,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.isEqualNode=function(y){var i,a,t;if(!_.__super__.isEqualNode.apply(this,arguments).isEqualNode(y))return!1;if(y.namespaceURI!==this.namespaceURI)return!1;if(y.prefix!==this.prefix)return!1;if(y.localName!==this.localName)return!1;if(y.attribs.length!==this.attribs.length)return!1;for(i=a=0,t=this.attribs.length-1;0<=t?a<=t:a>=t;i=0<=t?++a:--a)if(!this.attribs[i].isEqualNode(y.attribs[i]))return!1;return!0},_}(E)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/keys"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D;Z.exports=D=function(){function u(p){this.nodes=p}return Object.defineProperty(u.prototype,"length",{get:function(){return(0,d.default)(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(p){return this.nodes[p]},u.prototype.setNamedItem=function(p){var C;return C=this.nodes[p.nodeName],this.nodes[p.nodeName]=p,C||null},u.prototype.removeNamedItem=function(p){var C;return C=this.nodes[p],delete this.nodes[p],C||null},u.prototype.item=function(p){return this.nodes[(0,d.default)(this.nodes)[p]]||null},u.prototype.getNamedItemNS=function(p,C){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(p){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(p,C){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s,n,h,f,c,m,_,y,i,a,t={}.hasOwnProperty;a=j("./Utility"),i=a.isObject,y=a.isFunction,_=a.isEmpty,m=a.getValue,E=null,T=null,D=null,u=null,p=null,f=null,c=null,h=null,C=null,d=null,n=null,l=null,P=null,Z.exports=s=function(){function S(x){this.parent=x,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,E||(E=j("./XMLElement"),T=j("./XMLCData"),D=j("./XMLComment"),u=j("./XMLDeclaration"),p=j("./XMLDocType"),f=j("./XMLRaw"),c=j("./XMLText"),h=j("./XMLProcessingInstruction"),C=j("./XMLDummy"),d=j("./NodeType"),n=j("./XMLNodeList"),l=j("./XMLNamedNodeMap"),P=j("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var o;return o=this.parent.children.indexOf(this),this.parent.children[o+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var o,k,O,b,v;if(this.nodeType===d.Element||this.nodeType===d.DocumentFragment){for(v="",b=this.children,k=0,O=b.length;k<O;k++)o=b[k],o.textContent&&(v+=o.textContent);return v}else return null},set:function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.setParent=function(x){var o,k,O,b,v;for(this.parent=x,x&&(this.options=x.options,this.stringify=x.stringify),b=this.children,v=[],k=0,O=b.length;k<O;k++)o=b[k],v.push(o.setParent(this));return v},S.prototype.element=function(x,o,k){var O,b,v,g,w,M,N,I,G,z,H;if(M=null,o===null&&k==null&&(G=[{},null],o=G[0],k=G[1]),o==null&&(o={}),o=m(o),i(o)||(z=[o,k],k=z[0],o=z[1]),x!=null&&(x=m(x)),Array.isArray(x))for(v=0,N=x.length;v<N;v++)b=x[v],M=this.element(b);else if(y(x))M=this.element(x.apply());else if(i(x))for(w in x){if(!t.call(x,w))continue;if(H=x[w],y(H)&&(H=H.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&w.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(w.substr(this.stringify.convertAttKey.length),H);else if(!this.options.separateArrayItems&&Array.isArray(H)&&_(H))M=this.dummy();else if(i(H)&&_(H))M=this.element(w);else if(!this.options.keepNullNodes&&H==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(H))for(g=0,I=H.length;g<I;g++)b=H[g],O={},O[w]=b,M=this.element(O);else i(H)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&w.indexOf(this.stringify.convertTextKey)===0?M=this.element(H):(M=this.element(w),M.element(H)):M=this.element(w,H)}else!this.options.keepNullNodes&&k===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&x.indexOf(this.stringify.convertTextKey)===0?M=this.text(k):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&x.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(k):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&x.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(k):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&x.indexOf(this.stringify.convertRawKey)===0?M=this.raw(k):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&x.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(x.substr(this.stringify.convertPIKey.length),k):M=this.node(x,o,k);if(M==null)throw new Error("Could not create any elements with: "+x+". "+this.debugInfo());return M},S.prototype.insertBefore=function(x,o,k){var O,b,v,g,w;if(x!=null?x.type:void 0)return v=x,g=o,v.setParent(this),g?(b=children.indexOf(g),w=children.splice(b),children.push(v),Array.prototype.push.apply(children,w)):children.push(v),v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return b=this.parent.children.indexOf(this),w=this.parent.children.splice(b),O=this.parent.element(x,o,k),Array.prototype.push.apply(this.parent.children,w),O},S.prototype.insertAfter=function(x,o,k){var O,b,v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return b=this.parent.children.indexOf(this),v=this.parent.children.splice(b+1),O=this.parent.element(x,o,k),Array.prototype.push.apply(this.parent.children,v),O},S.prototype.remove=function(){var x,o;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return x=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[x,x-x+1].concat(o=[])),this.parent},S.prototype.node=function(x,o,k){var O,b;return x!=null&&(x=m(x)),o||(o={}),o=m(o),i(o)||(b=[o,k],k=b[0],o=b[1]),O=new E(this,x,o),k!=null&&O.text(k),this.children.push(O),O},S.prototype.text=function(x){var o;return i(x)&&this.element(x),o=new c(this,x),this.children.push(o),this},S.prototype.cdata=function(x){var o;return o=new T(this,x),this.children.push(o),this},S.prototype.comment=function(x){var o;return o=new D(this,x),this.children.push(o),this},S.prototype.commentBefore=function(x){var o,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k),o=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.commentAfter=function(x){var o,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k+1),o=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.raw=function(x){var o;return o=new f(this,x),this.children.push(o),this},S.prototype.dummy=function(){var x;return x=new C(this),x},S.prototype.instruction=function(x,o){var k,O,b,v,g;if(x!=null&&(x=m(x)),o!=null&&(o=m(o)),Array.isArray(x))for(v=0,g=x.length;v<g;v++)k=x[v],this.instruction(k);else if(i(x))for(k in x){if(!t.call(x,k))continue;O=x[k],this.instruction(k,O)}else y(o)&&(o=o.apply()),b=new h(this,x,o),this.children.push(b);return this},S.prototype.instructionBefore=function(x,o){var k,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O),k=this.parent.instruction(x,o),Array.prototype.push.apply(this.parent.children,b),this},S.prototype.instructionAfter=function(x,o){var k,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O+1),k=this.parent.instruction(x,o),Array.prototype.push.apply(this.parent.children,b),this},S.prototype.declaration=function(x,o,k){var O,b;return O=this.document(),b=new u(O,x,o,k),O.children.length===0?O.children.unshift(b):O.children[0].type===d.Declaration?O.children[0]=b:O.children.unshift(b),O.root()||O},S.prototype.dtd=function(x,o){var k,O,b,v,g,w,M,N,I,G;for(O=this.document(),b=new p(O,x,o),I=O.children,v=g=0,M=I.length;g<M;v=++g)if(k=I[v],k.type===d.DocType)return O.children[v]=b,b;for(G=O.children,v=w=0,N=G.length;w<N;v=++w)if(k=G[v],k.isRoot)return O.children.splice(v,0,b),b;return O.children.push(b),b},S.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},S.prototype.root=function(){var x;for(x=this;x;){if(x.type===d.Document)return x.rootObject;if(x.isRoot)return x;x=x.parent}},S.prototype.document=function(){var x;for(x=this;x;){if(x.type===d.Document)return x;x=x.parent}},S.prototype.end=function(x){return this.document().end(x)},S.prototype.prev=function(){var x;if(x=this.parent.children.indexOf(this),x<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[x-1]},S.prototype.next=function(){var x;if(x=this.parent.children.indexOf(this),x===-1||x===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[x+1]},S.prototype.importDocument=function(x){var o;return o=x.root().clone(),o.parent=this,o.isRoot=!1,this.children.push(o),this},S.prototype.debugInfo=function(x){var o,k;return x=x||this.name,x==null&&!((o=this.parent)!=null?o.name:void 0)?"":x==null?"parent: <"+this.parent.name+">":((k=this.parent)!=null?k.name:void 0)?"node: <"+x+">, parent: <"+this.parent.name+">":"node: <"+x+">"},S.prototype.ele=function(x,o,k){return this.element(x,o,k)},S.prototype.nod=function(x,o,k){return this.node(x,o,k)},S.prototype.txt=function(x){return this.text(x)},S.prototype.dat=function(x){return this.cdata(x)},S.prototype.com=function(x){return this.comment(x)},S.prototype.ins=function(x,o){return this.instruction(x,o)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(x,o,k){return this.declaration(x,o,k)},S.prototype.e=function(x,o,k){return this.element(x,o,k)},S.prototype.n=function(x,o,k){return this.node(x,o,k)},S.prototype.t=function(x){return this.text(x)},S.prototype.d=function(x){return this.cdata(x)},S.prototype.c=function(x){return this.comment(x)},S.prototype.r=function(x){return this.raw(x)},S.prototype.i=function(x,o){return this.instruction(x,o)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(x){return this.importDocument(x)},S.prototype.replaceChild=function(x,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(x,o){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(x){var o,k;return o=this,o===x?0:this.document()!==x.document()?(k=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?k|=P.Preceding:k|=P.Following,k):o.isAncestor(x)?P.Contains|P.Preceding:o.isDescendant(x)?P.Contains|P.Following:o.isPreceding(x)?P.Preceding:P.Following},S.prototype.isSameNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(x){var o,k,O;if(x.nodeType!==this.nodeType)return!1;if(x.children.length!==this.children.length)return!1;for(o=k=0,O=this.children.length-1;0<=O?k<=O:k>=O;o=0<=O?++k:--k)if(!this.children[o].isEqualNode(x.children[o]))return!1;return!0},S.prototype.getFeature=function(x,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(x,o,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(x){return x?x===this||this.isDescendant(x):!1},S.prototype.isDescendant=function(x){var o,k,O,b,v;for(v=this.children,O=0,b=v.length;O<b;O++){if(o=v[O],x===o)return!0;if(k=o.isDescendant(x),k)return!0}return!1},S.prototype.isAncestor=function(x){return x.isDescendant(this)},S.prototype.isPreceding=function(x){var o,k;return o=this.treePosition(x),k=this.treePosition(this),o===-1||k===-1?!1:o<k},S.prototype.isFollowing=function(x){var o,k;return o=this.treePosition(x),k=this.treePosition(this),o===-1||k===-1?!1:o>k},S.prototype.treePosition=function(x){var o,k;return k=0,o=!1,this.foreachTreeNode(this.document(),function(O){if(k++,!o&&O===x)return o=!0}),o?k:-1},S.prototype.foreachTreeNode=function(x,o){var k,O,b,v,g;for(x||(x=this.document()),v=x.children,O=0,b=v.length;O<b;O++){if(k=v[O],g=o(k))return g;if(g=this.foreachTreeNode(k,o),g)return g}},S}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(j,Z,L){"use strict";(function(){var P;Z.exports=P=function(){function d(T){this.nodes=T}return Object.defineProperty(d.prototype,"length",{get:function(){return this.nodes.length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.item=function(T){return this.nodes[T]||null},d}()}).call(void 0)},{}],275:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Z.exports=p=function(l){C(s,l);function s(n,h,f){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=D.ProcessingInstruction,this.target=this.stringify.insTarget(h),this.name=this.target,f&&(this.value=this.stringify.insValue(f))}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},s.prototype.isEqualNode=function(n){return s.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},s}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLNode"),Z.exports=p=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=D.Raw,this.value=this.stringify.raw(h)}return s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},s}(u)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u=function(E,l){for(var s in l)p.call(l,s)&&(E[s]=l[s]);function n(){this.constructor=E}return n.prototype=l.prototype,E.prototype=new n,E.__super__=l.prototype,E},p={}.hasOwnProperty;P=j("./NodeType"),D=j("./XMLWriterBase"),d=j("./WriterState"),Z.exports=T=function(C){u(E,C);function E(l,s){this.stream=l,E.__super__.constructor.call(this,s)}return E.prototype.endline=function(l,s,n){return l.isLastRootNode&&s.state===d.CloseTag?"":E.__super__.endline.call(this,l,s,n)},E.prototype.document=function(l,s){var n,h,f,c,m,_,y,i,a;for(y=l.children,h=f=0,m=y.length;f<m;h=++f)n=y[h],n.isLastRootNode=h===l.children.length-1;for(s=this.filterOptions(s),i=l.children,a=[],c=0,_=i.length;c<_;c++)n=i[c],a.push(this.writeChildNode(n,s,0));return a},E.prototype.attribute=function(l,s,n){return this.stream.write(E.__super__.attribute.call(this,l,s,n))},E.prototype.cdata=function(l,s,n){return this.stream.write(E.__super__.cdata.call(this,l,s,n))},E.prototype.comment=function(l,s,n){return this.stream.write(E.__super__.comment.call(this,l,s,n))},E.prototype.declaration=function(l,s,n){return this.stream.write(E.__super__.declaration.call(this,l,s,n))},E.prototype.docType=function(l,s,n){var h,f,c,m;if(n||(n=0),this.openNode(l,s,n),s.state=d.OpenTag,this.stream.write(this.indent(l,s,n)),this.stream.write("<!DOCTYPE "+l.root().name),l.pubID&&l.sysID?this.stream.write(' PUBLIC "'+l.pubID+'" "'+l.sysID+'"'):l.sysID&&this.stream.write(' SYSTEM "'+l.sysID+'"'),l.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(l,s,n)),s.state=d.InsideTag,m=l.children,f=0,c=m.length;f<c;f++)h=m[f],this.writeChildNode(h,s,n+1);s.state=d.CloseTag,this.stream.write("]")}return s.state=d.CloseTag,this.stream.write(s.spaceBeforeSlash+">"),this.stream.write(this.endline(l,s,n)),s.state=d.None,this.closeNode(l,s,n)},E.prototype.element=function(l,s,n){var h,f,c,m,_,y,i,a,t,S;n||(n=0),this.openNode(l,s,n),s.state=d.OpenTag,this.stream.write(this.indent(l,s,n)+"<"+l.name),t=l.attribs;for(i in t){if(!p.call(t,i))continue;h=t[i],this.attribute(h,s,n)}if(c=l.children.length,m=c===0?null:l.children[0],c===0||l.children.every(function(x){return(x.type===P.Text||x.type===P.Raw)&&x.value===""}))s.allowEmpty?(this.stream.write(">"),s.state=d.CloseTag,this.stream.write("</"+l.name+">")):(s.state=d.CloseTag,this.stream.write(s.spaceBeforeSlash+"/>"));else if(s.pretty&&c===1&&(m.type===P.Text||m.type===P.Raw)&&m.value!=null)this.stream.write(">"),s.state=d.InsideTag,s.suppressPrettyCount++,a=!0,this.writeChildNode(m,s,n+1),s.suppressPrettyCount--,a=!1,s.state=d.CloseTag,this.stream.write("</"+l.name+">");else{for(this.stream.write(">"+this.endline(l,s,n)),s.state=d.InsideTag,S=l.children,_=0,y=S.length;_<y;_++)f=S[_],this.writeChildNode(f,s,n+1);s.state=d.CloseTag,this.stream.write(this.indent(l,s,n)+"</"+l.name+">")}return this.stream.write(this.endline(l,s,n)),s.state=d.None,this.closeNode(l,s,n)},E.prototype.processingInstruction=function(l,s,n){return this.stream.write(E.__super__.processingInstruction.call(this,l,s,n))},E.prototype.raw=function(l,s,n){return this.stream.write(E.__super__.raw.call(this,l,s,n))},E.prototype.text=function(l,s,n){return this.stream.write(E.__super__.text.call(this,l,s,n))},E.prototype.dtdAttList=function(l,s,n){return this.stream.write(E.__super__.dtdAttList.call(this,l,s,n))},E.prototype.dtdElement=function(l,s,n){return this.stream.write(E.__super__.dtdElement.call(this,l,s,n))},E.prototype.dtdEntity=function(l,s,n){return this.stream.write(E.__super__.dtdEntity.call(this,l,s,n))},E.prototype.dtdNotation=function(l,s,n){return this.stream.write(E.__super__.dtdNotation.call(this,l,s,n))},E}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Z,L){"use strict";(function(){var P,d,T=function(p,C){for(var E in C)D.call(C,E)&&(p[E]=C[E]);function l(){this.constructor=p}return l.prototype=C.prototype,p.prototype=new l,p.__super__=C.prototype,p},D={}.hasOwnProperty;d=j("./XMLWriterBase"),Z.exports=P=function(u){T(p,u);function p(C){p.__super__.constructor.call(this,C)}return p.prototype.document=function(C,E){var l,s,n,h,f;for(E=this.filterOptions(E),h="",f=C.children,s=0,n=f.length;s<n;s++)l=f[s],h+=this.writeChildNode(l,E,0);return E.pretty&&h.slice(-E.newline.length)===E.newline&&(h=h.slice(0,-E.newline.length)),h},p}(d)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,Z,L){"use strict";(function(){var P,d=function(u,p){return function(){return u.apply(p,arguments)}},T={}.hasOwnProperty;Z.exports=P=function(){function D(u){this.assertLegalName=d(this.assertLegalName,this),this.assertLegalChar=d(this.assertLegalChar,this);var p,C,E;u||(u={}),this.options=u,this.options.version||(this.options.version="1.0"),C=u.stringify||{};for(p in C){if(!T.call(C,p))continue;E=C[p],this[p]=E}}return D.prototype.name=function(u){return this.options.noValidation?u:this.assertLegalName(""+u||"")},D.prototype.text=function(u){return this.options.noValidation?u:this.assertLegalChar(this.textEscape(""+u||""))},D.prototype.cdata=function(u){return this.options.noValidation?u:(u=""+u||"",u=u.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(u))},D.prototype.comment=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+u);return this.assertLegalChar(u)},D.prototype.raw=function(u){return this.options.noValidation?u:""+u||""},D.prototype.attValue=function(u){return this.options.noValidation?u:this.assertLegalChar(this.attEscape(u=""+u||""))},D.prototype.insTarget=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.insValue=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/\?>/))throw new Error("Invalid processing instruction value: "+u);return this.assertLegalChar(u)},D.prototype.xmlVersion=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+u);return u},D.prototype.xmlEncoding=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+u);return this.assertLegalChar(u)},D.prototype.xmlStandalone=function(u){return this.options.noValidation?u:u?"yes":"no"},D.prototype.dtdPubID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdSysID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdElementValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttType=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttDefault=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdEntityValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdNData=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(u){var p,C;if(this.options.noValidation)return u;if(p="",this.options.version==="1.0"){if(p=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=u.match(p))throw new Error("Invalid character in string: "+u+" at index "+C.index)}else if(this.options.version==="1.1"&&(p=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=u.match(p)))throw new Error("Invalid character in string: "+u+" at index "+C.index);return u},D.prototype.assertLegalName=function(u){var p;if(this.options.noValidation)return u;if(this.assertLegalChar(u),p=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!u.match(p))throw new Error("Invalid character in name");return u},D.prototype.textEscape=function(u){var p;return this.options.noValidation?u:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(p,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},D.prototype.attEscape=function(u){var p;return this.options.noValidation?u:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(p,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},D}()}).call(void 0)},{}],280:[function(j,Z,L){"use strict";var P=j("babel-runtime/core-js/object/create"),d=T(P);function T(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,p,C=function(s,n){for(var h in n)E.call(n,h)&&(s[h]=n[h]);function f(){this.constructor=s}return f.prototype=n.prototype,s.prototype=new f,s.__super__=n.prototype,s},E={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),Z.exports=p=function(l){C(s,l);function s(n,h){if(s.__super__.constructor.call(this,n),h==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=D.Text,this.value=this.stringify.text(h)}return Object.defineProperty(s.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"wholeText",{get:function(){var h,f,c;for(c="",f=this.previousSibling;f;)c=f.data+c,f=f.previousSibling;for(c+=this.data,h=this.nextSibling;h;)c=c+h.data,h=h.nextSibling;return c}}),s.prototype.clone=function(){return(0,d.default)(this)},s.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},s.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},s}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s,n,h,f,c,m,_,y,i={}.hasOwnProperty;y=j("./Utility").assign,P=j("./NodeType"),l=j("./XMLDeclaration"),s=j("./XMLDocType"),T=j("./XMLCData"),D=j("./XMLComment"),h=j("./XMLElement"),c=j("./XMLRaw"),m=j("./XMLText"),f=j("./XMLProcessingInstruction"),n=j("./XMLDummy"),u=j("./XMLDTDAttList"),p=j("./XMLDTDElement"),C=j("./XMLDTDEntity"),E=j("./XMLDTDNotation"),d=j("./WriterState"),Z.exports=_=function(){function a(t){var S,x,o;t||(t={}),this.options=t,x=t.writer||{};for(S in x){if(!i.call(x,S))continue;o=x[S],this["_"+S]=this[S],this[S]=o}}return a.prototype.filterOptions=function(t){var S,x,o,k,O,b,v,g;return t||(t={}),t=y({},this.options,t),S={writer:this},S.pretty=t.pretty||!1,S.allowEmpty=t.allowEmpty||!1,S.indent=(x=t.indent)!=null?x:" ",S.newline=(o=t.newline)!=null?o:`
`,S.offset=(k=t.offset)!=null?k:0,S.dontPrettyTextNodes=(O=(b=t.dontPrettyTextNodes)!=null?b:t.dontprettytextnodes)!=null?O:0,S.spaceBeforeSlash=(v=(g=t.spaceBeforeSlash)!=null?g:t.spacebeforeslash)!=null?v:"",S.spaceBeforeSlash===!0&&(S.spaceBeforeSlash=" "),S.suppressPrettyCount=0,S.user={},S.state=d.None,S},a.prototype.indent=function(t,S,x){var o;return!S.pretty||S.suppressPrettyCount?"":S.pretty&&(o=(x||0)+S.offset+1,o>0)?new Array(o).join(S.indent):""},a.prototype.endline=function(t,S,x){return!S.pretty||S.suppressPrettyCount?"":S.newline},a.prototype.attribute=function(t,S,x){var o;return this.openAttribute(t,S,x),o=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,x),o},a.prototype.cdata=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<![CDATA[",S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+="]]>"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.comment=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<!-- ",S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+=" -->"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.declaration=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<?xml",S.state=d.InsideTag,o+=' version="'+t.version+'"',t.encoding!=null&&(o+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(o+=' standalone="'+t.standalone+'"'),S.state=d.CloseTag,o+=S.spaceBeforeSlash+"?>",o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.docType=function(t,S,x){var o,k,O,b,v;if(x||(x=0),this.openNode(t,S,x),S.state=d.OpenTag,b=this.indent(t,S,x),b+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?b+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(b+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(b+=" [",b+=this.endline(t,S,x),S.state=d.InsideTag,v=t.children,k=0,O=v.length;k<O;k++)o=v[k],b+=this.writeChildNode(o,S,x+1);S.state=d.CloseTag,b+="]"}return S.state=d.CloseTag,b+=S.spaceBeforeSlash+">",b+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),b},a.prototype.element=function(t,S,x){var o,k,O,b,v,g,w,M,N,I,G,z,H,K;x||(x=0),I=!1,G="",this.openNode(t,S,x),S.state=d.OpenTag,G+=this.indent(t,S,x)+"<"+t.name,z=t.attribs;for(N in z){if(!i.call(z,N))continue;o=z[N],G+=this.attribute(o,S,x)}if(O=t.children.length,b=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===P.Text||U.type===P.Raw)&&U.value===""}))S.allowEmpty?(G+=">",S.state=d.CloseTag,G+="</"+t.name+">"+this.endline(t,S,x)):(S.state=d.CloseTag,G+=S.spaceBeforeSlash+"/>"+this.endline(t,S,x));else if(S.pretty&&O===1&&(b.type===P.Text||b.type===P.Raw)&&b.value!=null)G+=">",S.state=d.InsideTag,S.suppressPrettyCount++,I=!0,G+=this.writeChildNode(b,S,x+1),S.suppressPrettyCount--,I=!1,S.state=d.CloseTag,G+="</"+t.name+">"+this.endline(t,S,x);else{if(S.dontPrettyTextNodes){for(H=t.children,v=0,w=H.length;v<w;v++)if(k=H[v],(k.type===P.Text||k.type===P.Raw)&&k.value!=null){S.suppressPrettyCount++,I=!0;break}}for(G+=">"+this.endline(t,S,x),S.state=d.InsideTag,K=t.children,g=0,M=K.length;g<M;g++)k=K[g],G+=this.writeChildNode(k,S,x+1);S.state=d.CloseTag,G+=this.indent(t,S,x)+"</"+t.name+">",I&&S.suppressPrettyCount--,G+=this.endline(t,S,x),S.state=d.None}return this.closeNode(t,S,x),G},a.prototype.writeChildNode=function(t,S,x){switch(t.type){case P.CData:return this.cdata(t,S,x);case P.Comment:return this.comment(t,S,x);case P.Element:return this.element(t,S,x);case P.Raw:return this.raw(t,S,x);case P.Text:return this.text(t,S,x);case P.ProcessingInstruction:return this.processingInstruction(t,S,x);case P.Dummy:return"";case P.Declaration:return this.declaration(t,S,x);case P.DocType:return this.docType(t,S,x);case P.AttributeDeclaration:return this.dtdAttList(t,S,x);case P.ElementDeclaration:return this.dtdElement(t,S,x);case P.EntityDeclaration:return this.dtdEntity(t,S,x);case P.NotationDeclaration:return this.dtdNotation(t,S,x);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},a.prototype.processingInstruction=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<?",S.state=d.InsideTag,o+=t.target,t.value&&(o+=" "+t.value),S.state=d.CloseTag,o+=S.spaceBeforeSlash+"?>",o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.raw=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x),S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.text=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x),S.state=d.InsideTag,o+=t.value,S.state=d.CloseTag,o+=this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdAttList=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<!ATTLIST",S.state=d.InsideTag,o+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(o+=" "+t.defaultValueType),t.defaultValue&&(o+=' "'+t.defaultValue+'"'),S.state=d.CloseTag,o+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdElement=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<!ELEMENT",S.state=d.InsideTag,o+=" "+t.name+" "+t.value,S.state=d.CloseTag,o+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdEntity=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<!ENTITY",S.state=d.InsideTag,t.pe&&(o+=" %"),o+=" "+t.name,t.value?o+=' "'+t.value+'"':(t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),t.nData&&(o+=" NDATA "+t.nData)),S.state=d.CloseTag,o+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.dtdNotation=function(t,S,x){var o;return this.openNode(t,S,x),S.state=d.OpenTag,o=this.indent(t,S,x)+"<!NOTATION",S.state=d.InsideTag,o+=" "+t.name,t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?o+=' PUBLIC "'+t.pubID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),S.state=d.CloseTag,o+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=d.None,this.closeNode(t,S,x),o},a.prototype.openNode=function(t,S,x){},a.prototype.closeNode=function(t,S,x){},a.prototype.openAttribute=function(t,S,x){},a.prototype.closeAttribute=function(t,S,x){},a}()}).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,Z,L){"use strict";(function(){var P,d,T,D,u,p,C,E,l,s;s=j("./Utility"),E=s.assign,l=s.isFunction,T=j("./XMLDOMImplementation"),D=j("./XMLDocument"),u=j("./XMLDocumentCB"),C=j("./XMLStringWriter"),p=j("./XMLStreamWriter"),P=j("./NodeType"),d=j("./WriterState"),Z.exports.create=function(n,h,f,c){var m,_;if(n==null)throw new Error("Root element needs a name.");return c=E({},h,f,c),m=new D(c),_=m.element(n),c.headless||(m.declaration(c),(c.pubID!=null||c.sysID!=null)&&m.dtd(c)),_},Z.exports.begin=function(n,h,f){var c;return l(n)&&(c=[n,h],h=c[0],f=c[1],n={}),h?new u(n,h,f):new D(n)},Z.exports.stringWriter=function(n){return new C(n)},Z.exports.streamWriter=function(n,h){return new p(n,h)},Z.exports.implementation=new T,Z.exports.nodeType=P,Z.exports.writerState=d}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Z,L){Z.exports=d;var P=Object.prototype.hasOwnProperty;function d(){for(var T={},D=0;D<arguments.length;D++){var u=arguments[D];for(var p in u)P.call(u,p)&&(T[p]=u[p])}return T}},{}],284:[function(j,Z,L){"use strict";var P=j("buffer").Buffer,d=j("./sha"),T=j("./md5"),D={sha1:d,md5:T},u=64,p=P.alloc(u);p.fill(0);function C(s,n,h){P.isBuffer(n)||(n=P.from(n)),P.isBuffer(h)||(h=P.from(h)),n.length>u?n=s(n):n.length<u&&(n=P.concat([n,p],u));for(var f=P.alloc(u),c=P.alloc(u),m=0;m<u;m++)f[m]=n[m]^54,c[m]=n[m]^92;var _=s(P.concat([f,h]));return s(P.concat([c,_]))}function E(s,n){s=s||"sha1";var h=D[s],f=[],c=0;return h||l("algorithm:",s,"is not yet supported"),{update:function(_){return P.isBuffer(_)||(_=P.from(_)),f.push(_),c+=_.length,this},digest:function(_){var y=P.concat(f),i=n?C(h,n,y):h(y);return f=null,_?i.toString(_):i}}}function l(){var s=[].slice.call(arguments).join(" ");throw new Error([s,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}L.createHash=function(s){return E(s)},L.createHmac=function(s,n){return E(s,n)},L.createCredentials=function(){l("sorry,createCredentials is not implemented yet")},L.createCipher=function(){l("sorry,createCipher is not implemented yet")},L.createCipheriv=function(){l("sorry,createCipheriv is not implemented yet")},L.createDecipher=function(){l("sorry,createDecipher is not implemented yet")},L.createDecipheriv=function(){l("sorry,createDecipheriv is not implemented yet")},L.createSign=function(){l("sorry,createSign is not implemented yet")},L.createVerify=function(){l("sorry,createVerify is not implemented yet")},L.createDiffieHellman=function(){l("sorry,createDiffieHellman is not implemented yet")},L.pbkdf2=function(){l("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,Z,L){"use strict";var P=j("buffer").Buffer,d=4,T=P.alloc(d);T.fill(0);var D=8;function u(E,l){if(E.length%d!==0){var s=E.length+(d-E.length%d);E=P.concat([E,T],s)}for(var n=[],h=l?E.readInt32BE:E.readInt32LE,f=0;f<E.length;f+=d)n.push(h.call(E,f));return n}function p(E,l,s){for(var n=P.alloc(l),h=s?n.writeInt32BE:n.writeInt32LE,f=0;f<E.length;f++)h.call(n,E[f],f*4,!0);return n}function C(E,l,s,n){P.isBuffer(E)||(E=P.from(E));var h=l(u(E,n),E.length*D);return p(h,s,n)}Z.exports={hash:C}},{buffer:73}],286:[function(j,Z,L){"use strict";var P=j("./helpers");function d(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(n,h){n[h>>5]|=128<<h%32,n[(h+64>>>9<<4)+14]=h;for(var f=1732584193,c=-271733879,m=-1732584194,_=271733878,y=0;y<n.length;y+=16){var i=f,a=c,t=m,S=_;f=u(f,c,m,_,n[y+0],7,-680876936),_=u(_,f,c,m,n[y+1],12,-389564586),m=u(m,_,f,c,n[y+2],17,606105819),c=u(c,m,_,f,n[y+3],22,-1044525330),f=u(f,c,m,_,n[y+4],7,-176418897),_=u(_,f,c,m,n[y+5],12,1200080426),m=u(m,_,f,c,n[y+6],17,-1473231341),c=u(c,m,_,f,n[y+7],22,-45705983),f=u(f,c,m,_,n[y+8],7,1770035416),_=u(_,f,c,m,n[y+9],12,-1958414417),m=u(m,_,f,c,n[y+10],17,-42063),c=u(c,m,_,f,n[y+11],22,-1990404162),f=u(f,c,m,_,n[y+12],7,1804603682),_=u(_,f,c,m,n[y+13],12,-40341101),m=u(m,_,f,c,n[y+14],17,-1502002290),c=u(c,m,_,f,n[y+15],22,1236535329),f=p(f,c,m,_,n[y+1],5,-165796510),_=p(_,f,c,m,n[y+6],9,-1069501632),m=p(m,_,f,c,n[y+11],14,643717713),c=p(c,m,_,f,n[y+0],20,-373897302),f=p(f,c,m,_,n[y+5],5,-701558691),_=p(_,f,c,m,n[y+10],9,38016083),m=p(m,_,f,c,n[y+15],14,-660478335),c=p(c,m,_,f,n[y+4],20,-405537848),f=p(f,c,m,_,n[y+9],5,568446438),_=p(_,f,c,m,n[y+14],9,-1019803690),m=p(m,_,f,c,n[y+3],14,-187363961),c=p(c,m,_,f,n[y+8],20,1163531501),f=p(f,c,m,_,n[y+13],5,-1444681467),_=p(_,f,c,m,n[y+2],9,-51403784),m=p(m,_,f,c,n[y+7],14,1735328473),c=p(c,m,_,f,n[y+12],20,-1926607734),f=C(f,c,m,_,n[y+5],4,-378558),_=C(_,f,c,m,n[y+8],11,-2022574463),m=C(m,_,f,c,n[y+11],16,1839030562),c=C(c,m,_,f,n[y+14],23,-35309556),f=C(f,c,m,_,n[y+1],4,-1530992060),_=C(_,f,c,m,n[y+4],11,1272893353),m=C(m,_,f,c,n[y+7],16,-155497632),c=C(c,m,_,f,n[y+10],23,-1094730640),f=C(f,c,m,_,n[y+13],4,681279174),_=C(_,f,c,m,n[y+0],11,-358537222),m=C(m,_,f,c,n[y+3],16,-722521979),c=C(c,m,_,f,n[y+6],23,76029189),f=C(f,c,m,_,n[y+9],4,-640364487),_=C(_,f,c,m,n[y+12],11,-421815835),m=C(m,_,f,c,n[y+15],16,530742520),c=C(c,m,_,f,n[y+2],23,-995338651),f=E(f,c,m,_,n[y+0],6,-198630844),_=E(_,f,c,m,n[y+7],10,1126891415),m=E(m,_,f,c,n[y+14],15,-1416354905),c=E(c,m,_,f,n[y+5],21,-57434055),f=E(f,c,m,_,n[y+12],6,1700485571),_=E(_,f,c,m,n[y+3],10,-1894986606),m=E(m,_,f,c,n[y+10],15,-1051523),c=E(c,m,_,f,n[y+1],21,-2054922799),f=E(f,c,m,_,n[y+8],6,1873313359),_=E(_,f,c,m,n[y+15],10,-30611744),m=E(m,_,f,c,n[y+6],15,-1560198380),c=E(c,m,_,f,n[y+13],21,1309151649),f=E(f,c,m,_,n[y+4],6,-145523070),_=E(_,f,c,m,n[y+11],10,-1120210379),m=E(m,_,f,c,n[y+2],15,718787259),c=E(c,m,_,f,n[y+9],21,-343485551),f=l(f,i),c=l(c,a),m=l(m,t),_=l(_,S)}return Array(f,c,m,_)}function D(n,h,f,c,m,_){return l(s(l(l(h,n),l(c,_)),m),f)}function u(n,h,f,c,m,_,y){return D(h&f|~h&c,n,h,m,_,y)}function p(n,h,f,c,m,_,y){return D(h&c|f&~c,n,h,m,_,y)}function C(n,h,f,c,m,_,y){return D(h^f^c,n,h,m,_,y)}function E(n,h,f,c,m,_,y){return D(f^(h|~c),n,h,m,_,y)}function l(n,h){var f=(n&65535)+(h&65535),c=(n>>16)+(h>>16)+(f>>16);return c<<16|f&65535}function s(n,h){return n<<h|n>>>32-h}Z.exports=function(h){return P.hash(h,T,16)}},{"./helpers":285}],287:[function(j,Z,L){"use strict";var P=j("./helpers");function d(C,E){C[E>>5]|=128<<24-E%32,C[(E+64>>9<<4)+15]=E;for(var l=Array(80),s=1732584193,n=-271733879,h=-1732584194,f=271733878,c=-1009589776,m=0;m<C.length;m+=16){for(var _=s,y=n,i=h,a=f,t=c,S=0;S<80;S++){S<16?l[S]=C[m+S]:l[S]=p(l[S-3]^l[S-8]^l[S-14]^l[S-16],1);var x=u(u(p(s,5),T(S,n,h,f)),u(u(c,l[S]),D(S)));c=f,f=h,h=p(n,30),n=s,s=x}s=u(s,_),n=u(n,y),h=u(h,i),f=u(f,a),c=u(c,t)}return Array(s,n,h,f,c)}function T(C,E,l,s){return C<20?E&l|~E&s:C<40?E^l^s:C<60?E&l|E&s|l&s:E^l^s}function D(C){return C<20?1518500249:C<40?1859775393:C<60?-1894007588:-899497514}function u(C,E){var l=(C&65535)+(E&65535),s=(C>>16)+(E>>16)+(l>>16);return s<<16|l&65535}function p(C,E){return C<<E|C>>>32-E}Z.exports=function(E){return P.hash(E,d,20,!0)}},{"./helpers":285}],288:[function(j,Z,L){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(j,Z,L){(function(P){"use strict";var d=j("babel-runtime/helpers/typeof"),T=D(d);function D(s){return s&&s.__esModule?s:{default:s}}var u=j("stream"),p=u.Stream,C=j("../lib/common/utils/isArray"),E=C.isArray;Z.exports.string=function(n){return typeof n=="string"},Z.exports.array=E,Z.exports.buffer=P.isBuffer;function l(s){return s instanceof p}Z.exports.writableStream=function(n){return l(n)&&typeof n._write=="function"&&(0,T.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,Z,L){"use strict";L.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(d){return P}},L.escape=j("escape-html"),L.timestamp=function(d){if(d){var T=d;return typeof T=="string"&&(T=Number(T)),String(d).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Z,L){(function(P,d){"use strict";var T=j("babel-runtime/core-js/json/stringify"),D=C(T),u=j("babel-runtime/helpers/typeof"),p=C(u);function C(S){return S&&S.__esModule?S:{default:S}}var E=j("util"),l=j("url"),s=j("http"),n=j("https"),h=j("debug")("urllib"),f=j("humanize-ms"),c,m=0,_=Math.pow(2,31)-10,y=/^https?:\/\//i;function i(S,x){return S===void 0?x:S}function a(S,x){return function(o,k,O){if(o)return x(o);S({data:k,status:O.statusCode,headers:O.headers,res:O})}}L.TIMEOUTS=[f("300s"),f("300s")];var t=["json","text"];L.request=function(x,o,k){return arguments.length===2&&typeof o=="function"&&(k=o,o=null),typeof k=="function"?L.requestWithCallback(x,o,k):(c||(c=j("any-promise")),new c(function(O,b){L.requestWithCallback(x,o,a(O,b))}))},L.requestWithCallback=function(x,o,k){if(!x||typeof x!="string"&&(typeof x=="undefined"?"undefined":(0,p.default)(x))!=="object"){var O=E.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(O)}arguments.length===2&&typeof o=="function"&&(k=o,o=null),o=o||{},m>=_&&(m=0);var b=++m;o.requestUrls=o.requestUrls||[];var v={requestId:b,url:x,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",v),o.timeout=o.timeout||L.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var g=Date.now(),w;typeof x=="string"?(y.test(x)||(x="http://"+x),w=l.parse(x)):w=x;var M=(o.type||o.method||w.method||"GET").toUpperCase(),N=w.port||80,I=s,G=i(o.agent,L.agent),z=o.fixJSONCtlChars;w.protocol==="https:"&&(I=n,G=i(o.httpsAgent,L.httpsAgent),w.port||(N=443));var H={host:w.hostname||w.host||"localhost",path:w.path||"/",method:M,port:N,agent:G,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?H.requestTimeout=o.timeout[o.timeout.length-1]:typeof o.timeout!="undefined"&&(H.requestTimeout=o.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<K.length;U++){var B=K[U];o.hasOwnProperty(B)&&(H[B]=o[B])}H.rejectUnauthorized===!1&&!H.hasOwnProperty("secureOptions")&&(H.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var V=o.auth||w.auth;V&&(H.auth=V);var ae=o.content||o.data,he=M==="GET"||M==="HEAD"||o.dataAsQueryString;if(!o.content&&(ae&&!(typeof ae=="string"||d.isBuffer(ae))))if(he)ae=o.nestedQuerystring?qs.stringify(ae):querystring.stringify(ae);else{var pe=H.headers["Content-Type"]||H.headers["content-type"];pe||(o.contentType==="json"?pe="application/json":pe="application/x-www-form-urlencoded",H.headers["Content-Type"]=pe),parseContentType(pe).type==="application/json"?ae=(0,D.default)(ae):ae=o.nestedQuerystring?qs.stringify(ae):querystring.stringify(ae)}he&&ae&&(H.path+=(w.query?"&":"?")+ae,ae=null);var Re=0;if(ae){var ke=ae.length;d.isBuffer(ae)||(ke=d.byteLength(ae)),Re=H.headers["Content-Length"]=ke}o.dataType==="json"&&(H.headers.Accept="application/json"),typeof o.beforeRequest=="function"&&o.beforeRequest(H);var ve=null,Te=null,be=null,ue=!1,le=!1,re=0,fe=-1,q=!1,ee="",Ce="",te=null;o.timing&&(te={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){ve&&(clearTimeout(ve),ve=null)}function X(){Te&&(clearTimeout(Te),Te=null)}function Q(De,at,ht){if(X(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),b,P.pid,H.method,x),De&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),b,P.pid,De.name,De.message,De.stack);return}var Ze=k;k=null;var st={};if(ht&&(fe=ht.statusCode,st=ht.headers),fe===401&&st["www-authenticate"]&&(!o.headers||!o.headers.Authorization)&&o.digestAuth){var Ue=st["www-authenticate"];if(Ue.indexOf("Digest ")>=0)return h("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,x,Ue),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(H.method,H.path,Ue,o.digestAuth),h("Request#%d %s: auth with digest header: %s",b,x,o.headers.Authorization),ht.headers["set-cookie"]&&(o.headers.Cookie=ht.headers["set-cookie"].join(";")),L.requestWithCallback(x,o,Ze)}var Me=Date.now()-g;te&&(te.contentDownload=Me),h("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,re,fe,H.method,H.host,H.path,le,te);var Ne={status:fe,statusCode:fe,headers:st,size:re,aborted:q,rt:Me,keepAliveSocket:le,data:at,requestUrls:o.requestUrls,timing:te,remoteAddress:ee,remotePort:Ce};if(De){var xe="";G&&typeof G.getCurrentStatus=="function"&&(xe=", agent status: "+(0,D.default)(G.getCurrentStatus())),De.message+=", "+H.method+" "+x+" "+fe+" (connected: "+ue+", keepalive socket: "+le+xe+`)
headers: `+(0,D.default)(st),De.data=at,De.path=H.path,De.status=fe,De.headers=st,De.res=Ne}Ze(De,at,o.streaming?ht:Ne),o.emitter&&(v.url=x,v.socket=mt&&mt.connection,v.options=H,v.size=Re,o.emitter.emit("response",{requestId:b,error:De,ctx:o.ctx,req:v,res:Ne}))}function Ee(De){var at=null;if(o.followRedirect&&statuses.redirect[De.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var ht=De.headers.location;if(!ht)at=new Error("Got statusCode "+De.statusCode+" but cannot resolve next location from headers"),at.name="FollowRedirectError";else if(o._followRedirectCount>o.maxRedirects)at=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),at.name="MaxRedirectError";else{var Ze=o.formatRedirectUrl?o.formatRedirectUrl(x,ht):l.resolve(x,ht);h("Request#%d %s: `redirected` from %s to %s",b,H.path,x,Ze),X(),o.headers&&o.headers.Host&&y.test(ht)&&(o.headers.Host=null);var st=k;return k=null,L.requestWithCallback(Ze,o,st),{redirect:!0,error:null}}}return{redirect:!1,error:at}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),o.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ge(De,at,ht){var Ze=De.headers["content-encoding"];return ht(null,at,Ze)}var Oe=o.writeStream;h("Request#%d %s %s with headers %j, options.path: %s",b,M,x,H.headers,H.path),o.requestUrls.push(x);function Qe(De){if(te&&(te.waiting=Date.now()-g),h("Request#%d %s `req response` event emit: status %d, headers: %j",b,x,De.statusCode,De.headers),o.streaming){var at=Ee(De);if(at.redirect){De.resume();return}return at.error?(De.resume(),Q(at.error,null,De)):Q(null,null,De)}if(De.on("close",function(){h("Request#%d %s: `res close` event emit, total size %d",b,x,re)}),De.on("error",function(){h("Request#%d %s: `res error` event emit, total size %d",b,x,re)}),De.on("aborted",function(){q=!0,h("Request#%d %s: `res aborted` event emit, total size %d",b,x,re)}),Oe){var at=Ee(De);if(at.redirect){De.resume();return}return at.error?(De.resume(),Oe.end(),Q(at.error,null,De)):(o.consumeWriteStream===!1?De.on("end",Q.bind(null,null,null,De)):isNode010||isNode012?first([[Oe,"close"],[De,"aborted"]],function(st,Ue,Me){h("Request#%d %s: writeStream or res %s event emitted",b,x,Me),Q(be||null,null,De)}):Oe.on("close",function(){h("Request#%d %s: writeStream close event emitted",b,x),Q(be||null,null,De)}),De.pipe(Oe))}var ht=[];De.on("data",function(Ze){h("Request#%d %s: `res data` event emit, size %d",b,x,Ze.length),re+=Ze.length,ht.push(Ze)}),De.on("end",function(){var Ze=d.concat(ht,re);if(h("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,x,re,De._dumped),be)return Q(be,Ze,De);var st=Ee(De);if(st.error)return Q(st.error,Ze,De);if(st.redirect)return;ge(De,Ze,function(Ue,Me,Ne){if(Ue)return Q(Ue,Ze,De);if(!Ne&&t.indexOf(o.dataType)>=0){try{Me=decodeBodyByCharset(Me,De)}catch(Se){return h("decodeBodyByCharset error: %s",Se),Q(null,Me,De)}if(o.dataType==="json")if(re===0)Me=null;else{var xe=parseJSON(Me,z);xe.error?Ue=xe.error:Me=xe.data}}q&&h("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,x),Q(Ue,Me,De)})})}var rt,nt;Array.isArray(o.timeout)?(rt=f(o.timeout[0]),nt=f(o.timeout[1])):rt=nt=f(o.timeout),h("ConnectTimeout: %d, ResponseTimeout: %d",rt,nt);function ut(){h("Connect timer ticking, timeout: %d",rt),ve=setTimeout(function(){ve=null,fe===-1&&(fe=-2);var De="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";mt.socket||(at="SocketAssignTimeoutError",De+=", working sockets is full"),be=new Error(De),be.name=at,be.requestId=b,h("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,x,be.name,De,ue),He()},rt)}function dt(){h("Response timer ticking, timeout: %d",nt),Te=setTimeout(function(){Te=null;var De="Response timeout for "+nt+"ms",at="ResponseTimeoutError";be=new Error(De),be.name=at,be.requestId=b,h("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,x,be.name,De,ue),He()},nt)}var mt;H.mode=o.mode?o.mode:"";try{mt=I.request(H,Qe)}catch(De){return Q(De)}typeof window=="undefined"?ut():mt.on("requestTimeout",function(){fe===-1&&(fe=-2);var De="Connect timeout for "+rt+"ms",at="ConnectionTimeoutError";be=new Error(De),be.name=at,be.requestId=b,He()});function He(){h("Request#%d %s abort, connected: %s",b,x,ue),mt.socket||(be.noSocket=!0,Q(be)),mt.abort()}return te&&mt.on("finish",function(){te.requestSent=Date.now()-g}),mt.once("socket",function(De){te&&(te.queuing=Date.now()-g),isNode010&&De.socket&&(De=De.socket);var at=De.readyState;if(at==="opening"){De.once("lookup",function(ht,Ze,st){h("Request#%d %s lookup: %s, %s, %s",b,x,ht,Ze,st),te&&(te.dnslookup=Date.now()-g),Ze&&(ee=Ze)}),De.once("connect",function(){te&&(te.connected=Date.now()-g),J(),dt(),h("Request#%d %s new socket connected",b,x),ue=!0,ee||(ee=De.remoteAddress),Ce=De.remotePort});return}h("Request#%d %s reuse socket connected, readyState: %s",b,x,at),ue=!0,le=!0,ee||(ee=De.remoteAddress),Ce=De.remotePort,J(),dt()}),mt.on("error",function(De){(De.name==="Error"||De.name==="TypeError")&&(De.name=ue?"ResponseError":"RequestError"),De.message+=' (req "error")',h("Request#%d %s `req error` event emit, %s: %s",b,x,De.name,De.message),Q(be||De)}),Oe&&Oe.once("error",function(De){De.message+=' (writeStream "error")',be=De,h("Request#%d %s `writeStream error` event emit, %s: %s",b,x,De.name,De.message),He()}),o.stream?(o.stream.pipe(mt),o.stream.once("error",function(De){De.message+=' (stream "error")',be=De,h("Request#%d %s `readStream error` event emit, %s: %s",b,x,De.name,De.message),He()})):mt.end(ae),mt.requestId=b,mt}}).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,Z,L){"use strict";L.d(Z,"a",function(){return E});var P=L("q1tI"),d=L("biw7"),T=L("fyJ8");function D(l){var s=l.className,n=l.index,h=l.children,f=l.colSpan,c=l.rowSpan,m=P.useContext(d.a),_=m.prefixCls,y=m.fixedInfoList,i=y[n];return P.createElement(T.a,Object.assign({className:s,index:n,component:"td",prefixCls:_,record:null,dataIndex:null,render:function(){return{children:h,props:{colSpan:f,rowSpan:c}}}},i))}function u(l){return P.createElement("tr",Object.assign({},l))}function p(l){var s=l.children,n=P.useContext(d.a),h=n.prefixCls;return P.createElement("tfoot",{className:"".concat(h,"-summary")},s)}var C=Z.b=p,E={Cell:D,Row:u}},oRuE:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(d,T){var D=T*4,u=D-d.sigBytes%D;d.concat(P.lib.WordArray.random(u-1)).concat(P.lib.WordArray.create([u<<24],1))},unpad:function(d){var T=d.words[d.sigBytes-1>>>2]&255;d.sigBytes-=T}},P.pad.Iso10126})},osHv:function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var d=P.Pos;function T(y,i){return y.line-i.line||y.ch-i.ch}var D="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u=D+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",p=new RegExp("<(/?)(["+D+"]["+u+"]*)","g");function C(y,i,a,t){this.line=i,this.ch=a,this.cm=y,this.text=y.getLine(i),this.min=t?Math.max(t.from,y.firstLine()):y.firstLine(),this.max=t?Math.min(t.to-1,y.lastLine()):y.lastLine()}function E(y,i){var a=y.cm.getTokenTypeAt(d(y.line,i));return a&&/\btag\b/.test(a)}function l(y){return y.line>=y.max?void 0:(y.ch=0,y.text=y.cm.getLine(++y.line),!0)}function s(y){return y.line<=y.min?void 0:(y.text=y.cm.getLine(--y.line),y.ch=y.text.length,!0)}function n(y){for(;;){var i=y.text.indexOf(">",y.ch);if(i==-1){if(l(y))continue;return}if(!E(y,i+1)){y.ch=i+1;continue}var a=y.text.lastIndexOf("/",i),t=a>-1&&!/\S/.test(y.text.slice(a+1,i));return y.ch=i+1,t?"selfClose":"regular"}}function h(y){for(;;){var i=y.ch?y.text.lastIndexOf("<",y.ch-1):-1;if(i==-1){if(s(y))continue;return}if(!E(y,i+1)){y.ch=i;continue}p.lastIndex=i,y.ch=i;var a=p.exec(y.text);if(a&&a.index==i)return a}}function f(y){for(;;){p.lastIndex=y.ch;var i=p.exec(y.text);if(!i){if(l(y))continue;return}if(!E(y,i.index+1)){y.ch=i.index+1;continue}return y.ch=i.index+i[0].length,i}}function c(y){for(;;){var i=y.ch?y.text.lastIndexOf(">",y.ch-1):-1;if(i==-1){if(s(y))continue;return}if(!E(y,i+1)){y.ch=i;continue}var a=y.text.lastIndexOf("/",i),t=a>-1&&!/\S/.test(y.text.slice(a+1,i));return y.ch=i+1,t?"selfClose":"regular"}}function m(y,i){for(var a=[];;){var t=f(y),S,x=y.line,o=y.ch-(t?t[0].length:0);if(!t||!(S=n(y)))return;if(S=="selfClose")continue;if(t[1]){for(var k=a.length-1;k>=0;--k)if(a[k]==t[2]){a.length=k;break}if(k<0&&(!i||i==t[2]))return{tag:t[2],from:d(x,o),to:d(y.line,y.ch)}}else a.push(t[2])}}function _(y,i){for(var a=[];;){var t=c(y);if(!t)return;if(t=="selfClose"){h(y);continue}var S=y.line,x=y.ch,o=h(y);if(!o)return;if(o[1])a.push(o[2]);else{for(var k=a.length-1;k>=0;--k)if(a[k]==o[2]){a.length=k;break}if(k<0&&(!i||i==o[2]))return{tag:o[2],from:d(y.line,y.ch),to:d(S,x)}}}}P.registerHelper("fold","xml",function(y,i){for(var a=new C(y,i.line,0);;){var t=f(a);if(!t||a.line!=i.line)return;var S=n(a);if(!S)return;if(!t[1]&&S!="selfClose"){var x=d(a.line,a.ch),o=m(a,t[2]);return o&&T(o.from,x)>0?{from:x,to:o.from}:null}}}),P.findMatchingTag=function(y,i,a){var t=new C(y,i.line,i.ch,a);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=n(t),x=S&&d(t.line,t.ch),o=S&&h(t);if(!S||!o||T(t,i)>0)return;var k={from:d(t.line,t.ch),to:x,tag:o[2]};return S=="selfClose"?{open:k,close:null,at:"open"}:o[1]?{open:_(t,o[2]),close:k,at:"close"}:(t=new C(y,x.line,x.ch,a),{open:k,close:m(t,o[2]),at:"open"})},P.findEnclosingTag=function(y,i,a,t){for(var S=new C(y,i.line,i.ch,a);;){var x=_(S,t);if(!x)break;var o=new C(y,i.line,i.ch,a),k=m(o,x.tag);if(k)return{open:x,close:k}}},P.scanForClosingTag=function(y,i,a,t){var S=new C(y,i.line,i.ch,t?{from:0,to:t}:null);return m(S,a)}})},p5ED:function(j,Z,L){"use strict";var P=L("+L6B"),d=L("2/Rp"),T=L("5Dmo"),D=L("3S7+"),u=L("k1fw"),p=L("9og8"),C=L("tJVT"),E=L("WmNS"),l=L.n(E),s=L("q1tI"),n=L.n(s),h=L("vHTk"),f=L.n(h),c=L("yEEn"),m=L("ZW9T"),_=L("1vsH"),y=L("V0Rq"),i=L("m3rI"),a=function(S){var x=S.name,o=S.data,k=S.theme,O=S.type,b=S.filename,v=S.monacoEditor,g=S.className,w=S.style,M=S.close,N=S.onClose,I=S.hasMask,G=S.otherData,z=G===void 0?{}:G,H=Object(s.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),K=Object(C.a)(H,2),U=K[0],B=K[1],V=Object(s.useState)(""),ae=Object(C.a)(V,2),he=ae[0],pe=ae[1],Re=Object(s.useState)(),ke=Object(C.a)(Re,2),ve=ke[0],Te=ke[1],be=window.ENV==="build"?"/react/build/office.html":"/office.html",ue,le=1024*1024,re=10*le,fe=Object(s.useRef)();O==="office"&&(ue=Object(_.R)(o).filesize,ue>re&&(O="other")),b&&(v.filename=b),Object(s.useEffect)(function(){var te,J,X=(te=document.cookie)===null||te===void 0||((J=te.replace(/\s/g,""))===null||J===void 0)?void 0:J.split(";");X==null||X.map(function(Q){var Ee=Q.split("=");Ee[0]==="_educoder_session"&&pe(Ee[1])})},[]),Object(s.useEffect)(function(){O==="office"&&q()},[O]);var q=function(){var te=Object(p.a)(l.a.mark(function J(){var X,Q,Ee;return l.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return console.log("data:",o),X=o,o.startsWith("http")||(X=location.origin+X),Q=new URL(X).pathname.split("/").pop(),Oe.next=6,Object(y.U)({attachment_id:Q});case 6:Ee=Oe.sent,Te(Ee);case 8:case"end":return Oe.stop()}},J)}));return function(){return te.apply(this,arguments)}}(),ee=function(){if(o.startsWith("http")||o.startsWith("/api")||o.startsWith("blob:")){Ce();return}Object(_.x)(b||"educoder",o,b||"educoder")},Ce=function(){Object(_.v)(b||"educoder",decodeURIComponent(o))};return n.a.createElement("div",{style:Object(u.a)({},w||{}),className:"".concat(I&&f.a.bgBlack," ").concat(O?f.a.wrp:"hide")},M&&n.a.createElement("div",{className:f.a.close,ref:fe},n.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return fe.current}},n.a.createElement("span",{onClick:Ce},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return fe.current}},n.a.createElement("span",{className:"",onClick:function(){N(),Te(null)}},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(f.a[g]," ").concat(g," ").concat(f.a.monaco," ").concat(O==="txt"?"show":"hide")},O==="txt"&&n.a.createElement(m.b,v)),O==="audio"&&n.a.createElement("audio",{src:"".concat((o==null?void 0:o.indexOf("http://"))>-1||(o==null?void 0:o.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(o),autoPlay:!0}),O==="video"&&n.a.createElement(n.a.Fragment,null,(o==null?void 0:o.indexOf("/api"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(o),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(o),autoPlay:!0})),O==="office"&&ve&&n.a.createElement("iframe",{src:"".concat(be,"?key=").concat(ve.key,"&url=").concat(i.a.API_SERVER+ve.url,"&callbackUrl=").concat(i.a.API_SERVER+ve.callbackUrl,"&fileType=").concat(ve.fileType,"&title=").concat(ve.title,"&model=view")}),(O==="xlsx"||O==="doc"||O==="pptx"||O==="docx")&&n.a.createElement("iframe",{src:"".concat(be,"?key=").concat(z.key,"&url=").concat(i.a.API_SERVER+z.url,"&callbackUrl=").concat(i.a.API_SERVER+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.title,"&model=").concat(z.model)}),O==="html"&&n.a.createElement("iframe",{src:o+"&disposition=inline"}),O==="pdf"&&n.a.createElement("embed",{className:f.a.embed,src:o,type:"application/pdf"}),O==="image"&&n.a.createElement("img",{src:"".concat((o==null?void 0:o.indexOf("http://"))>-1||(o==null?void 0:o.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(o)}),O==="other"&&n.a.createElement("div",null,n.a.createElement(d.a,{type:"primary",size:"large",onClick:ee},n.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),O==="download"&&n.a.createElement(d.a,{type:"primary",size:"large",onClick:ee},n.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};Z.a=a},"p77/":function(j,Z,L){},pA7S:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=T.BlockCipher,p=d.algo,C=[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],E=[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],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],s=[{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],h=p.DES=u.extend({_doReset:function(){for(var _=this._key,y=_.words,i=[],a=0;a<56;a++){var t=C[a]-1;i[a]=y[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],x=0;x<16;x++){for(var o=S[x]=[],k=l[x],a=0;a<24;a++)o[a/6|0]|=i[(E[a]-1+k)%28]<<31-a%6,o[4+(a/6|0)]|=i[28+(E[a+24]-1+k)%28]<<31-a%6;o[0]=o[0]<<1|o[0]>>>31;for(var a=1;a<7;a++)o[a]=o[a]>>>(a-1)*4+3;o[7]=o[7]<<5|o[7]>>>27}for(var O=this._invSubKeys=[],a=0;a<16;a++)O[a]=S[15-a]},encryptBlock:function(_,y){this._doCryptBlock(_,y,this._subKeys)},decryptBlock:function(_,y){this._doCryptBlock(_,y,this._invSubKeys)},_doCryptBlock:function(_,y,i){this._lBlock=_[y],this._rBlock=_[y+1],f.call(this,4,252645135),f.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),f.call(this,1,1431655765);for(var a=0;a<16;a++){for(var t=i[a],S=this._lBlock,x=this._rBlock,o=0,k=0;k<8;k++)o|=s[k][((x^t[k])&n[k])>>>0];this._lBlock=x,this._rBlock=S^o}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,f.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),_[y]=this._lBlock,_[y+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(_,y){var i=(this._lBlock>>>_^this._rBlock)&y;this._rBlock^=i,this._lBlock^=i<<_}function c(_,y){var i=(this._rBlock>>>_^this._lBlock)&y;this._lBlock^=i,this._rBlock^=i<<_}d.DES=u._createHelper(h);var m=p.TripleDES=u.extend({_doReset:function(){var _=this._key,y=_.words;if(y.length!==2&&y.length!==4&&y.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var i=y.slice(0,2),a=y.length<4?y.slice(0,2):y.slice(2,4),t=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=h.createEncryptor(D.create(i)),this._des2=h.createEncryptor(D.create(a)),this._des3=h.createEncryptor(D.create(t))},encryptBlock:function(_,y){this._des1.encryptBlock(_,y),this._des2.decryptBlock(_,y),this._des3.encryptBlock(_,y)},decryptBlock:function(_,y){this._des3.decryptBlock(_,y),this._des2.encryptBlock(_,y),this._des1.decryptBlock(_,y)},keySize:192/32,ivSize:64/32,blockSize:64/32});d.TripleDES=u._createHelper(m)}(),P.TripleDES})},pIsd:function(j,Z,L){var P=L("BJfS"),d=function(u){var p=/[height|width]$/;return p.test(u)},T=function(u){var p="",C=Object.keys(u);return C.forEach(function(E,l){var s=u[E];E=P(E),d(E)&&typeof s=="number"&&(s=s+"px"),s===!0?p+=E:s===!1?p+="not "+E:p+="("+E+": "+s+")",l<C.length-1&&(p+=" and ")}),p},D=function(u){var p="";return typeof u=="string"?u:u instanceof Array?(u.forEach(function(C,E){p+=T(C),E<u.length-1&&(p+=", ")}),p):T(u)};j.exports=D},qBft:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(d,T){var D=d.sigBytes,u=T*4,p=u-D%u,C=D+p-1;d.clamp(),d.words[C>>>2]|=p<<24-C%4*8,d.sigBytes+=p},unpad:function(d){var T=d.words[d.sigBytes-1>>>2]&255;d.sigBytes-=T}},P.pad.Ansix923})},qHvr:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("5NDa"),D=L("5rEg"),u=L("miYZ"),p=L("tsqr"),C=L("tJVT"),E=L("q1tI"),l=L.n(E),s=L("4i/N");function n(h){var f=h.isAddmodle,c=h.setIsAdd,m=h.createTeam,_=Object(E.useState)(""),y=Object(C.a)(_,2),i=y[0],a=y[1];return l.a.createElement(d.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),l.a.createElement(s.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:f,closable:!1,destroyOnClose:!0,onOk:function(){if(!i){p.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}m(i)},onCancel:function(){return c(!1)}},l.a.createElement("div",null,l.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},l.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:i,maxLength:60,addonAfter:String(i&&i.length||0)+"/60",onChange:function(S){return a(S.target.value)}}))))}Z.a=n},qM6L:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Utf16=u.Utf16BE={stringify:function(E){for(var l=E.words,s=E.sigBytes,n=[],h=0;h<s;h+=2){var f=l[h>>>2]>>>16-h%4*8&65535;n.push(String.fromCharCode(f))}return n.join("")},parse:function(E){for(var l=E.length,s=[],n=0;n<l;n++)s[n>>>1]|=E.charCodeAt(n)<<16-n%2*16;return D.create(s,l*2)}};u.Utf16LE={stringify:function(E){for(var l=E.words,s=E.sigBytes,n=[],h=0;h<s;h+=2){var f=C(l[h>>>2]>>>16-h%4*8&65535);n.push(String.fromCharCode(f))}return n.join("")},parse:function(E){for(var l=E.length,s=[],n=0;n<l;n++)s[n>>>1]|=C(E.charCodeAt(n)<<16-n%2*16);return D.create(s,l*2)}};function C(E){return E<<8&4278255360|E>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return P.mode.CTRGladman=function(){var d=P.lib.BlockCipherMode.extend();function T(p){if((p>>24&255)===255){var C=p>>16&255,E=p>>8&255,l=p&255;C===255?(C=0,E===255?(E=0,l===255?l=0:++l):++E):++C,p=0,p+=C<<16,p+=E<<8,p+=l}else p+=1<<24;return p}function D(p){return(p[0]=T(p[0]))===0&&(p[1]=T(p[1])),p}var u=d.Encryptor=d.extend({processBlock:function(p,C){var E=this._cipher,l=E.blockSize,s=this._iv,n=this._counter;s&&(n=this._counter=s.slice(0),this._iv=void 0),D(n);var h=n.slice(0);E.encryptBlock(h,0);for(var f=0;f<l;f++)p[C+f]^=h[f]}});return d.Decryptor=u,d}(),P.mode.CTRGladman})},"rAM+":function(j,Z,L){"use strict";L.d(Z,"a",function(){return d});var P=L("Qw5x");function d(T,D){var u;if(typeof Symbol=="undefined"||T[Symbol.iterator]==null){if(Array.isArray(T)||(u=Object(P.a)(T))||D&&T&&typeof T.length=="number"){u&&(T=u);var p=0,C=function(){};return{s:C,n:function(){return p>=T.length?{done:!0}:{done:!1,value:T[p++]}},e:function(h){throw h},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E=!0,l=!1,s;return{s:function(){u=T[Symbol.iterator]()},n:function(){var h=u.next();return E=h.done,h},e:function(h){l=!0,s=h},f:function(){try{!E&&u.return!=null&&u.return()}finally{if(l)throw s}}}}},rUJ1:function(j,Z){const L=/[&<>"']/,P=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=O=>D[O];function p(O,b){if(b){if(L.test(O))return O.replace(P,u)}else if(d.test(O))return O.replace(T,u);return O}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function E(O){return O.replace(C,(b,v)=>(v=v.toLowerCase(),v==="colon"?":":v.charAt(0)==="#"?v.charAt(1)==="x"?String.fromCharCode(parseInt(v.substring(2),16)):String.fromCharCode(+v.substring(1)):""))}const l=/(^|[^\[])\^/g;function s(O,b){O=O.source||O,b=b||"";const v={replace:(g,w)=>(w=w.source||w,w=w.replace(l,"$1"),O=O.replace(g,w),v),getRegex:()=>new RegExp(O,b)};return v}const n=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(O,b,v){if(O){let g;try{g=decodeURIComponent(E(v)).replace(n,"").toLowerCase()}catch(w){return null}if(g.indexOf("javascript:")===0||g.indexOf("vbscript:")===0||g.indexOf("data:")===0)return null}b&&!h.test(v)&&(v=i(b,v));try{v=encodeURI(v).replace(/%25/g,"%")}catch(g){return null}return v}const c={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(O,b){c[" "+O]||(m.test(O)?c[" "+O]=O+"/":c[" "+O]=x(O,"/",!0)),O=c[" "+O];const v=O.indexOf(":")===-1;return b.substring(0,2)==="//"?v?b:O.replace(_,"$1")+b:b.charAt(0)==="/"?v?b:O.replace(y,"$1")+b:O+b}const a={exec:function(){}};function t(O){let b=1,v,g;for(;b<arguments.length;b++){v=arguments[b];for(g in v)Object.prototype.hasOwnProperty.call(v,g)&&(O[g]=v[g])}return O}function S(O,b){const v=O.replace(/\|/g,(M,N,I)=>{let G=!1,z=N;for(;--z>=0&&I[z]==="\\";)G=!G;return G?"|":" |"}),g=v.split(/ \|/);let w=0;if(g.length>b)g.splice(b);else for(;g.length<b;)g.push("");for(;w<g.length;w++)g[w]=g[w].trim().replace(/\\\|/g,"|");return g}function x(O,b,v){const g=O.length;if(g===0)return"";let w=0;for(;w<g;){const M=O.charAt(g-w-1);if(M===b&&!v)w++;else if(M!==b&&v)w++;else break}return O.substr(0,g-w)}function o(O,b){if(O.indexOf(b[1])===-1)return-1;const v=O.length;let g=0,w=0;for(;w<v;w++)if(O[w]==="\\")w++;else if(O[w]===b[0])g++;else if(O[w]===b[1]&&(g--,g<0))return w;return-1}function k(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:p,unescape:E,edit:s,cleanUrl:f,resolveUrl:i,noopTest:a,merge:t,splitCells:S,rtrim:x,findClosingBracket:o,checkSanitizeDeprecation:k}},sR1s:function(j,Z,L){"use strict";L.d(Z,"b",function(){return D}),L.d(Z,"a",function(){return u}),L.d(Z,"c",function(){return p}),L.d(Z,"d",function(){return C});var P=L("U8pU"),d="RC_TABLE_KEY";function T(E){return E==null?[]:Array.isArray(E)?E:[E]}function D(E,l){if(!l&&typeof l!="number")return E;for(var s=T(l),n=E,h=0;h<s.length;h+=1){if(!n)return null;var f=s[h];n=n[f]}return n}function u(E){var l=[],s={};return E.forEach(function(n){for(var h=n||{},f=h.key,c=h.dataIndex,m=f||T(c).join("-")||d;s[m];)m="".concat(m,"_next");s[m]=!0,l.push(m)}),l}function p(){var E={};function l(f,c){c&&Object.keys(c).forEach(function(m){var _=c[m];_&&Object(P.a)(_)==="object"?(f[m]=f[m]||{},l(f[m],_)):f[m]=_})}for(var s=arguments.length,n=new Array(s),h=0;h<s;h++)n[h]=arguments[h];return n.forEach(function(f){l(E,f)}),E}function C(E){return E!=null}},sboe:function(j,Z,L){"use strict";L.d(Z,"a",function(){return T});var P=L("q1tI"),d=L.n(P),T=P.createContext(null)},t23M:function(j,Z,L){"use strict";var P=L("VTBJ"),d=L("1OyB"),T=L("vuIU"),D=L("Ji7U"),u=L("LK+K"),p=L("q1tI"),C=L.n(p),E=L("m+aA"),l=L("Zm9Q"),s=L("Kwbf"),n=L("c+Xe"),h=L("bdgK"),f="rc-observer-key",c=function(m){Object(D.a)(y,m);var _=Object(u.a)(y);function y(){var i;return Object(d.a)(this,y),i=_.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(a){var t=i.props.onResize,S=a[0].target,x=S.getBoundingClientRect(),o=x.width,k=x.height,O=S.offsetWidth,b=S.offsetHeight,v=Math.floor(o),g=Math.floor(k);if(i.state.width!==v||i.state.height!==g||i.state.offsetWidth!==O||i.state.offsetHeight!==b){var w={width:v,height:g,offsetWidth:O,offsetHeight:b};i.setState(w),t&&Promise.resolve().then(function(){t(Object(P.a)(Object(P.a)({},w),{},{offsetWidth:O,offsetHeight:b}))})}},i.setChildNode=function(a){i.childNode=a},i}return Object(T.a)(y,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var a=this.props.disabled;if(a){this.destroyObserver();return}var t=Object(E.a)(this.childNode||this),S=t!==this.currentElement;S&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new h.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,t=Object(l.a)(a);if(t.length>1)Object(s.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(s.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(p.isValidElement(S)&&Object(n.c)(S)){var x=S.ref;t[0]=p.cloneElement(S,{ref:Object(n.a)(x,this.setChildNode)})}return t.length===1?t[0]:t.map(function(o,k){return!p.isValidElement(o)||"key"in o&&o.key!==null?o:p.cloneElement(o,{key:"".concat(f,"-").concat(k)})})}}]),y}(p.Component);c.displayName="ResizeObserver",Z.a=c},uGsb:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"),L("1uat"))})(this,function(P){return function(){var d=P,T=d.x64,D=T.Word,u=T.WordArray,p=d.algo,C=p.SHA512,E=p.SHA384=C.extend({_doReset:function(){this._hash=new u.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var l=C._doFinalize.call(this);return l.sigBytes-=16,l}});d.SHA384=C._createHelper(E),d.HmacSHA384=C._createHmacHelper(E)}(),P.SHA384})},uGxW:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(j,Z,L){(function(P,d){j.exports=d()})(this,function(){"use strict";function P(d,T,D){D=D||{},D.childrenKeyName=D.childrenKeyName||"children";var u=d||[],p=[],C=0;do{var E=u.filter(function(l){return T(l,C)})[0];if(!E)break;p.push(E),u=E[D.childrenKeyName]||[],C+=1}while(u.length>0);return p}return P})},ulZh:function(j,Z,L){typeof window!="undefined"&&function(d,T){j.exports=T()}(this,function(){return function(P){var d={};function T(D){if(d[D])return d[D].exports;var u=d[D]={i:D,l:!1,exports:{}};return P[D].call(u.exports,u,u.exports,T),u.l=!0,u.exports}return T.m=P,T.c=d,T.d=function(D,u,p){T.o(D,u)||Object.defineProperty(D,u,{enumerable:!0,get:p})},T.r=function(D){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})},T.t=function(D,u){if(u&1&&(D=T(D)),u&8)return D;if(u&4&&typeof D=="object"&&D&&D.__esModule)return D;var p=Object.create(null);if(T.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:D}),u&2&&typeof D!="string")for(var C in D)T.d(p,C,function(E){return D[E]}.bind(null,C));return p},T.n=function(D){var u=D&&D.__esModule?function(){return D.default}:function(){return D};return T.d(u,"a",u),u},T.o=function(D,u){return Object.prototype.hasOwnProperty.call(D,u)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,d,T){"use strict";var D=Object.prototype.hasOwnProperty,u="~";function p(){}Object.create&&(p.prototype=Object.create(null),new p().__proto__||(u=!1));function C(n,h,f){this.fn=n,this.context=h,this.once=f||!1}function E(n,h,f,c,m){if(typeof f!="function")throw new TypeError("The listener must be a function");var _=new C(f,c||n,m),y=u?u+h:h;return n._events[y]?n._events[y].fn?n._events[y]=[n._events[y],_]:n._events[y].push(_):(n._events[y]=_,n._eventsCount++),n}function l(n,h){--n._eventsCount===0?n._events=new p:delete n._events[h]}function s(){this._events=new p,this._eventsCount=0}s.prototype.eventNames=function(){var h=[],f,c;if(this._eventsCount===0)return h;for(c in f=this._events)D.call(f,c)&&h.push(u?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(f)):h},s.prototype.listeners=function(h){var f=u?u+h:h,c=this._events[f];if(!c)return[];if(c.fn)return[c.fn];for(var m=0,_=c.length,y=new Array(_);m<_;m++)y[m]=c[m].fn;return y},s.prototype.listenerCount=function(h){var f=u?u+h:h,c=this._events[f];return c?c.fn?1:c.length:0},s.prototype.emit=function(h,f,c,m,_,y){var i=u?u+h:h;if(!this._events[i])return!1;var a=this._events[i],t=arguments.length,S,x;if(a.fn){a.once&&this.removeListener(h,a.fn,void 0,!0);switch(t){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,f),!0;case 3:return a.fn.call(a.context,f,c),!0;case 4:return a.fn.call(a.context,f,c,m),!0;case 5:return a.fn.call(a.context,f,c,m,_),!0;case 6:return a.fn.call(a.context,f,c,m,_,y),!0}for(x=1,S=new Array(t-1);x<t;x++)S[x-1]=arguments[x];a.fn.apply(a.context,S)}else{var o=a.length,k;for(x=0;x<o;x++){a[x].once&&this.removeListener(h,a[x].fn,void 0,!0);switch(t){case 1:a[x].fn.call(a[x].context);break;case 2:a[x].fn.call(a[x].context,f);break;case 3:a[x].fn.call(a[x].context,f,c);break;case 4:a[x].fn.call(a[x].context,f,c,m);break;default:if(!S)for(k=1,S=new Array(t-1);k<t;k++)S[k-1]=arguments[k];a[x].fn.apply(a[x].context,S)}}}return!0},s.prototype.on=function(h,f,c){return E(this,h,f,c,!1)},s.prototype.once=function(h,f,c){return E(this,h,f,c,!0)},s.prototype.removeListener=function(h,f,c,m){var _=u?u+h:h;if(!this._events[_])return this;if(!f)return l(this,_),this;var y=this._events[_];if(y.fn)y.fn===f&&(!m||y.once)&&(!c||y.context===c)&&l(this,_);else{for(var i=0,a=[],t=y.length;i<t;i++)(y[i].fn!==f||m&&!y[i].once||c&&y[i].context!==c)&&a.push(y[i]);a.length?this._events[_]=a.length===1?a[0]:a:l(this,_)}return this},s.prototype.removeAllListeners=function(h){var f;return h?(f=u?u+h:h,this._events[f]&&l(this,f)):(this._events=new p,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=u,s.EventEmitter=s,P.exports=s},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,d,T){(function(D){var u=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,p=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,E=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(s,n,h){if(h=h||{},s=s.trim(),n=n.trim(),!n){if(!h.alwaysNormalize)return s;var f=l.parseURL(s);if(!f)throw new Error("Error trying to parse base URL.");return f.path=l.normalizePath(f.path),l.buildURLFromParts(f)}var c=l.parseURL(n);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return h.alwaysNormalize?(c.path=l.normalizePath(c.path),l.buildURLFromParts(c)):n;var m=l.parseURL(s);if(!m)throw new Error("Error trying to parse base URL.");if(!m.netLoc&&m.path&&m.path[0]!=="/"){var _=p.exec(m.path);m.netLoc=_[1],m.path=_[2]}m.netLoc&&!m.path&&(m.path="/");var y={scheme:m.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(y.netLoc=m.netLoc,c.path[0]!=="/"))if(!c.path)y.path=m.path,c.params||(y.params=m.params,c.query||(y.query=m.query));else{var i=m.path,a=i.substring(0,i.lastIndexOf("/")+1)+c.path;y.path=l.normalizePath(a)}return y.path===null&&(y.path=h.alwaysNormalize?l.normalizePath(c.path):c.path),l.buildURLFromParts(y)},parseURL:function(s){var n=u.exec(s);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(s){for(s=s.split("").reverse().join("").replace(C,"");s.length!==(s=s.replace(E,"")).length;);return s.split("").reverse().join("")},buildURLFromParts:function(s){return s.scheme+s.netLoc+s.path+s.params+s.query+s.fragment}};P.exports=l})(this)},"./node_modules/webworkify-webpack/index.js":function(P,d,T){function D(h){var f={};function c(_){if(f[_])return f[_].exports;var y=f[_]={i:_,l:!1,exports:{}};return h[_].call(y.exports,y,y.exports,c),y.l=!0,y.exports}c.m=h,c.c=f,c.i=function(_){return _},c.d=function(_,y,i){c.o(_,y)||Object.defineProperty(_,y,{configurable:!1,enumerable:!0,get:i})},c.r=function(_){Object.defineProperty(_,"__esModule",{value:!0})},c.n=function(_){var y=_&&_.__esModule?function(){return _.default}:function(){return _};return c.d(y,"a",y),y},c.o=function(_,y){return Object.prototype.hasOwnProperty.call(_,y)},c.p="/",c.oe=function(_){throw console.error(_),_};var m=c(c.s=ENTRY_MODULE);return m.default||m}var u="[\\.|\\-|\\+|\\w|/|@]+",p="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+u+").*?\\)";function C(h){return(h+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function E(h){return!isNaN(1*h)}function l(h,f,c){var m={};m[c]=[];var _=f.toString(),y=_.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!y)return m;for(var i=y[1],a=new RegExp("(\\\\n|\\W)"+C(i)+p,"g"),t;t=a.exec(_);){if(t[3]==="dll-reference")continue;m[c].push(t[3])}for(a=new RegExp("\\("+C(i)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+p,"g");t=a.exec(_);)h[t[2]]||(m[c].push(t[1]),h[t[2]]=T(t[1]).m),m[t[2]]=m[t[2]]||[],m[t[2]].push(t[4]);for(var S=Object.keys(m),x=0;x<S.length;x++)for(var o=0;o<m[S[x]].length;o++)E(m[S[x]][o])&&(m[S[x]][o]=1*m[S[x]][o]);return m}function s(h){var f=Object.keys(h);return f.reduce(function(c,m){return c||h[m].length>0},!1)}function n(h,f){for(var c={main:[f]},m={main:[]},_={main:{}};s(c);)for(var y=Object.keys(c),i=0;i<y.length;i++){var a=y[i],t=c[a],S=t.pop();if(_[a]=_[a]||{},_[a][S]||!h[a][S])continue;_[a][S]=!0,m[a]=m[a]||[],m[a].push(S);for(var x=l(h,h[a][S],a),o=Object.keys(x),k=0;k<o.length;k++)c[o[k]]=c[o[k]]||[],c[o[k]]=c[o[k]].concat(x[o[k]])}return m}P.exports=function(h,f){f=f||{};var c={main:T.m},m=f.all?{main:Object.keys(c.main)}:n(c,h),_="";Object.keys(m).filter(function(S){return S!=="main"}).forEach(function(S){for(var x=0;m[S][x];)x++;m[S].push(x),c[S][x]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",_=_+"var "+S+" = ("+D.toString().replace("ENTRY_MODULE",JSON.stringify(x))+")({"+m[S].map(function(o){return""+JSON.stringify(o)+": "+c[S][o].toString()}).join(",")+`});
`}),_=_+"new (("+D.toString().replace("ENTRY_MODULE",JSON.stringify(h))+")({"+m.main.map(function(S){return""+JSON.stringify(S)+": "+c.main[S].toString()}).join(",")+"}))(self);";var y=new window.Blob([_],{type:"text/javascript"});if(f.bare)return y;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,a=i.createObjectURL(y),t=new window.Worker(a);return t.objectURL=a,t}},"./src/config.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"hlsDefaultConfig",function(){return k}),T.d(d,"mergeConfig",function(){return b}),T.d(d,"enableStreamingMode",function(){return v});var D=T("./src/controller/abr-controller.ts"),u=T("./src/controller/audio-stream-controller.ts"),p=T("./src/controller/audio-track-controller.ts"),C=T("./src/controller/subtitle-stream-controller.ts"),E=T("./src/controller/subtitle-track-controller.ts"),l=T("./src/controller/buffer-controller.ts"),s=T("./src/controller/timeline-controller.ts"),n=T("./src/controller/cap-level-controller.ts"),h=T("./src/controller/fps-controller.ts"),f=T("./src/controller/eme-controller.ts"),c=T("./src/controller/cmcd-controller.ts"),m=T("./src/utils/xhr-loader.ts"),_=T("./src/utils/fetch-loader.ts"),y=T("./src/utils/cues.ts"),i=T("./src/utils/mediakeys-helper.ts"),a=T("./src/utils/logger.ts");function t(){return t=Object.assign||function(g){for(var w=1;w<arguments.length;w++){var M=arguments[w];for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(g[N]=M[N])}return g},t.apply(this,arguments)}function S(g,w){var M=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);w&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),M.push.apply(M,N)}return M}function x(g){for(var w=1;w<arguments.length;w++){var M=arguments[w]!=null?arguments[w]:{};w%2?S(Object(M),!0).forEach(function(N){o(g,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(M)):S(Object(M)).forEach(function(N){Object.defineProperty(g,N,Object.getOwnPropertyDescriptor(M,N))})}return g}function o(g,w,M){return w in g?Object.defineProperty(g,w,{value:M,enumerable:!0,configurable:!0,writable:!0}):g[w]=M,g}var k=x(x({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:m.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D.default,bufferController:l.default,capLevelController:n.default,fpsController:h.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:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:C.SubtitleStreamController,subtitleTrackController:E.default,timelineController:s.TimelineController,audioStreamController:u.default,audioTrackController:p.default,emeController:f.default,cmcdController:c.default});function O(){return{cueHandler:y.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function b(g,w){if((w.liveSyncDurationCount||w.liveMaxLatencyDurationCount)&&(w.liveSyncDuration||w.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(w.liveMaxLatencyDurationCount!==void 0&&(w.liveSyncDurationCount===void 0||w.liveMaxLatencyDurationCount<=w.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(w.liveMaxLatencyDuration!==void 0&&(w.liveSyncDuration===void 0||w.liveMaxLatencyDuration<=w.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},g,w)}function v(g){var w=g.loader;if(w!==_.default&&w!==m.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),g.progressive=!1;else{var M=Object(_.fetchSupported)();M&&(g.loader=_.default,g.progressive=!0,g.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/polyfills/number.ts"),u=T("./src/utils/ewma-bandwidth-estimator.ts"),p=T("./src/events.ts"),C=T("./src/utils/buffer-helper.ts"),E=T("./src/errors.ts"),l=T("./src/types/loader.ts"),s=T("./src/utils/logger.ts");function n(c,m){for(var _=0;_<m.length;_++){var y=m[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(c,y.key,y)}}function h(c,m,_){return m&&n(c.prototype,m),_&&n(c,_),c}var f=function(){function c(_){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=_;var y=_.config;this.bwEstimator=new u.default(y.abrEwmaSlowVoD,y.abrEwmaFastVoD,y.abrEwmaDefaultEstimate),this.registerListeners()}var m=c.prototype;return m.registerListeners=function(){var y=this.hls;y.on(p.Events.FRAG_LOADING,this.onFragLoading,this),y.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(p.Events.FRAG_BUFFERED,this.onFragBuffered,this),y.on(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(p.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var y=this.hls;y.off(p.Events.FRAG_LOADING,this.onFragLoading,this),y.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(p.Events.FRAG_BUFFERED,this.onFragBuffered,this),y.off(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(p.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},m.onFragLoading=function(y,i){var a=i.frag;if(a.type===l.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=a,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},m.onLevelLoaded=function(y,i){var a=this.hls.config;i.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},m._abandonRulesCheck=function(){var y=this.fragCurrent,i=this.partCurrent,a=this.hls,t=a.autoLevelEnabled,S=a.config,x=a.media;if(!y||!x)return;var o=i?i.stats:y.stats,k=i?i.duration:y.duration;if(o.aborted){s.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||x.paused||!x.playbackRate||!x.readyState)return;var O=performance.now()-o.loading.start,b=Math.abs(x.playbackRate);if(O<=500*k/b)return;var v=a.levels,g=a.minAutoLevel,w=v[y.level],M=o.total||Math.max(o.loaded,Math.round(k*w.maxBitrate/8)),N=Math.max(1,o.bwEstimate?o.bwEstimate/8:o.loaded*1e3/O),I=(M-o.loaded)/N,G=x.currentTime,z=(C.BufferHelper.bufferInfo(x,G,S.maxBufferHole).end-G)/b;if(z>=2*k/b||I<=z)return;var H=Number.POSITIVE_INFINITY,K;for(K=y.level-1;K>g;K--){var U=v[K].maxBitrate;if(H=k*U/(8*.8*N),H<z)break}if(H>=I)return;var B=this.bwEstimator.getEstimate();s.logger.warn("Fragment "+y.sn+(i?" part "+i.index:"")+" of level "+y.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
Current BW estimate: `+(Object(D.isFiniteNumber)(B)?(B/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+I.toFixed(3)+` s
Estimated load time for the next fragment: `+H.toFixed(3)+` s
Time to underbuffer: `+z.toFixed(3)+" s"),a.nextLoadLevel=K,this.bwEstimator.sample(O,o.loaded),this.clearTimer(),y.loader&&(this.fragCurrent=this.partCurrent=null,y.loader.abort()),a.trigger(p.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:y,part:i,stats:o})},m.onFragLoaded=function(y,i){var a=i.frag,t=i.part;if(a.type===l.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(a.sn)){var S=t?t.stats:a.stats,x=t?t.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var o=this.hls.levels[a.level],k=(o.loaded?o.loaded.bytes:0)+S.loaded,O=(o.loaded?o.loaded.duration:0)+x;o.loaded={bytes:k,duration:O},o.realBitrate=Math.round(8*k/O)}if(a.bitrateTest){var b={stats:S,frag:a,part:t,id:a.type};this.onFragBuffered(p.Events.FRAG_BUFFERED,b),a.bitrateTest=!1}}},m.onFragBuffered=function(y,i){var a=i.frag,t=i.part,S=t?t.stats:a.stats;if(S.aborted)return;if(a.type!==l.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var x=S.parsing.end-S.loading.start;this.bwEstimator.sample(x,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=x/1e3:this.bitrateTestDelay=0},m.onError=function(y,i){switch(i.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},m.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},m.getNextABRAutoLevel=function(){var y=this.fragCurrent,i=this.partCurrent,a=this.hls,t=a.maxAutoLevel,S=a.config,x=a.minAutoLevel,o=a.media,k=i?i.duration:y?y.duration:0,O=o?o.currentTime:0,b=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,v=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,g=(C.BufferHelper.bufferInfo(o,O,S.maxBufferHole).end-O)/b,w=this.findBestLevel(v,x,t,g,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(w>=0)return w;s.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=k?Math.min(k,S.maxStarvationDelay):S.maxStarvationDelay,N=S.abrBandWidthFactor,I=S.abrBandWidthUpFactor;if(!g){var G=this.bitrateTestDelay;if(G){var z=k?Math.min(k,S.maxLoadingDelay):S.maxLoadingDelay;M=z-G,s.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),N=I=1}}return w=this.findBestLevel(v,x,t,g+M,N,I),Math.max(w,0)},m.findBestLevel=function(y,i,a,t,S,x){for(var o,k=this.fragCurrent,O=this.partCurrent,b=this.lastLoadedFragLevel,v=this.hls.levels,g=v[b],w=!!(g!=null&&(o=g.details)!==null&&o!==void 0&&o.live),M=g==null?void 0:g.codecSet,N=O?O.duration:k?k.duration:0,I=a;I>=i;I--){var G=v[I];if(!G||M&&G.codecSet!==M)continue;var z=G.details,H=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||N,K=void 0;I<=b?K=S*y:K=x*y;var U=v[I].maxBitrate,B=U*H/K;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+I+"/"+Math.round(K)+"/"+U+"/"+H+"/"+t+"/"+B),K>U&&(!B||w&&!this.bitrateTestDelay||B<t))return I}return-1},h(c,[{key:"nextAutoLevel",get:function(){var y=this._nextAutoLevel,i=this.bwEstimator;if(y!==-1&&(!i||!i.canEstimate()))return y;var a=this.getNextABRAutoLevel();return y!==-1&&(a=Math.min(y,a)),a},set:function(y){this._nextAutoLevel=y}}]),c}();d.default=f},"./src/controller/audio-stream-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/polyfills/number.ts"),u=T("./src/controller/base-stream-controller.ts"),p=T("./src/events.ts"),C=T("./src/utils/buffer-helper.ts"),E=T("./src/controller/fragment-tracker.ts"),l=T("./src/types/level.ts"),s=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),h=T("./src/demux/chunk-cache.ts"),f=T("./src/demux/transmuxer-interface.ts"),c=T("./src/types/transmuxer.ts"),m=T("./src/controller/fragment-finders.ts"),_=T("./src/utils/discontinuities.ts"),y=T("./src/errors.ts"),i=T("./src/utils/logger.ts");function a(){return a=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(k[v]=b[v])}return k},a.apply(this,arguments)}function t(k,O){k.prototype=Object.create(O.prototype),k.prototype.constructor=k,S(k,O)}function S(k,O){return S=Object.setPrototypeOf||function(v,g){return v.__proto__=g,v},S(k,O)}var x=100,o=function(k){t(O,k);function O(v,g){var w;return w=k.call(this,v,g,"[audio-stream-controller]")||this,w.videoBuffer=null,w.videoTrackCC=-1,w.waitingVideoCC=-1,w.audioSwitch=!1,w.trackId=-1,w.waitingData=null,w.mainDetails=null,w.bufferFlushed=!1,w._registerListeners(),w}var b=O.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var g=this.hls;g.on(p.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.on(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.on(p.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.on(p.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.on(p.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.on(p.Events.ERROR,this.onError,this),g.on(p.Events.BUFFER_RESET,this.onBufferReset,this),g.on(p.Events.BUFFER_CREATED,this.onBufferCreated,this),g.on(p.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.on(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.on(p.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var g=this.hls;g.off(p.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.off(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.off(p.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.off(p.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.off(p.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.off(p.Events.ERROR,this.onError,this),g.off(p.Events.BUFFER_RESET,this.onBufferReset,this),g.off(p.Events.BUFFER_CREATED,this.onBufferCreated,this),g.off(p.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.off(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.off(p.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(g,w){var M=w.frag,N=w.id,I=w.initPTS;if(N==="main"){var G=M.cc;this.initPTS[M.cc]=I,this.log("InitPTS for cc: "+G+" found from main: "+I),this.videoTrackCC=G,this.state===u.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(g){if(!this.levels){this.startPosition=g,this.state=u.State.STOPPED;return}var w=this.lastCurrentTime;this.stopLoad(),this.setInterval(x),this.fragLoadError=0,w>0&&g===-1?(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),this.state=u.State.IDLE):(this.loadedmetadata=!1,this.state=u.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=g,this.tick()},b.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_TRACK:{var g,w=this.levels,M=this.trackId,N=w==null||((g=w[M])===null||g===void 0)?void 0:g.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=u.State.WAITING_INIT_PTS}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var I,G=performance.now(),z=this.retryDate;(!z||G>=z||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=u.State.IDLE);break}case u.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var K=H.frag,U=H.part,B=H.cache,V=H.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.FRAG_LOADING;var ae=B.flush(),he={frag:K,part:U,payload:ae,networkDetails:null};this._handleFragmentLoadProgress(he),V&&k.prototype._handleFragmentLoadComplete.call(this,he)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var pe=this.getLoadPosition(),Re=C.BufferHelper.bufferInfo(this.mediaBuffer,pe,this.config.maxBufferHole),ke=Object(m.fragmentWithinToleranceTest)(Re.end,this.config.maxFragLookUpTolerance,K);ke<0&&(i.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+Re.end+" is needed"),this.clearWaitingFragment())}}else this.state=u.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var g=this.waitingData;g&&(this.fragmentTracker.removeFragment(g.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.IDLE)},b.onTickEnd=function(){var g=this.media;if(!g||!g.readyState)return;var w=this.mediaBuffer?this.mediaBuffer:g,M=w.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=g.currentTime},b.doTickIdle=function(){var g,w,M=this.hls,N=this.levels,I=this.media,G=this.trackId,z=M.config;if(!N||!N[G])return;if(!I&&(this.startFragRequested||!z.startFragPrefetch))return;var H=N[G],K=H.details;if(!K||K.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(K)){this.state=u.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,s.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,s.PlaylistLevelType.AUDIO);if(U===null)return;var B=U.len,V=this.getMaxBufferLength(),ae=this.audioSwitch;if(B>=V&&!ae)return;if(!ae&&this._streamEnded(U,K)){M.trigger(p.Events.BUFFER_EOS,{type:"audio"}),this.state=u.State.ENDED;return}var he=K.fragments,pe=he[0].start,Re=U.end;if(ae){var ke=this.getLoadPosition();Re=ke,K.PTSKnown&&ke<pe&&((U.end>pe||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),I.currentTime=pe+.05))}var ve=this.getNextFragment(Re,K);if(!ve){this.bufferFlushed=!0;return}((g=ve.decryptdata)===null||g===void 0?void 0:g.keyFormat)==="identity"&&!((w=ve.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ve,K):this.loadFragment(ve,K,Re)},b.getMaxBufferLength=function(){var g=k.prototype.getMaxBufferLength.call(this),w=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,s.PlaylistLevelType.MAIN);return w===null?g:Math.max(g,w.len)},b.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(g,w){var M=w.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(N){return new l.Level(N)})},b.onAudioTrackSwitching=function(g,w){var M=!!w.url;this.trackId=w.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(x):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=u.State.IDLE):this.state=u.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(g,w){this.mainDetails=w.details},b.onAudioTrackLoaded=function(g,w){var M,N=this.levels,I=w.details,G=w.id;if(!N){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+I.startSN+","+I.endSN+"],duration:"+I.totalduration);var z=N[G],H=0;if(I.live||(M=z.details)!==null&&M!==void 0&&M.live){var K=this.mainDetails;if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed||!K)return;!z.details&&I.hasProgramDateTime&&K.hasProgramDateTime?(Object(_.alignMediaPlaylistByPDT)(I,K),H=I.fragments[0].start):H=this.alignPlaylists(I,z.details)}z.details=I,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!I.live)&&this.setStartPosition(z.details,H),this.state===u.State.WAITING_TRACK&&!this.waitForCdnTuneIn(I)&&(this.state=u.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(g){var w,M=g.frag,N=g.part,I=g.payload,G=this.config,z=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var K=H[z];console.assert(K,"Audio track is defined on fragment load progress");var U=K.details;console.assert(U,"Audio track details are defined on fragment load progress");var B=G.defaultAudioCodec||K.audioCodec||"mp4a.40.2",V=this.transmuxer;V||(V=this.transmuxer=new f.default(this.hls,s.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ae=this.initPTS[M.cc],he=(w=M.initSegment)===null||w===void 0?void 0:w.data;if(ae!==void 0){var pe=!1,Re=N?N.index:-1,ke=Re!==-1,ve=new c.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,I.byteLength,Re,ke);V.push(I,he,B,"",M,N,U.totalduration,pe,ve,ae)}else{i.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Te=this.waitingData=this.waitingData||{frag:M,part:N,cache:new h.default,complete:!1},be=Te.cache;be.push(new Uint8Array(I)),this.waitingVideoCC=this.videoTrackCC,this.state=u.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(g){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,g)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(g,w){var M=w.tracks.audio;M&&(this.mediaBuffer=M.buffer),w.tracks.video&&(this.videoBuffer=w.tracks.video.buffer)},b.onFragBuffered=function(g,w){var M=w.frag,N=w.part;if(M.type!==s.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(N?" p: "+N.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(p.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,N)},b.onError=function(g,w){switch(w.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.KEY_LOAD_ERROR:case y.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(s.PlaylistLevelType.AUDIO,w);break;case y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case y.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==u.State.ERROR&&this.state!==u.State.STOPPED&&(this.state=w.fatal?u.State.ERROR:u.State.IDLE,this.warn(w.details+" while loading frag, switching to "+this.state+" state"));break;case y.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="audio"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var M=!0,N=this.getFwdBufferInfo(this.mediaBuffer,s.PlaylistLevelType.AUDIO);N&&N.len>.5&&(M=!this.reduceMaxBufferLength(N.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(g,w){var M=w.type;M===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(g){var w,M="audio",N=this.hls,I=g.remuxResult,G=g.chunkMeta,z=this.getCurrentContext(G);if(!z){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var H=z.frag,K=z.part,U=I.audio,B=I.text,V=I.id3,ae=I.initSegment;if(this.fragContextChanged(H))return;if(this.state=u.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ae!=null&&ae.tracks&&(this._bufferInitSegment(ae.tracks,H,G),N.trigger(p.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:M,tracks:ae.tracks})),U){var he=U.startPTS,pe=U.endPTS,Re=U.startDTS,ke=U.endDTS;K&&(K.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:pe,startDTS:Re,endDTS:ke}),H.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,he,pe,Re,ke),this.bufferFragmentData(U,H,K,G)}if(V!=null&&(w=V.samples)!==null&&w!==void 0&&w.length){var ve=a({frag:H,id:M},V);N.trigger(p.Events.FRAG_PARSING_METADATA,ve)}if(B){var Te=a({frag:H,id:M},B);N.trigger(p.Events.FRAG_PARSING_USERDATA,Te)}},b._bufferInitSegment=function(g,w,M){if(this.state!==u.State.PARSING)return;g.video&&delete g.video;var N=g.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(p.Events.BUFFER_CODECS,g);var I=N.initSegment;if(I!=null&&I.byteLength){var G={type:"audio",frag:w,part:null,chunkMeta:M,parent:w.type,data:I};this.hls.trigger(p.Events.BUFFER_APPENDING,G)}this.tick()},b.loadFragment=function(g,w,M){var N=this.fragmentTracker.getState(g);this.fragCurrent=g,(this.audioSwitch||N===E.FragmentState.NOT_LOADED||N===E.FragmentState.PARTIAL)&&(g.sn==="initSegment"?this._loadInitSegment(g):w.live&&!Object(D.isFiniteNumber)(this.initPTS[g.cc])?(this.log("Waiting for video PTS in continuity counter "+g.cc+" of live stream before loading audio fragment "+g.sn+" of level "+this.trackId),this.state=u.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,g,w,M)))},b.completeAudioSwitch=function(){var g=this.hls,w=this.media,M=this.trackId;w&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,g.trigger(p.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(u.default);d.default=o},"./src/controller/audio-track-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/controller/base-playlist-controller.ts"),C=T("./src/types/loader.ts");function E(f,c){for(var m=0;m<c.length;m++){var _=c[m];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(f,_.key,_)}}function l(f,c,m){return c&&E(f.prototype,c),m&&E(f,m),f}function s(f,c){f.prototype=Object.create(c.prototype),f.prototype.constructor=f,n(f,c)}function n(f,c){return n=Object.setPrototypeOf||function(_,y){return _.__proto__=y,_},n(f,c)}var h=function(f){s(c,f);function c(_){var y;return y=f.call(this,_,"[audio-track-controller]")||this,y.tracks=[],y.groupId=null,y.tracksInGroup=[],y.trackId=-1,y.trackName="",y.selectDefaultTrack=!0,y.registerListeners(),y}var m=c.prototype;return m.registerListeners=function(){var y=this.hls;y.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),y.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),y.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(D.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var y=this.hls;y.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),y.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),y.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(D.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,f.prototype.destroy.call(this)},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},m.onManifestParsed=function(y,i){this.tracks=i.audioTracks||[]},m.onAudioTrackLoaded=function(y,i){var a=i.id,t=i.details,S=this.tracksInGroup[a];if(!S){this.warn("Invalid audio track id "+a);return}var x=S.details;S.details=i.details,this.log("audioTrack "+a+" loaded ["+t.startSN+"-"+t.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,i,x))},m.onLevelLoading=function(y,i){this.switchLevel(i.level)},m.onLevelSwitching=function(y,i){this.switchLevel(i.level)},m.switchLevel=function(y){var i=this.hls.levels[y];if(!(i!=null&&i.audioGroupIds))return;var a=i.audioGroupIds[i.urlId];if(this.groupId!==a){this.groupId=a;var t=this.tracks.filter(function(x){return!a||x.groupId===a});this.selectDefaultTrack&&!t.some(function(x){return x.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var S={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(D.Events.AUDIO_TRACKS_UPDATED,S),this.selectInitialTrack()}},m.onError=function(y,i){if(f.prototype.onError.call(this,y,i),i.fatal||!i.context)return;i.context.type===C.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},m.setAudioTrack=function(y){var i=this.tracksInGroup;if(y<0||y>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=i[this.trackId];this.log("Now switching to audio-track index "+y);var t=i[y],S=t.id,x=t.groupId,o=x===void 0?"":x,k=t.name,O=t.type,b=t.url;if(this.trackId=y,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:o,name:k,type:O,url:b}),t.details&&!t.details.live)return;var v=this.switchParams(t.url,a==null?void 0:a.details);this.loadPlaylist(v)},m.selectInitialTrack=function(){var y=this.tracksInGroup;console.assert(y.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,a=this.findTrackId(i)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},m.findTrackId=function(y){for(var i=this.tracksInGroup,a=0;a<i.length;a++){var t=i[a];if((!this.selectDefaultTrack||t.default)&&(!y||y===t.name))return t.id}return-1},m.loadPlaylist=function(y){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var a=i.id,t=i.groupId,S=i.url;if(y)try{S=y.addDirectives(S)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(D.Events.AUDIO_TRACK_LOADING,{url:S,id:a,groupId:t,deliveryDirectives:y||null})}},l(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(y){this.selectDefaultTrack=!1,this.setAudioTrack(y)}}]),c}(p.default);d.default=h},"./src/controller/base-playlist-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return l});var D=T("./src/polyfills/number.ts"),u=T("./src/types/level.ts"),p=T("./src/controller/level-helper.ts"),C=T("./src/utils/logger.ts"),E=T("./src/errors.ts"),l=function(){function s(h,f){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=C.logger.log.bind(C.logger,f+":"),this.warn=C.logger.warn.bind(C.logger,f+":"),this.hls=h}var n=s.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(f,c){c.fatal&&c.type===E.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(f,c){var m=c==null?void 0:c.renditionReports;if(m)for(var _=0;_<m.length;_++){var y=m[_],i=""+y.URI;if(i===f.substr(-i.length)){var a=parseInt(y["LAST-MSN"]),t=parseInt(y["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var S=Math.min(c.age-c.partTarget,c.targetduration);t!==void 0&&S>c.partTarget&&(t+=1)}if(Object(D.isFiniteNumber)(a))return new u.HlsUrlParameters(a,Object(D.isFiniteNumber)(t)?t:void 0,u.HlsSkip.No)}}},n.loadPlaylist=function(f){},n.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},n.playlistLoaded=function(f,c,m){var _=this,y=c.details,i=c.stats,a=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(y.advancedDateTime=Date.now()-a,y.live||m!=null&&m.live){if(y.reloaded(m),m&&this.log("live playlist "+f+" "+(y.advanced?"REFRESHED "+y.lastPartSn+"-"+y.lastPartIndex:"MISSED")),m&&y.fragments.length>0&&Object(p.mergeDetails)(m,y),!this.canLoad||!y.live)return;var t,S=void 0,x=void 0;if(y.canBlockReload&&y.endSN&&y.advanced){var o=this.hls.config.lowLatencyMode,k=y.lastPartSn,O=y.endSN,b=y.lastPartIndex,v=b!==-1,g=k===O,w=o?0:b;v?(S=g?O+1:k,x=g?w:b+1):S=O+1;var M=y.age,N=M+y.ageHeader,I=Math.min(N-y.partTarget,y.targetduration*1.5);if(I>0){if(m&&I>m.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+m.tuneInGoal+" to: "+I+" with playlist age: "+y.age),I=0;else{var G=Math.floor(I/y.targetduration);if(S+=G,x!==void 0){var z=Math.round(I%y.targetduration/y.partTarget);x+=z}this.log("CDN Tune-in age: "+y.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+I+" skip sn "+G+" to part "+x)}y.tuneInGoal=I}if(t=this.getDeliveryDirectives(y,c.deliveryDirectives,S,x),o||!g){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(y,c.deliveryDirectives,S,x);var H=Object(p.computeReloadInterval)(y,i);S!==void 0&&y.canBlockReload&&(H-=y.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return _.loadPlaylist(t)},H)}else this.clearTimer()},n.getDeliveryDirectives=function(f,c,m,_){var y=Object(u.getSkipValue)(f,m);return c!=null&&c.skip&&f.deltaUpdateFailed&&(m=c.msn,_=c.part,y=u.HlsSkip.No),new u.HlsUrlParameters(m,_,y)},n.retryLoadingOrFail=function(f){var c=this,m=this.hls.config,_=this.retryCount<m.levelLoadingMaxRetry;if(_){var y;if(this.retryCount++,f.details.indexOf("LoadTimeOut")>-1&&(y=f.context)!==null&&y!==void 0&&y.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*m.levelLoadingRetryDelay,m.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+f.details+'"')}}else this.warn('cannot recover from error "'+f.details+'"'),this.clearTimer(),f.fatal=!0;return _},s}()},"./src/controller/base-stream-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"State",function(){return O}),T.d(d,"default",function(){return b});var D=T("./src/polyfills/number.ts"),u=T("./src/task-loop.ts"),p=T("./src/controller/fragment-tracker.ts"),C=T("./src/utils/buffer-helper.ts"),E=T("./src/utils/logger.ts"),l=T("./src/events.ts"),s=T("./src/errors.ts"),n=T("./src/types/transmuxer.ts"),h=T("./src/utils/mp4-tools.ts"),f=T("./src/utils/discontinuities.ts"),c=T("./src/controller/fragment-finders.ts"),m=T("./src/controller/level-helper.ts"),_=T("./src/loader/fragment-loader.ts"),y=T("./src/crypt/decrypter.ts"),i=T("./src/utils/time-ranges.ts"),a=T("./src/types/loader.ts");function t(v,g){for(var w=0;w<g.length;w++){var M=g[w];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(v,M.key,M)}}function S(v,g,w){return g&&t(v.prototype,g),w&&t(v,w),v}function x(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function o(v,g){v.prototype=Object.create(g.prototype),v.prototype.constructor=v,k(v,g)}function k(v,g){return k=Object.setPrototypeOf||function(M,N){return M.__proto__=N,M},k(v,g)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},b=function(v){o(g,v);function g(M,N,I){var G;return G=v.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=O.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=I,G.log=E.logger.log.bind(E.logger,I+":"),G.warn=E.logger.warn.bind(E.logger,I+":"),G.hls=M,G.fragmentLoader=new _.default(M.config),G.fragmentTracker=N,G.config=M.config,G.decrypter=new y.default(M,M.config),M.on(l.Events.KEY_LOADED,G.onKeyLoaded,x(G)),G}var w=g.prototype;return w.doTick=function(){this.onTickEnd()},w.onTickEnd=function(){},w.startLoad=function(N){},w.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},w._streamEnded=function(N,I){var G=this.fragCurrent,z=this.fragmentTracker;if(!I.live&&G&&G.sn===I.endSN&&!N.nextStart){var H=z.getState(G);return H===p.FragmentState.PARTIAL||H===p.FragmentState.OK}return!1},w.onMediaAttached=function(N,I){var G=this.media=this.mediaBuffer=I.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(z.startPosition)},w.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()},w.onMediaSeeking=function(){var N=this.config,I=this.fragCurrent,G=this.media,z=this.mediaBuffer,H=this.state,K=G?G.currentTime:0,U=C.BufferHelper.bufferInfo(z||G,K,N.maxBufferHole);if(this.log("media seeking to "+(Object(D.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+H),H===O.ENDED)this.resetLoadingState();else if(I&&!U.len){var B=N.maxFragLookUpTolerance,V=I.start-B,ae=I.start+I.duration+B,he=K>ae;(K<V||he)&&(he&&I.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),I.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=K),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},w.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},w.onKeyLoaded=function(N,I){if(this.state!==O.KEY_LOADING||I.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var G=this.levels[I.frag.level].details;G&&this.loadFragment(I.frag,G,I.frag.start)},w.onHandlerDestroying=function(){this.stopLoad(),v.prototype.onHandlerDestroying.call(this)},w.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,v.prototype.onHandlerDestroyed.call(this)},w.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(l.Events.KEY_LOADING,{frag:N})},w.loadFragment=function(N,I,G){this._loadFragForPlayback(N,I,G)},w._loadFragForPlayback=function(N,I,G){var z=this,H=function(U){if(z.fragContextChanged(N)){z.warn("Fragment "+N.sn+(U.part?" p: "+U.part.index:"")+" of level "+N.level+" was dropped during download."),z.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(N,I,G,H).then(function(K){if(!K)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(N)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!z.fragCurrent&&U===O.PARSING)&&(z.fragmentTracker.removeFragment(N),z.state=O.IDLE);return}if("payload"in K&&(z.log("Loaded fragment "+N.sn+" of level "+N.level),z.hls.trigger(l.Events.FRAG_LOADED,K),z.state===O.BACKTRACKING)){z.fragmentTracker.backtrack(N,K),z.resetFragmentLoading(N);return}z._handleFragmentLoadComplete(K)}).catch(function(K){z.warn(K),z.resetFragmentLoading(N)})},w.flushMainBuffer=function(N,I,G){if(G===void 0&&(G=null),!(N-I))return;var z={startOffset:N,endOffset:I,type:G};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,z)},w._loadInitSegment=function(N){var I=this;this._doFragLoad(N).then(function(G){if(!G||I.fragContextChanged(N)||!I.levels)throw new Error("init load aborted");return G}).then(function(G){var z=I.hls,H=G.payload,K=N.decryptdata;if(H&&H.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var U=self.performance.now();return I.decrypter.webCryptoDecrypt(new Uint8Array(H),K.key.buffer,K.iv.buffer).then(function(B){var V=self.performance.now();return z.trigger(l.Events.FRAG_DECRYPTED,{frag:N,payload:B,stats:{tstart:U,tdecrypt:V}}),G.payload=B,G})}return G}).then(function(G){var z=I.fragCurrent,H=I.hls,K=I.levels;if(!K)throw new Error("init load aborted, missing levels");var U=K[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var B=N.stats;I.state=O.IDLE,I.fragLoadError=0,N.data=new Uint8Array(G.payload),B.parsing.start=B.buffering.start=self.performance.now(),B.parsing.end=B.buffering.end=self.performance.now(),G.frag===z&&H.trigger(l.Events.FRAG_BUFFERED,{stats:B,frag:z,part:null,id:N.type}),I.tick()}).catch(function(G){I.warn(G),I.resetFragmentLoading(N)})},w.fragContextChanged=function(N){var I=this.fragCurrent;return!N||!I||N.level!==I.level||N.sn!==I.sn||N.urlId!==I.urlId},w.fragBufferedComplete=function(N,I){var G=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+" "+i.default.toString(C.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},w._handleFragmentLoadComplete=function(N){var I=this.transmuxer;if(!I)return;var G=N.frag,z=N.part,H=N.partsLoaded,K=!H||H.length===0||H.some(function(B){return!B}),U=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,z?z.index:-1,!K);I.flush(U)},w._handleFragmentLoadProgress=function(N){},w._doFragLoad=function(N,I,G,z){var H=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(N.start,G||0),this.config.lowLatencyMode&&I){var K=I.partList;if(K&&z){G>N.end&&I.fragmentHint&&(N=I.fragmentHint);var U=this.getNextPart(K,N,G);if(U>-1){var B=K[U];return this.log("Loading part sn: "+N.sn+" p: "+B.index+" cc: "+N.cc+" of playlist ["+I.startSN+"-"+I.endSN+"] parts [0-"+U+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=B.start+B.duration,this.state=O.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:N,part:K[U],targetBufferTime:G}),this.doFragPartsLoad(N,K,U,z).catch(function(V){return H.handleFragLoadError(V)})}else if(!N.url||this.loadedEndOfParts(K,G))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(G.toFixed(3))),Object(D.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:N,targetBufferTime:G}),this.fragmentLoader.load(N,z).catch(function(V){return H.handleFragLoadError(V)})},w.doFragPartsLoad=function(N,I,G,z){var H=this;return new Promise(function(K,U){var B=[],V=function ae(he){var pe=I[he];H.fragmentLoader.loadPart(N,pe,z).then(function(Re){B[pe.index]=Re;var ke=Re.part;H.hls.trigger(l.Events.FRAG_LOADED,Re);var ve=I[he+1];if(ve&&ve.fragment===N)ae(he+1);else return K({frag:N,part:ke,partsLoaded:B})}).catch(U)};V(G)})},w.handleFragLoadError=function(N){var I=N.data;return I&&I.details===s.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(I.frag,I.part):this.hls.trigger(l.Events.ERROR,I),null},w._handleTransmuxerFlush=function(N){var I=this.getCurrentContext(N);if(!I||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=I.frag,z=I.part,H=I.level,K=self.performance.now();G.stats.parsing.end=K,z&&(z.stats.parsing.end=K),this.updateLevelTiming(G,z,H,N.partial)},w.getCurrentContext=function(N){var I=this.levels,G=N.level,z=N.sn,H=N.part;if(!I||!I[G])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+G+". The current chunk will not be buffered."),null;var K=I[G],U=H>-1?Object(m.getPartWith)(K,z,H):null,B=U?U.fragment:Object(m.getFragmentWithSN)(K,z,this.fragCurrent);return B?{frag:B,part:U,level:K}:null},w.bufferFragmentData=function(N,I,G,z){if(!N||this.state!==O.PARSING)return;var H=N.data1,K=N.data2,U=H;if(H&&K&&(U=Object(h.appendUint8Array)(H,K)),!U||!U.length)return;var B={type:N.type,frag:I,part:G,chunkMeta:z,parent:I.type,data:U};this.hls.trigger(l.Events.BUFFER_APPENDING,B),N.dropped&&N.independent&&!G&&this.flushBufferGap(I)},w.flushBufferGap=function(N){var I=this.media;if(!I)return;if(!C.BufferHelper.isBuffered(I,I.currentTime)){this.flushMainBuffer(0,N.start);return}var G=I.currentTime,z=C.BufferHelper.bufferInfo(I,G,0),H=N.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),U=Math.max(Math.min(N.start-K,z.end-K),G+K);N.start-U>K&&this.flushMainBuffer(U,N.start)},w.getFwdBufferInfo=function(N,I){var G=this.config,z=this.getLoadPosition();if(!Object(D.isFiniteNumber)(z))return null;var H=C.BufferHelper.bufferInfo(N,z,G.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(z,I);if(K&&H.nextStart<K.end)return C.BufferHelper.bufferInfo(N,z,Math.max(H.nextStart,G.maxBufferHole))}return H},w.getMaxBufferLength=function(N){var I=this.config,G;return N?G=Math.max(8*I.maxBufferSize/N,I.maxBufferLength):G=I.maxBufferLength,Math.min(G,I.maxMaxBufferLength)},w.reduceMaxBufferLength=function(N){var I=this.config,G=N||I.maxBufferLength;return I.maxMaxBufferLength>=G?(I.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+I.maxMaxBufferLength+"s"),!0):!1},w.getNextFragment=function(N,I){var G,z,H=I.fragments,K=H.length;if(!K)return null;var U=this.config,B=H[0].start,V;if(I.live){var ae=U.initialLiveManifestSize;if(K<ae)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+ae+")"),null;!I.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(V=this.getInitialLiveFragment(I,H),this.startPosition=V?this.hls.liveSyncPosition||V.start:N)}else N<=B&&(V=H[0]);if(!V){var he=U.lowLatencyMode?I.partEnd:I.fragmentEnd;V=this.getFragmentAtPosition(N,he,I)}return(G=V)!==null&&G!==void 0&&G.initSegment&&!((z=V)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(V=V.initSegment),V},w.getNextPart=function(N,I,G){for(var z=-1,H=!1,K=!0,U=0,B=N.length;U<B;U++){var V=N[U];if(K=K&&!V.independent,z>-1&&G<V.start)break;var ae=V.loaded;!ae&&(H||V.independent||K)&&V.fragment===I&&(z=U),H=ae}return z},w.loadedEndOfParts=function(N,I){var G=N[N.length-1];return G&&I>G.start&&G.loaded},w.getInitialLiveFragment=function(N,I){var G=this.fragPrevious,z=null;if(G){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),z=Object(c.findFragmentByPDT)(I,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var H=G.sn+1;if(H>=N.startSN&&H<=N.endSN){var K=I[H-N.startSN];G.cc===K.cc&&(z=K,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(c.findFragWithCC)(I,G.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return z},w.getFragmentAtPosition=function(N,I,G){var z=this.config,H=this.fragPrevious,K=G.fragments,U=G.endSN,B=G.fragmentHint,V=z.maxFragLookUpTolerance,ae=!!(z.lowLatencyMode&&G.partList&&B);ae&&B&&!this.bitrateTest&&(K=K.concat(B),U=B.sn);var he;if(N<I){var pe=N>I-V?0:V;he=Object(c.findFragmentByPTS)(H,K,N,pe)}else he=K[K.length-1];if(he){var Re=he.sn-G.startSN,ke=H&&he.level===H.level,ve=K[Re+1],Te=this.fragmentTracker.getState(he);if(Te===p.FragmentState.BACKTRACKED){he=null;for(var be=Re;K[be]&&this.fragmentTracker.getState(K[be])===p.FragmentState.BACKTRACKED;)H?he=K[be--]:he=K[--be];he||(he=ve)}else H&&he.sn===H.sn&&!ae&&(ke&&(he.sn<U&&this.fragmentTracker.getState(ve)!==p.FragmentState.OK?(this.log("SN "+he.sn+" just loaded, load next one: "+ve.sn),he=ve):he=null))}return he},w.synchronizeToLiveEdge=function(N){var I=this.config,G=this.media;if(!G)return;var z=this.hls.liveSyncPosition,H=G.currentTime,K=N.fragments[0].start,U=N.edge,B=H>=K-I.maxFragLookUpTolerance&&H<=U;if(z!==null&&G.duration>z&&(H<z||!B)){var V=I.liveMaxLatencyDuration!==void 0?I.liveMaxLatencyDuration:I.liveMaxLatencyDurationCount*N.targetduration;(!B&&G.readyState<4||H<U-V)&&(this.loadedmetadata||(this.nextLoadPosition=z),G.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),G.currentTime=z))}},w.alignPlaylists=function(N,I){var G=this.levels,z=this.levelLastLoaded,H=this.fragPrevious,K=z!==null?G[z]:null,U=N.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var B=N.fragments[0].start,V=!I,ae=N.alignedSliding&&Object(D.isFiniteNumber)(B);if(V||!ae&&!B){Object(f.alignStream)(H,K,N);var he=N.fragments[0].start;return this.log("Live playlist sliding: "+he.toFixed(2)+" start-sn: "+(I?I.startSN:"na")+"->"+N.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+U),he}return B},w.waitForCdnTuneIn=function(N){var I=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*I)},w.setStartPosition=function(N,I){var G=this.startPosition;if(G<I&&(G=-1),G===-1||this.lastCurrentTime===-1){var z=N.startTimeOffset;Object(D.isFiniteNumber)(z)?(G=I+z,z<0&&(G+=N.totalduration),G=Math.min(Math.max(I,G),I+N.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+G),this.startPosition=G):N.live?G=this.hls.liveSyncPosition||I:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},w.getLoadPosition=function(){var N=this.media,I=0;return this.loadedmetadata&&N?I=N.currentTime:this.nextLoadPosition&&(I=this.nextLoadPosition),I},w.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))},w.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=O.IDLE)},w.onFragmentOrKeyLoadError=function(N,I){if(I.fatal)return;var G=I.frag;if(!G||G.type!==N)return;var z=this.fragCurrent;console.assert(z&&G.sn===z.sn&&G.level===z.level&&G.urlId===z.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+N+" "+G.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else I.levelRetry?(N===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(E.logger.error(I.details+" reaches max retry, redispatch as fatal ..."),I.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},w.afterBufferFlushed=function(N,I,G){if(!N)return;var z=C.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(I,z,G),this.state===O.ENDED&&this.resetLoadingState()},w.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},w.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},w.updateLevelTiming=function(N,I,G,z){var H=this,K=G.details;console.assert(!!K,"level.details must be defined");var U=Object.keys(N.elementaryStreams).reduce(function(B,V){var ae=N.elementaryStreams[V];if(ae){var he=ae.endPTS-ae.startPTS;if(he<=0)return H.warn("Could not parse fragment "+N.sn+" "+V+" duration reliably ("+he+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),B||!1;var pe=z?0:Object(m.updateFragPTSDTS)(K,N,ae.startPTS,ae.endPTS,ae.startDTS,ae.endDTS);return H.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:K,level:G,drift:pe,type:V,frag:N,start:ae.startPTS,end:ae.endPTS}),!0}return B},!1);U?(this.state=O.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:N,part:I})):this.resetLoadingState()},w.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S(g,[{key:"state",get:function(){return this._state},set:function(N){var I=this._state;I!==N&&(this._state=N,this.log(I+"->"+N))}}]),g}(u.default)},"./src/controller/buffer-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./src/polyfills/number.ts"),u=T("./src/events.ts"),p=T("./src/utils/logger.ts"),C=T("./src/errors.ts"),E=T("./src/utils/buffer-helper.ts"),l=T("./src/utils/mediasource-helper.ts"),s=T("./src/loader/fragment.ts"),n=T("./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function m(y){var i=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 a=i.hls,t=i.media,S=i.mediaSource;p.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),a.trigger(u.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){p.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){p.logger.log("[buffer-controller]: Media source ended")},this.hls=y,this._initSourceBuffer(),this.registerListeners()}var _=m.prototype;return _.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},_.destroy=function(){this.unregisterListeners(),this.details=null},_.registerListeners=function(){var i=this.hls;i.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(u.Events.BUFFER_RESET,this.onBufferReset,this),i.on(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(u.Events.BUFFER_EOS,this.onBufferEos,this),i.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(u.Events.FRAG_PARSED,this.onFragParsed,this),i.on(u.Events.FRAG_CHANGED,this.onFragChanged,this)},_.unregisterListeners=function(){var i=this.hls;i.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(u.Events.BUFFER_RESET,this.onBufferReset,this),i.off(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(u.Events.BUFFER_EOS,this.onBufferEos,this),i.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(u.Events.FRAG_PARSED,this.onFragParsed,this),i.off(u.Events.FRAG_CHANGED,this.onFragChanged,this)},_._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},_.onManifestParsed=function(i,a){var t=2;(a.audio&&!a.video||!a.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,p.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},_.onMediaAttaching=function(i,a){var t=this.media=a.media;if(t&&h){var S=this.mediaSource=new h;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},_.onMediaDetaching=function(){var i=this.media,a=this.mediaSource,t=this._objectUrl;if(a){if(p.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(S){p.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):p.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(u.Events.MEDIA_DETACHED,void 0)},_.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(a){var t=i.sourceBuffer[a];try{t&&(i.removeBufferListeners(a),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[a]=void 0)}catch(S){p.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",S)}}),this._initSourceBuffer()},_.onBufferCodecs=function(i,a){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(x){if(S){var o=t.tracks[x];if(o&&typeof o.buffer.changeType=="function"){var k=a[x],O=k.codec,b=k.levelCodec,v=k.container,g=(o.levelCodec||o.codec).replace(f,"$1"),w=(b||O).replace(f,"$1");if(g!==w){var M=v+";codecs="+(b||O);t.appendChangeType(x,M)}}}else t.pendingTracks[x]=a[x]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},_.appendChangeType=function(i,a){var t=this,S=this.operationQueue,x={execute:function(){var k=t.sourceBuffer[i];k&&(p.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+a),k.changeType(a)),S.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(k){p.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",k)}};S.append(x,i)},_.onBufferAppending=function(i,a){var t=this,S=this.hls,x=this.operationQueue,o=this.tracks,k=a.data,O=a.type,b=a.frag,v=a.part,g=a.chunkMeta,w=g.buffering[O],M=self.performance.now();w.start=M;var N=b.stats.buffering,I=v?v.stats.buffering:null;N.start===0&&(N.start=M),I&&I.start===0&&(I.start=M);var G=o.audio,z=O==="audio"&&g.id===1&&(G==null?void 0:G.container)==="audio/mpeg",H={execute:function(){if(w.executeStart=self.performance.now(),z){var U=t.sourceBuffer[O];if(U){var B=b.start-U.timestampOffset;Math.abs(B)>=.1&&(p.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+B+") sn: "+b.sn+")"),U.timestampOffset=b.start)}}t.appendExecutor(k,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();w.executeEnd=w.end=U,N.first===0&&(N.first=U),I&&I.first===0&&(I.first=U);var B=t.sourceBuffer,V={};for(var ae in B)V[ae]=E.BufferHelper.getBuffered(B[ae]);t.appendError=0,t.hls.trigger(u.Events.BUFFER_APPENDED,{type:O,frag:b,part:v,chunkMeta:g,parent:b.type,timeRanges:V})},onError:function(U){p.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var B={type:C.ErrorTypes.MEDIA_ERROR,parent:b.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?B.details=C.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,B.details=C.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(p.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),B.fatal=!0)),S.trigger(u.Events.ERROR,B)}};x.append(H,O)},_.onBufferFlushing=function(i,a){var t=this,S=this.operationQueue,x=function(k){return{execute:t.removeExecutor.bind(t,k,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(u.Events.BUFFER_FLUSHED,{type:k})},onError:function(b){p.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",b)}}};a.type?S.append(x(a.type),a.type):this.getSourceBufferTypes().forEach(function(o){S.append(x(o),o)})},_.onFragParsed=function(i,a){var t=this,S=a.frag,x=a.part,o=[],k=x?x.elementaryStreams:S.elementaryStreams;k[s.ElementaryStreamTypes.AUDIOVIDEO]?o.push("audiovideo"):(k[s.ElementaryStreamTypes.AUDIO]&&o.push("audio"),k[s.ElementaryStreamTypes.VIDEO]&&o.push("video"));var O=function(){var v=self.performance.now();S.stats.buffering.end=v,x&&(x.stats.buffering.end=v);var g=x?x.stats:S.stats;t.hls.trigger(u.Events.FRAG_BUFFERED,{frag:S,part:x,stats:g,id:S.type})};o.length===0&&p.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,o)},_.onFragChanged=function(i,a){this.flushBackBuffer()},_.onBufferEos=function(i,a){var t=this,S=this.getSourceBufferTypes().reduce(function(x,o){var k=t.sourceBuffer[o];return(!a.type||a.type===o)&&(k&&!k.ended&&(k.ended=!0,p.logger.log("[buffer-controller]: "+o+" sourceBuffer now EOS"))),x&&!!(!k||k.ended)},!0);S&&this.blockBuffers(function(){var x=t.mediaSource;if(!x||x.readyState!=="open")return;x.endOfStream()})},_.onLevelUpdated=function(i,a){var t=a.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},_.flushBackBuffer=function(){var i=this.hls,a=this.details,t=this.media,S=this.sourceBuffer;if(!t||a===null)return;var x=this.getSourceBufferTypes();if(!x.length)return;var o=a.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(D.isFiniteNumber)(o)||o<0)return;var k=t.currentTime,O=a.levelTargetDuration,b=Math.max(o,O),v=Math.floor(k/O)*O-b;x.forEach(function(g){var w=S[g];if(w){var M=E.BufferHelper.getBuffered(w);M.length>0&&v>M.start(0)&&(i.trigger(u.Events.BACK_BUFFER_REACHED,{bufferEnd:v}),a.live&&i.trigger(u.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:v}),i.trigger(u.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:v,type:g}))}})},_.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,a=this.hls,t=this.media,S=this.mediaSource,x=i.fragments[0].start+i.totalduration,o=t.duration,k=Object(D.isFiniteNumber)(S.duration)?S.duration:0;i.live&&a.config.liveDurationInfinity?(p.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(i)):(x>k&&x>o||!Object(D.isFiniteNumber)(o))&&(p.logger.log("[buffer-controller]: Updating Media Source duration to "+x.toFixed(3)),S.duration=x)},_.updateSeekableRange=function(i){var a=this.mediaSource,t=i.fragments,S=t.length;if(S&&i.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var x=Math.max(0,t[0].start),o=Math.max(x,x+i.totalduration);a.setLiveSeekableRange(x,o)}},_.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,a=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!i||S===2){this.createSourceBuffers(t),this.pendingTracks={};var x=this.getSourceBufferTypes();if(x.length===0){this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}x.forEach(function(o){a.executeNext(o)})}},_.createSourceBuffers=function(i){var a=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var x in i)if(!a[x]){var o=i[x];if(!o)throw Error("source buffer exists for track "+x+", however track does not");var k=o.levelCodec||o.codec,O=o.container+";codecs="+k;p.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var b=a[x]=t.addSourceBuffer(O),v=x;this.addBufferListener(v,"updatestart",this._onSBUpdateStart),this.addBufferListener(v,"updateend",this._onSBUpdateEnd),this.addBufferListener(v,"error",this._onSBUpdateError),this.tracks[x]={buffer:b,codec:k,container:o.container,levelCodec:o.levelCodec,id:o.id},S++}catch(g){p.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+g.message),this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,mimeType:O})}}S&&this.hls.trigger(u.Events.BUFFER_CREATED,{tracks:this.tracks})},_._onSBUpdateStart=function(i){var a=this.operationQueue,t=a.current(i);t.onStart()},_._onSBUpdateEnd=function(i){var a=this.operationQueue,t=a.current(i);t.onComplete(),a.shiftAndExecuteNext(i)},_._onSBUpdateError=function(i,a){p.logger.error("[buffer-controller]: "+i+" SourceBuffer error",a),this.hls.trigger(u.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(a)},_.removeExecutor=function(i,a,t){var S=this.media,x=this.mediaSource,o=this.operationQueue,k=this.sourceBuffer,O=k[i];if(!S||!x||!O){p.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),o.shiftAndExecuteNext(i);return}var b=Object(D.isFiniteNumber)(S.duration)?S.duration:Infinity,v=Object(D.isFiniteNumber)(x.duration)?x.duration:Infinity,g=Math.max(0,a),w=Math.min(t,b,v);w>g?(p.logger.log("[buffer-controller]: Removing ["+g+","+w+"] from the "+i+" SourceBuffer"),console.assert(!O.updating,i+" sourceBuffer must not be updating"),O.remove(g,w)):o.shiftAndExecuteNext(i)},_.appendExecutor=function(i,a){var t=this.operationQueue,S=this.sourceBuffer,x=S[a];if(!x){p.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(a);return}x.ended=!1,console.assert(!x.updating,a+" sourceBuffer must not be updating"),x.appendBuffer(i)},_.blockBuffers=function(i,a){var t=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){p.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var S=this.operationQueue,x=a.map(function(o){return S.appendBlocker(o)});Promise.all(x).then(function(){i(),a.forEach(function(o){var k=t.sourceBuffer[o];(!k||!k.updating)&&S.shiftAndExecuteNext(o)})})},_.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},_.addBufferListener=function(i,a,t){var S=this.sourceBuffer[i];if(!S)return;var x=t.bind(this,i);this.listeners[i].push({event:a,listener:x}),S.addEventListener(a,x)},_.removeBufferListeners=function(i){var a=this.sourceBuffer[i];if(!a)return;this.listeners[i].forEach(function(t){a.removeEventListener(t.event,t.listener)})},m}()},"./src/controller/buffer-operation-queue.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return u});var D=T("./src/utils/logger.ts"),u=function(){function p(E){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=E}var C=p.prototype;return C.append=function(l,s){var n=this.queues[s];n.push(l),n.length===1&&this.buffers[s]&&this.executeNext(s)},C.insertAbort=function(l,s){var n=this.queues[s];n.unshift(l),this.executeNext(s)},C.appendBlocker=function(l){var s,n=new Promise(function(f){s=f}),h={execute:s,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,l),n},C.executeNext=function(l){var s=this.buffers,n=this.queues,h=s[l],f=n[l];if(f.length){var c=f[0];try{c.execute()}catch(m){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(m),(!h||!h.updating)&&(f.shift(),this.executeNext(l))}}},C.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},C.current=function(l){return this.queues[l][0]},p}()},"./src/controller/cap-level-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts");function u(E,l){for(var s=0;s<l.length;s++){var n=l[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function p(E,l,s){return l&&u(E.prototype,l),s&&u(E,s),E}var C=function(){function E(s){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=s,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var l=E.prototype;return l.setStreamController=function(n){this.streamController=n},l.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},l.registerListeners=function(){var n=this.hls;n.on(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},l.unregisterListener=function(){var n=this.hls;n.off(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},l.onFpsDropLevelCapping=function(n,h){E.isLevelAllowed(h.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(h.droppedLevel)},l.onMediaAttaching=function(n,h){this.media=h.media instanceof HTMLVideoElement?h.media:null},l.onManifestParsed=function(n,h){var f=this.hls;this.restrictedLevels=[],this.firstLevel=h.firstLevel,f.config.capLevelToPlayerSize&&h.video&&this.startCapping()},l.onBufferCodecs=function(n,h){var f=this.hls;f.config.capLevelToPlayerSize&&h.video&&this.startCapping()},l.onMediaDetaching=function(){this.stopCapping()},l.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(n.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},l.getMaxLevel=function(n){var h=this,f=this.hls.levels;if(!f.length)return-1;var c=f.filter(function(m,_){return E.isLevelAllowed(_,h.restrictedLevels)&&_<=n});return this.clientRect=null,E.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},l.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,h={width:0,height:0};if(n){var f=n.getBoundingClientRect();h.width=f.width,h.height=f.height,!h.width&&!h.height&&(h.width=f.right-f.left||n.width||0,h.height=f.bottom-f.top||n.height||0)}return this.clientRect=h,h},E.isLevelAllowed=function(n,h){return h===void 0&&(h=[]),h.indexOf(n)===-1},E.getMaxLevelByMediaSize=function(n,h,f){if(!n||!n.length)return-1;for(var c=function(a,t){return t?a.width!==t.width||a.height!==t.height:!0},m=n.length-1,_=0;_<n.length;_+=1){var y=n[_];if((y.width>=h||y.height>=f)&&c(y,n[_+1])){m=_;break}}return m},p(E,[{key:"mediaWidth",get:function(){return this.getDimensions().width*E.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*E.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(h){}return n}}]),E}();d.default=C},"./src/controller/cmcd-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./src/events.ts"),u=T("./src/types/cmcd.ts"),p=T("./src/utils/buffer-helper.ts"),C=T("./src/utils/logger.ts");function E(m,_){for(var y=0;y<_.length;y++){var i=_[y];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(m,i.key,i)}}function l(m,_,y){return _&&E(m.prototype,_),y&&E(m,y),m}function s(m,_){var y=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(y)return(y=y.call(m)).next.bind(y);if(Array.isArray(m)||(y=n(m))||_&&m&&typeof m.length=="number"){y&&(m=y);var i=0;return function(){return i>=m.length?{done:!0}:{done:!1,value:m[i++]}}}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(m,_){if(!m)return;if(typeof m=="string")return h(m,_);var y=Object.prototype.toString.call(m).slice(8,-1);if(y==="Object"&&m.constructor&&(y=m.constructor.name),y==="Map"||y==="Set")return Array.from(m);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return h(m,_)}function h(m,_){(_==null||_>m.length)&&(_=m.length);for(var y=0,i=new Array(_);y<_;y++)i[y]=m[y];return i}function f(){return f=Object.assign||function(m){for(var _=1;_<arguments.length;_++){var y=arguments[_];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},f.apply(this,arguments)}var c=function(){function m(y){var i=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(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(S){try{i.apply(S,{ot:u.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(x){C.logger.warn("Could not generate manifest CMCD data.",x)}},this.applyFragmentData=function(S){try{var x=S.frag,o=i.hls.levels[x.level],k=i.getObjectType(x),O={d:x.duration*1e3,ot:k};(k===u.CMCDObjectType.VIDEO||k===u.CMCDObjectType.AUDIO||k==u.CMCDObjectType.MUXED)&&(O.br=o.bitrate/1e3,O.tb=i.getTopBandwidth(k),O.bl=i.getBufferLength(k)),i.apply(S,O)}catch(b){C.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=y;var a=this.config=y.config,t=a.cmcd;t!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||m.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var _=m.prototype;return _.registerListeners=function(){var i=this.hls;i.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this)},_.unregisterListeners=function(){var i=this.hls;i.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},_.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},_.onMediaAttached=function(i,a){this.media=a.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},_.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},_.onBufferCreated=function(i,a){var t,S;this.audioBuffer=(t=a.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(S=a.tracks.video)===null||S===void 0?void 0:S.buffer},_.createData=function(){var i;return{v:u.CMCDVersion,sf:u.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},_.apply=function(i,a){a===void 0&&(a={}),f(a,this.createData());var t=a.ot===u.CMCDObjectType.INIT||a.ot===u.CMCDObjectType.VIDEO||a.ot===u.CMCDObjectType.MUXED;if(this.starved&&t&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var S=m.toHeaders(a);if(!Object.keys(S).length)return;i.headers||(i.headers={}),f(i.headers,S)}else{var x=m.toQuery(a);if(!x)return;i.url=m.appendQueryToUri(i.url,x)}},_.getObjectType=function(i){var a=i.type;return a==="subtitle"?u.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?u.CMCDObjectType.INIT:a==="audio"?u.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?u.CMCDObjectType.VIDEO:u.CMCDObjectType.MUXED:void 0},_.getTopBandwidth=function(i){for(var a=0,t=i===u.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,S=s(t),x;!(x=S()).done;){var o=x.value;o.bitrate>a&&(a=o.bitrate)}return a>0?a:NaN},_.getBufferLength=function(i){var a=this.hls.media,t=i===u.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!a)return NaN;var S=p.BufferHelper.bufferInfo(t,a.currentTime,this.config.maxBufferHole);return S.len*1e3},_.createPlaylistLoader=function(){var i=this.config.pLoader,a=this.applyPlaylistData,t=i||this.config.loader;return function(){function S(o){this.loader=void 0,this.loader=new t(o)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(k,O,b){a(k),this.loader.load(k,O,b)},l(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},_.createFragmentLoader=function(){var i=this.config.fLoader,a=this.applyFragmentData,t=i||this.config.loader;return function(){function S(o){this.loader=void 0,this.loader=new t(o)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(k,O,b){a(k),this.loader.load(k,O,b)},l(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},m.uuid=function(){var i=URL.createObjectURL(new Blob),a=i.toString();return URL.revokeObjectURL(i),a.substr(a.lastIndexOf("/")+1)},m.serialize=function(i){for(var a=[],t=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},S=function(z){return Math.round(z)},x=function(z){return S(z/100)*100},o=function(z){return encodeURIComponent(z)},k={br:S,d:S,bl:x,dl:x,mtp:x,nor:o,rtp:x,tb:S},O=Object.keys(i||{}).sort(),b=s(O),v;!(v=b()).done;){var g=v.value,w=i[g];if(!t(w))continue;if(g==="v"&&w===1)continue;if(g=="pr"&&w===1)continue;var M=k[g];M&&(w=M(w));var N=typeof w,I=void 0;g==="ot"||g==="sf"||g==="st"?I=g+"="+w:N==="boolean"?I=g:N==="number"?I=g+"="+w:I=g+"="+JSON.stringify(w),a.push(I)}return a.join(",")},m.toHeaders=function(i){for(var a=Object.keys(i),t={},S=["Object","Request","Session","Status"],x=[{},{},{},{}],o={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},k=0,O=a;k<O.length;k++){var b=O[k],v=o[b]!=null?o[b]:1;x[v][b]=i[b]}for(var g=0;g<x.length;g++){var w=m.serialize(x[g]);w&&(t["CMCD-"+S[g]]=w)}return t},m.toQuery=function(i){return"CMCD="+encodeURIComponent(m.serialize(i))},m.appendQueryToUri=function(i,a){if(!a)return i;var t=i.includes("?")?"&":"?";return""+i+t+a},m}()},"./src/controller/eme-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/utils/logger.ts"),C=T("./src/utils/mediakeys-helper.ts");function E(c,m){for(var _=0;_<m.length;_++){var y=m[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(c,y.key,y)}}function l(c,m,_){return m&&E(c.prototype,m),_&&E(c,_),c}var s=3,n=function(m,_,y){var i={audioCapabilities:[],videoCapabilities:[]};return m.forEach(function(a){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:y.audioRobustness||""})}),_.forEach(function(a){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:y.videoRobustness||""})}),[i]},h=function(m,_,y,i){switch(m){case C.KeySystems.WIDEVINE:return n(_,y,i);default:throw new Error("Unknown key-system: "+m)}},f=function(){function c(_){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=_,this._config=_.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 m=c.prototype;return m.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},m._registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},m._unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},m.getLicenseServerUrl=function(y){switch(y){case C.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+y+'"')},m._attemptKeySystemAccess=function(y,i,a){var t=this,S=h(y,i,a,this._drmSystemOptions);p.logger.log("Requesting encrypted media key-system access");var x=this.requestMediaKeySystemAccess(y,S);this.mediaKeysPromise=x.then(function(o){return t._onMediaKeySystemAccessObtained(y,o)}),x.catch(function(o){p.logger.error('Failed to obtain key-system "'+y+'" access:',o)})},m._onMediaKeySystemAccessObtained=function(y,i){var a=this;p.logger.log('Access for key-system "'+y+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:y};this._mediaKeysList.push(t);var S=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(x){return t.mediaKeys=x,p.logger.log('Media-keys created for key-system "'+y+'"'),a._onMediaKeysCreated(),x});return S.catch(function(x){p.logger.error("Failed to create media-keys:",x)}),S},m._onMediaKeysCreated=function(){var y=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),y._onNewMediaKeySession(i.mediaKeysSession))})},m._onNewMediaKeySession=function(y){var i=this;p.logger.log("New key-system session "+y.sessionId),y.addEventListener("message",function(a){i._onKeySessionMessage(y,a.message)},!1)},m._onKeySessionMessage=function(y,i){p.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(a){p.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),y.update(a)})},m.onMediaEncrypted=function(y){var i=this;if(p.logger.log('Media is encrypted using "'+y.initDataType+'" init data type'),!this.mediaKeysPromise){p.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(S){if(!i._media)return;i._attemptSetMediaKeys(S),i._generateRequestWithPreferredKeySession(y.initDataType,y.initData)};this.mediaKeysPromise.then(a).catch(a)},m._attemptSetMediaKeys=function(y){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){p.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}p.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},m._generateRequestWithPreferredKeySession=function(y,i){var a=this,t=this._mediaKeysList[0];if(!t){p.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){p.logger.warn("Key-Session already initialized but requested again");return}var S=t.mediaKeysSession;if(!S){p.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){p.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}p.logger.log('Generating key-session request for "'+y+'" init data type'),t.mediaKeysSessionInitialized=!0,S.generateRequest(y,i).then(function(){p.logger.debug("Key-session generation succeeded")}).catch(function(x){p.logger.error("Error generating key-session request:",x),a.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},m._createLicenseXhr=function(y,i,a){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,y,i,a);var S=this._licenseXhrSetup;if(S)try{S.call(this.hls,t,y),S=void 0}catch(x){p.logger.error(x)}try{t.readyState||t.open("POST",y,!0),S&&S.call(this.hls,t,y)}catch(x){throw new Error("issue setting up KeySystem license XHR "+x)}return t},m._onLicenseRequestReadyStageChange=function(y,i,a,t){switch(y.readyState){case 4:if(y.status===200){this._requestLicenseFailureCount=0,p.logger.log("License request succeeded");var S=y.response,x=this._licenseResponseCallback;if(x)try{S=x.call(this.hls,y,i)}catch(k){p.logger.error(k)}t(S)}else{if(p.logger.error("License Request XHR failed ("+i+"). Status: "+y.status+" ("+y.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>s){this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var o=s-this._requestLicenseFailureCount+1;p.logger.warn("Retrying license request, "+o+" attempts left"),this._requestLicense(a,t)}break}},m._generateLicenseRequestChallenge=function(y,i){switch(y.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+y.mediaKeySystemDomain)},m._requestLicense=function(y,i){p.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){p.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(a.mediaKeySystemDomain),S=this._createLicenseXhr(t,y,i);p.logger.log("Sending license request to URL: "+t);var x=this._generateLicenseRequestChallenge(a,y);S.send(x)}catch(o){p.logger.error("Failure requesting DRM license: "+o),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},m.onMediaAttached=function(y,i){if(!this._emeEnabled)return;var a=i.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},m.onMediaDetached=function(){var y=this._media,i=this._mediaKeysList;if(!y)return;y.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return y.setMediaKeys(null)}).catch(function(){})},m.onManifestParsed=function(y,i){if(!this._emeEnabled)return;var a=i.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=i.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,a,t)},l(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();d.default=f},"./src/controller/fps-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/utils/logger.ts"),p=function(){function C(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var E=C.prototype;return E.setStreamController=function(s){this.streamController=s},E.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},E.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},E.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},E.onMediaAttaching=function(s,n){var h=this.hls.config;if(h.capLevelOnFPSDrop){var f=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},E.checkFPS=function(s,n,h){var f=performance.now();if(n){if(this.lastTime){var c=f-this.lastTime,m=h-this.lastDroppedFrames,_=n-this.lastDecodedFrames,y=1e3*m/c,i=this.hls;if(i.trigger(D.Events.FPS_DROP,{currentDropped:m,currentDecoded:_,totalDroppedFrames:h}),y>0&&m>i.config.fpsDroppedMonitoringThreshold*_){var a=i.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=a)&&(a=a-1,i.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:i.currentLevel}),i.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=h,this.lastDecodedFrames=n}},E.checkFPSInterval=function(){var s=this.media;if(s)if(this.isVideoPlaybackQualityAvailable){var n=s.getVideoPlaybackQuality();this.checkFPS(s,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(s,s.webkitDecodedFrameCount,s.webkitDroppedFrameCount)},C}();d.default=p},"./src/controller/fragment-finders.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"findFragmentByPDT",function(){return p}),T.d(d,"findFragmentByPTS",function(){return C}),T.d(d,"fragmentWithinToleranceTest",function(){return E}),T.d(d,"pdtWithinToleranceTest",function(){return l}),T.d(d,"findFragWithCC",function(){return s});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/binary-search.ts");function p(n,h,f){if(h===null||!Array.isArray(n)||!n.length||!Object(D.isFiniteNumber)(h))return null;var c=n[0].programDateTime;if(h<(c||0))return null;var m=n[n.length-1].endProgramDateTime;if(h>=(m||0))return null;f=f||0;for(var _=0;_<n.length;++_){var y=n[_];if(l(h,f,y))return y}return null}function C(n,h,f,c){f===void 0&&(f=0),c===void 0&&(c=0);var m=null;if(n?m=h[n.sn-h[0].sn+1]||null:f===0&&h[0].start===0&&(m=h[0]),m&&E(f,c,m)===0)return m;var _=u.default.search(h,E.bind(null,f,c));return _||m}function E(n,h,f){n===void 0&&(n=0),h===void 0&&(h=0);var c=Math.min(h,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-c<=n?1:f.start-c>n&&f.start?-1:0}function l(n,h,f){var c=Math.min(h,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,m=f.endProgramDateTime||0;return m-c>n}function s(n,h){return u.default.search(n,function(f){return f.cc<h?1:f.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"FragmentState",function(){return p}),T.d(d,"FragmentTracker",function(){return C});var D=T("./src/events.ts"),u=T("./src/types/loader.ts"),p;(function(s){s.NOT_LOADED="NOT_LOADED",s.BACKTRACKED="BACKTRACKED",s.APPENDING="APPENDING",s.PARTIAL="PARTIAL",s.OK="OK"})(p||(p={}));var C=function(){function s(h){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=h,this._registerListeners()}var n=s.prototype;return n._registerListeners=function(){var f=this.hls;f.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var f=this.hls;f.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(f,c){if(c===u.PlaylistLevelType.MAIN){var m=this.activeFragment,_=this.activeParts;if(!m)return null;if(_)for(var y=_.length;y--;){var i=_[y],a=i?i.end:m.appendedPTS;if(i.start<=f&&a!==void 0&&f<=a)return y>9&&(this.activeParts=_.slice(y-9)),i}else if(m.start<=f&&m.appendedPTS!==void 0&&f<=m.appendedPTS)return m}return this.getBufferedFrag(f,c)},n.getBufferedFrag=function(f,c){for(var m=this.fragments,_=Object.keys(m),y=_.length;y--;){var i=m[_[y]];if((i==null?void 0:i.body.type)===c&&i.buffered){var a=i.body;if(a.start<=f&&f<=a.end)return a}}return null},n.detectEvictedFragments=function(f,c,m){var _=this;Object.keys(this.fragments).forEach(function(y){var i=_.fragments[y];if(!i)return;if(!i.buffered){i.body.type===m&&_.removeFragment(i.body);return}var a=i.range[f];if(!a)return;a.time.some(function(t){var S=!_.isTimeBuffered(t.startPTS,t.endPTS,c);return S&&_.removeFragment(i.body),S})})},n.detectPartialFragments=function(f){var c=this,m=this.timeRanges,_=f.frag,y=f.part;if(!m||_.sn==="initSegment")return;var i=l(_),a=this.fragments[i];if(!a)return;Object.keys(m).forEach(function(t){var S=_.elementaryStreams[t];if(!S)return;var x=m[t],o=y!==null||S.partial===!0;a.range[t]=c.getBufferedTimes(_,y,o,x)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},n.fragBuffered=function(f){var c=l(f),m=this.fragments[c];m&&(m.backtrack=m.loaded=null,m.buffered=!0)},n.getBufferedTimes=function(f,c,m,_){for(var y={time:[],partial:m},i=c?c.start:f.start,a=c?c.end:f.end,t=f.minEndPTS||a,S=f.maxStartPTS||i,x=0;x<_.length;x++){var o=_.start(x)-this.bufferPadding,k=_.end(x)+this.bufferPadding;if(S>=o&&t<=k){y.time.push({startPTS:Math.max(i,_.start(x)),endPTS:Math.min(a,_.end(x))});break}else if(i<k&&a>o)y.partial=!0,y.time.push({startPTS:Math.max(i,_.start(x)),endPTS:Math.min(a,_.end(x))});else if(a<=o)break}return y},n.getPartialFragment=function(f){var c=null,m,_,y,i=0,a=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var x=t[S];if(!x)return;E(x)&&(_=x.body.start-a,y=x.body.end+a,f>=_&&f<=y&&(m=Math.min(f-_,y-f),i<=m&&(c=x.body,i=m)))}),c},n.getState=function(f){var c=l(f),m=this.fragments[c];return m?m.buffered?E(m)?p.PARTIAL:p.OK:m.backtrack?p.BACKTRACKED:p.APPENDING:p.NOT_LOADED},n.backtrack=function(f,c){var m=l(f),_=this.fragments[m];if(!_||_.backtrack)return null;var y=_.backtrack=c||_.loaded;return _.loaded=null,y},n.getBacktrackData=function(f){var c=l(f),m=this.fragments[c];if(m){var _,y=m.backtrack;if(y!=null&&(_=y.payload)!==null&&_!==void 0&&_.byteLength)return y;this.removeFragment(f)}return null},n.isTimeBuffered=function(f,c,m){for(var _,y,i=0;i<m.length;i++){if(_=m.start(i)-this.bufferPadding,y=m.end(i)+this.bufferPadding,f>=_&&c<=y)return!0;if(c<=_)return!1}return!1},n.onFragLoaded=function(f,c){var m=c.frag,_=c.part;if(m.sn==="initSegment"||m.bitrateTest||_)return;var y=l(m);this.fragments[y]={body:m,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(f,c){var m=this,_=c.frag,y=c.part,i=c.timeRanges;if(_.type===u.PlaylistLevelType.MAIN)if(this.activeFragment=_,y){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(y)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var S=i[t];if(m.detectEvictedFragments(t,S),!y)for(var x=0;x<S.length;x++)_.appendedPTS=Math.max(S.end(x),_.appendedPTS||0)})},n.onFragBuffered=function(f,c){this.detectPartialFragments(c)},n.hasFragment=function(f){var c=l(f);return!!this.fragments[c]},n.removeFragmentsInRange=function(f,c,m){var _=this;Object.keys(this.fragments).forEach(function(y){var i=_.fragments[y];if(!i)return;if(i.buffered){var a=i.body;a.type===m&&a.start<c&&a.end>f&&_.removeFragment(a)}})},n.removeFragment=function(f){var c=l(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[c]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},s}();function E(s){var n,h;return s.buffered&&(((n=s.range.video)===null||n===void 0?void 0:n.partial)||((h=s.range.audio)===null||h===void 0?void 0:h.partial))}function l(s){return s.type+"_"+s.level+"_"+s.urlId+"_"+s.sn}},"./src/controller/gap-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"STALL_MINIMUM_DURATION_MS",function(){return E}),T.d(d,"MAX_START_GAP_JUMP",function(){return l}),T.d(d,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return s}),T.d(d,"SKIP_BUFFER_RANGE_START",function(){return n}),T.d(d,"default",function(){return h});var D=T("./src/utils/buffer-helper.ts"),u=T("./src/errors.ts"),p=T("./src/events.ts"),C=T("./src/utils/logger.ts"),E=250,l=2,s=.1,n=.05,h=function(){function f(m,_,y,i){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=m,this.media=_,this.fragmentTracker=y,this.hls=i}var c=f.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(_){var y=this.config,i=this.media,a=this.stalled,t=i.currentTime,S=i.seeking,x=this.seeking&&!S,o=!this.seeking&&S;if(this.seeking=S,t!==_){if(this.moved=!0,a!==null){if(this.stallReported){var k=self.performance.now()-a;C.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((o||x)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!D.BufferHelper.getBuffered(i).length)return;var O=D.BufferHelper.bufferInfo(i,t,0),b=O.len>0,v=O.nextStart||0;if(!b&&!v)return;if(S){var g=O.len>l,w=!v||v-t>l&&!this.fragmentTracker.getPartialFragment(t);if(g||w)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,N=Math.max(v,O.start||0)-t,I=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=I==null||((M=I.details)===null||M===void 0)?void 0:M.live,z=G?I.details.targetduration*2:l;if(N>0&&N<=z){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(a===null){this.stalled=H;return}var K=H-a;!S&&K>=E&&this._reportStall(O.len);var U=D.BufferHelper.bufferInfo(i,t,y.maxBufferHole);this._tryFixBufferStall(U,K)},c._tryFixBufferStall=function(_,y){var i=this.config,a=this.fragmentTracker,t=this.media,S=t.currentTime,x=a.getPartialFragment(S);if(x){var o=this._trySkipBufferHole(x);if(o)return}_.len>i.maxBufferHole&&y>i.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(_){var y=this.hls,i=this.media,a=this.stallReported;a||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+_+")"),y.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:_}))},c._trySkipBufferHole=function(_){for(var y=this.config,i=this.hls,a=this.media,t=a.currentTime,S=0,x=D.BufferHelper.getBuffered(a),o=0;o<x.length;o++){var k=x.start(o);if(t+y.maxBufferHole>=S&&t<k){var O=Math.max(k+n,a.currentTime+s);return C.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,a.currentTime=O,_&&i.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:_}),O}S=x.end(o)}return 0},c._tryNudgeBuffer=function(){var _=this.config,y=this.hls,i=this.media,a=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<_.nudgeMaxRetry){var S=a+t*_.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+a+" to "+S),i.currentTime=S,y.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+_.nudgeMaxRetry+" nudges"),y.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},f}()},"./src/controller/id3-track-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/utils/texttrack-utils.ts"),p=T("./src/demux/id3.ts"),C=.25,E=function(){function l(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var s=l.prototype;return s.destroy=function(){this._unregisterListeners()},s._registerListeners=function(){var h=this.hls;h.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},s._unregisterListeners=function(){var h=this.hls;h.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},s.onMediaAttached=function(h,f){this.media=f.media},s.onMediaDetaching=function(){if(!this.id3Track)return;Object(u.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},s.getID3Track=function(h){if(!this.media)return;for(var f=0;f<h.length;f++){var c=h[f];if(c.kind==="metadata"&&c.label==="id3")return Object(u.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},s.onFragParsingMetadata=function(h,f){if(!this.media)return;var c=f.frag,m=f.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var _=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,y=0;y<m.length;y++){var i=p.getID3Frames(m[y].data);if(i){var a=m[y].pts,t=y<m.length-1?m[y+1].pts:c.end,S=t-a;S<=0&&(t=a+C);for(var x=0;x<i.length;x++){var o=i[x];if(!p.isTimeStampFrame(o)){var k=new _(a,t,"");k.value=o,this.id3Track.addCue(k)}}}}},s.onBufferFlushing=function(h,f){var c=f.startOffset,m=f.endOffset,_=f.type;if(!_||_==="audio"){var y=this.id3Track;y&&Object(u.removeCuesInRange)(y,c,m)}},l}();d.default=E},"./src/controller/latency-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return l});var D=T("./src/errors.ts"),u=T("./src/events.ts"),p=T("./src/utils/logger.ts");function C(s,n){for(var h=0;h<n.length;h++){var f=n[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}function E(s,n,h){return n&&C(s.prototype,n),h&&C(s,h),s}var l=function(){function s(h){var f=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 f.timeupdate()},this.hls=h,this.config=h.config,this.registerListeners()}var n=s.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(u.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(u.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(u.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(u.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(u.Events.ERROR,this.onError)},n.onMediaAttached=function(f,c){this.media=c.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(f,c){var m=c.details;this.levelDetails=m,m.advanced&&this.timeupdate(),!m.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(f,c){if(c.details!==D.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,p.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var f=this.media,c=this.levelDetails;if(!f||!c)return;this.currentTime=f.currentTime;var m=this.computeLatency();if(m===null)return;this._latency=m;var _=this.config,y=_.lowLatencyMode,i=_.maxLiveSyncPlaybackRate;if(!y||i===1)return;var a=this.targetLatency;if(a===null)return;var t=m-a,S=Math.min(this.maxLatency,a+c.targetduration),x=t<S;if(c.live&&x&&t>.05&&this.forwardBufferLength>1){var o=Math.min(2,Math.max(1,i)),k=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;f.playbackRate=Math.min(o,Math.max(1,k))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},n.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},n.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},E(s,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var f=this.config,c=this.levelDetails;return f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:c?f.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var f=this.levelDetails;if(f===null)return null;var c=f.holdBack,m=f.partHoldBack,_=f.targetduration,y=this.config,i=y.liveSyncDuration,a=y.liveSyncDurationCount,t=y.lowLatencyMode,S=this.hls.userConfig,x=t&&m||c;(S.liveSyncDuration||S.liveSyncDurationCount||x===0)&&(x=i!==void 0?i:a*_);var o=_,k=1;return x+Math.min(this.stallCount*k,o)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),c=this.targetLatency,m=this.levelDetails;if(f===null||c===null||m===null)return null;var _=m.edge,y=f-c-this.edgeStalled,i=_-m.totalduration,a=_-(this.config.lowLatencyMode&&m.partTarget||m.targetduration);return Math.min(Math.max(i,y),a)}},{key:"drift",get:function(){var f=this.levelDetails;return f===null?1:f.drift}},{key:"edgeStalled",get:function(){var f=this.levelDetails;if(f===null)return 0;var c=(this.config.lowLatencyMode&&f.partTarget||f.targetduration)*3;return Math.max(f.age-c,0)}},{key:"forwardBufferLength",get:function(){var f=this.media,c=this.levelDetails;if(!f||!c)return 0;var m=f.buffered.length;return m?f.buffered.end(m-1):c.edge-this.currentTime}}]),s}()},"./src/controller/level-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return y});var D=T("./src/types/level.ts"),u=T("./src/events.ts"),p=T("./src/errors.ts"),C=T("./src/utils/codecs.ts"),E=T("./src/controller/level-helper.ts"),l=T("./src/controller/base-playlist-controller.ts"),s=T("./src/types/loader.ts");function n(){return n=Object.assign||function(i){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var S in t)Object.prototype.hasOwnProperty.call(t,S)&&(i[S]=t[S])}return i},n.apply(this,arguments)}function h(i,a){for(var t=0;t<a.length;t++){var S=a[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function f(i,a,t){return a&&h(i.prototype,a),t&&h(i,t),i}function c(i,a){i.prototype=Object.create(a.prototype),i.prototype.constructor=i,m(i,a)}function m(i,a){return m=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},m(i,a)}var _=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),y=function(i){c(a,i);function a(S){var x;return x=i.call(this,S,"[level-controller]")||this,x._levels=[],x._firstLevel=-1,x._startLevel=void 0,x.currentLevelIndex=-1,x.manualLevelIndex=-1,x.onParsedComplete=void 0,x._registerListeners(),x}var t=a.prototype;return t._registerListeners=function(){var x=this.hls;x.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.on(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),x.on(u.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var x=this.hls;x.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.off(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),x.off(u.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var x=this._levels;x.forEach(function(o){o.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(x,o){var k=[],O=[],b=[],v,g={},w,M=!1,N=!1,I=!1;if(o.levels.forEach(function(K){var U=K.attrs;M=M||!!(K.width&&K.height),N=N||!!K.videoCodec,I=I||!!K.audioCodec,_&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var B=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;w=g[B],w?w.url.push(K.url):(w=new D.Level(K),g[B]=w,k.push(w)),U&&(U.AUDIO&&Object(E.addGroupId)(w,"audio",U.AUDIO),U.SUBTITLES&&Object(E.addGroupId)(w,"text",U.SUBTITLES))}),(M||N)&&I&&(k=k.filter(function(K){var U=K.videoCodec,B=K.width,V=K.height;return!!U||!!(B&&V)})),k=k.filter(function(K){var U=K.audioCodec,B=K.videoCodec;return(!U||Object(C.isCodecSupportedInMp4)(U,"audio"))&&(!B||Object(C.isCodecSupportedInMp4)(B,"video"))}),o.audioTracks&&(O=o.audioTracks.filter(function(K){return!K.audioCodec||Object(C.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(E.assignTrackIdsByGroup)(O)),o.subtitles&&(b=o.subtitles,Object(E.assignTrackIdsByGroup)(b)),k.length>0){v=k[0].bitrate,k.sort(function(K,U){return K.bitrate-U.bitrate}),this._levels=k;for(var G=0;G<k.length;G++)if(k[G].bitrate===v){this._firstLevel=G,this.log("manifest loaded, "+k.length+" level(s) found, first bitrate: "+v);break}var z=I&&!N,H={levels:k,audioTracks:O,subtitleTracks:b,firstLevel:this._firstLevel,stats:o.stats,audio:I,video:N,altAudio:!z&&O.some(function(K){return!!K.url})};this.hls.trigger(u.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(u.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:o.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(x,o){if(i.prototype.onError.call(this,x,o),o.fatal)return;var k=o.context,O=this._levels[this.currentLevelIndex];if(k&&(k.type===s.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&k.groupId===O.audioGroupIds[O.urlId]||k.type===s.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&k.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,v=!0,g;switch(o.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:if(o.frag){var w=this._levels[o.frag.level];w?(w.fragmentError++,w.fragmentError>this.hls.config.fragLoadingMaxRetry&&(g=o.frag.level)):g=o.frag.level}break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(v=!1),g=k.level),b=!0;break;case p.ErrorDetails.REMUX_ALLOC_ERROR:g=o.level,b=!0;break}g!==void 0&&this.recoverLevel(o,g,b,v)},t.recoverLevel=function(x,o,k,O){var b=x.details,v=this._levels[o];if(v.loadError++,k){var g=this.retryLoadingOrFail(x);if(g)x.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var w=v.url.length;if(w>1&&v.loadError<w)x.levelRetry=!0,this.redundantFailover(o);else if(this.manualLevelIndex===-1){var M=o===0?this._levels.length-1:o-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(b+": switch to "+M),x.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(x){var o=this._levels[x],k=o.url.length;if(k>1){var O=(o.urlId+1)%k;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(b){b.urlId=O}),this.level=x}},t.onFragLoaded=function(x,o){var k=o.frag;if(k!==void 0&&k.type===s.PlaylistLevelType.MAIN){var O=this._levels[k.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(x,o){var k,O=o.level,b=o.details,v=this._levels[O];if(!v){var g;this.warn("Invalid level index "+O),(g=o.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(b.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(v.fragmentError===0&&(v.loadError=0,this.retryCount=0),this.playlistLoaded(O,o,v.details)):(k=o.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(b.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(x,o){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var O=-1,b=this.hls.audioTracks[o.id].groupId,v=0;v<k.audioGroupIds.length;v++)if(k.audioGroupIds[v]===b){O=v;break}O!==k.urlId&&(k.urlId=O,this.startLoad())}},t.loadPlaylist=function(x){var o=this.currentLevelIndex,k=this._levels[o];if(this.canLoad&&k&&k.url.length>0){var O=k.urlId,b=k.url[O];if(x)try{b=x.addDirectives(b)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Attempt loading level index "+o+(x?" at sn "+x.msn+" part "+x.part:"")+" with URL-id "+O+" "+b),this.clearTimer(),this.hls.trigger(u.Events.LEVEL_LOADING,{url:b,level:o,id:O,deliveryDirectives:x||null})}},t.removeLevel=function(x,o){var k=function(v,g){return g!==o},O=this._levels.filter(function(b,v){return v!==x?!0:b.url.length>1&&o!==void 0?(b.url=b.url.filter(k),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(k)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(k)),b.urlId=0,!0):!1}).map(function(b,v){var g=b.details;return g!=null&&g.fragments&&g.fragments.forEach(function(w){w.level=v}),b});this._levels=O,this.hls.trigger(u.Events.LEVELS_UPDATED,{levels:O})},f(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(x){var o,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===x&&(o=k[x])!==null&&o!==void 0&&o.details)return;if(x<0||x>=k.length){var O=x<0;if(this.hls.trigger(u.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.LEVEL_SWITCH_ERROR,level:x,fatal:O,reason:"invalid level idx"}),O)return;x=Math.min(x,k.length-1)}this.clearTimer();var b=this.currentLevelIndex,v=k[b],g=k[x];this.log("switching to level "+x+" from "+b),this.currentLevelIndex=x;var w=n({},g,{level:x,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete w._urlId,this.hls.trigger(u.Events.LEVEL_SWITCHING,w);var M=g.details;if(!M||M.live){var N=this.switchParams(g.uri,v==null?void 0:v.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(x){this.manualLevelIndex=x,this._startLevel===void 0&&(this._startLevel=x),x!==-1&&(this.level=x)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(x){this._firstLevel=x}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var x=this.hls.config.startLevel;return x!==void 0?x:this._firstLevel}else return this._startLevel},set:function(x){this._startLevel=x}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(x){this.level=x,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=x)}}]),a}(l.default)},"./src/controller/level-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"addGroupId",function(){return p}),T.d(d,"assignTrackIdsByGroup",function(){return C}),T.d(d,"updatePTS",function(){return E}),T.d(d,"updateFragPTSDTS",function(){return s}),T.d(d,"mergeDetails",function(){return n}),T.d(d,"mapPartIntersection",function(){return h}),T.d(d,"mapFragmentIntersection",function(){return f}),T.d(d,"adjustSliding",function(){return c}),T.d(d,"addSliding",function(){return m}),T.d(d,"computeReloadInterval",function(){return _}),T.d(d,"getFragmentWithSN",function(){return y}),T.d(d,"getPartWith",function(){return i});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/logger.ts");function p(a,t,S){switch(t){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(S);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(S);break}}function C(a){var t={};a.forEach(function(S){var x=S.groupId||"";S.id=t[x]=t[x]||0,t[x]++})}function E(a,t,S){var x=a[t],o=a[S];l(x,o)}function l(a,t){var S=t.startPTS;if(Object(D.isFiniteNumber)(S)){var x=0,o;t.sn>a.sn?(x=S-a.start,o=a):(x=a.start-S,o=t),o.duration!==x&&(o.duration=x)}else if(t.sn>a.sn){var k=a.cc===t.cc;k&&a.minEndPTS?t.start=a.start+(a.minEndPTS-a.start):t.start=a.start+a.duration}else t.start=Math.max(a.start-t.duration,0)}function s(a,t,S,x,o,k){var O=x-S;O<=0&&(u.logger.warn("Fragment should have a positive duration",t),x=S+t.duration,k=o+t.duration);var b=S,v=x,g=t.startPTS,w=t.endPTS;if(Object(D.isFiniteNumber)(g)){var M=Math.abs(g-S);Object(D.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,b=Math.max(S,g),S=Math.min(S,g),o=Math.min(o,t.startDTS),v=Math.min(x,w),x=Math.max(x,w),k=Math.max(k,t.endDTS)}t.duration=x-S;var N=S-t.start;t.appendedPTS=x,t.start=t.startPTS=S,t.maxStartPTS=b,t.startDTS=o,t.endPTS=x,t.minEndPTS=v,t.endDTS=k;var I=t.sn;if(!a||I<a.startSN||I>a.endSN)return 0;var G,z=I-a.startSN,H=a.fragments;for(H[z]=t,G=z;G>0;G--)l(H[G],H[G-1]);for(G=z;G<H.length-1;G++)l(H[G],H[G+1]);return a.fragmentHint&&l(H[H.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,N}function n(a,t){for(var S=null,x=a.fragments,o=x.length-1;o>=0;o--){var k=x[o].initSegment;if(k){S=k;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,b;if(f(a,t,function(G,z){G.relurl&&(O=G.cc-z.cc),Object(D.isFiniteNumber)(G.startPTS)&&Object(D.isFiniteNumber)(G.endPTS)&&(z.start=z.startPTS=G.startPTS,z.startDTS=G.startDTS,z.appendedPTS=G.appendedPTS,z.maxStartPTS=G.maxStartPTS,z.endPTS=G.endPTS,z.endDTS=G.endDTS,z.minEndPTS=G.minEndPTS,z.duration=G.endPTS-G.startPTS,z.duration&&(b=z),t.PTSKnown=t.alignedSliding=!0),z.elementaryStreams=G.elementaryStreams,z.loader=G.loader,z.stats=G.stats,z.urlId=G.urlId,G.initSegment&&(z.initSegment=G.initSegment,S=G.initSegment)}),S){var v=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;v.forEach(function(G){var z;(!G.initSegment||G.initSegment.relurl===((z=S)===null||z===void 0?void 0:z.relurl))&&(G.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(G){return!G}),t.deltaUpdateFailed)){u.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var g=t.skippedSegments;g--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var w=t.fragments;if(O){u.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<w.length;M++)w[M].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),h(a.partList,t.partList,function(G,z){z.elementaryStreams=G.elementaryStreams,z.stats=G.stats}),b?s(t,b,b.startPTS,b.endPTS,b.startDTS,b.endDTS):c(a,t),w.length&&(t.totalduration=t.edge-w[0].start),t.driftStartTime=a.driftStartTime,t.driftStart=a.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=a.driftEndTime,t.driftEnd=a.driftEnd,t.advancedDateTime=a.advancedDateTime}function h(a,t,S){if(a&&t)for(var x=0,o=0,k=a.length;o<=k;o++){var O=a[o],b=t[o+x];O&&b&&O.index===b.index&&O.fragment.sn===b.fragment.sn?S(O,b):x--}}function f(a,t,S){for(var x=t.skippedSegments,o=Math.max(a.startSN,t.startSN)-t.startSN,k=(a.fragmentHint?1:0)+(x?t.endSN:Math.min(a.endSN,t.endSN))-t.startSN,O=t.startSN-a.startSN,b=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,v=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,g=o;g<=k;g++){var w=v[O+g],M=b[g];x&&!M&&g<x&&(M=t.fragments[g]=w),w&&M&&S(w,M)}}function c(a,t){var S=t.startSN+t.skippedSegments-a.startSN,x=a.fragments;if(S<0||S>=x.length)return;m(t,x[S].start)}function m(a,t){if(t){for(var S=a.fragments,x=a.skippedSegments;x<S.length;x++)S[x].start+=t;a.fragmentHint&&(a.fragmentHint.start+=t)}}function _(a,t){var S=1e3*a.levelTargetDuration,x=S/2,o=a.age,k=o>0&&o<S*3,O=t.loading.end-t.loading.start,b,v=a.availabilityDelay;if(a.updated===!1)if(k){var g=333*a.misses;b=Math.max(Math.min(x,O*2),g),a.availabilityDelay=(a.availabilityDelay||0)+b}else b=x;else k?(v=Math.min(v||S/2,o),a.availabilityDelay=v,b=v+S-o):b=S-O;return Math.round(b)}function y(a,t,S){if(!a||!a.details)return null;var x=a.details,o=x.fragments[t-x.startSN];return o||(o=x.fragmentHint,o&&o.sn===t?o:t<x.startSN&&S&&S.sn===t?S:null)}function i(a,t,S){if(!a||!a.details)return null;var x=a.details.partList;if(x)for(var o=x.length;o--;){var k=x[o];if(k.index===S&&k.fragment.sn===t)return k}return null}},"./src/controller/stream-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return x});var D=T("./src/polyfills/number.ts"),u=T("./src/controller/base-stream-controller.ts"),p=T("./src/is-supported.ts"),C=T("./src/events.ts"),E=T("./src/utils/buffer-helper.ts"),l=T("./src/controller/fragment-tracker.ts"),s=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),h=T("./src/demux/transmuxer-interface.ts"),f=T("./src/types/transmuxer.ts"),c=T("./src/controller/gap-controller.ts"),m=T("./src/errors.ts"),_=T("./src/utils/logger.ts");function y(o,k){for(var O=0;O<k.length;O++){var b=k[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(o,b.key,b)}}function i(o,k,O){return k&&y(o.prototype,k),O&&y(o,O),o}function a(o,k){o.prototype=Object.create(k.prototype),o.prototype.constructor=o,t(o,k)}function t(o,k){return t=Object.setPrototypeOf||function(b,v){return b.__proto__=v,b},t(o,k)}var S=100,x=function(o){a(k,o);function k(b,v){var g;return g=o.call(this,b,v,"[stream-controller]")||this,g.audioCodecSwap=!1,g.gapController=null,g.level=-1,g._forceStartLoad=!1,g.altAudio=!1,g.audioOnly=!1,g.fragPlaying=null,g.onvplaying=null,g.onvseeked=null,g.fragLastKbps=0,g.stalled=!1,g.couldBacktrack=!1,g.audioCodecSwitch=!1,g.videoBuffer=null,g._registerListeners(),g}var O=k.prototype;return O._registerListeners=function(){var v=this.hls;v.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),v.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),v.on(C.Events.ERROR,this.onError,this),v.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),v.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.on(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),v.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var v=this.hls;v.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),v.off(C.Events.ERROR,this.onError,this),v.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),v.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.off(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),v.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(v){if(this.levels){var g=this.lastCurrentTime,w=this.hls;if(this.stopLoad(),this.setInterval(S),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var M=w.startLevel;M===-1&&(w.config.testBandwidth?(M=0,this.bitrateTest=!0):M=w.nextAutoLevel),this.level=w.nextLoadLevel=M,this.loadedmetadata=!1}g>0&&v===-1&&(this.log("Override startPosition with lastCurrentTime @"+g.toFixed(3)),v=g),this.state=u.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=v,this.tick()}else this._forceStartLoad=!0,this.state=u.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,o.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_LEVEL:{var v,g=this.levels,w=this.level,M=g==null||((v=g[w])===null||v===void 0)?void 0:v.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=u.State.IDLE;break}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var N,I=self.performance.now(),G=this.retryDate;(!G||I>=G||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=u.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){o.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var v,g,w=this.hls,M=this.levelLastLoaded,N=this.levels,I=this.media,G=w.config,z=w.nextLoadLevel;if(M===null||!I&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[z])return;var H=N[z];this.level=w.nextLoadLevel=z;var K=H.details;if(!K||this.state===u.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==z){this.state=u.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:I,s.PlaylistLevelType.MAIN);if(U===null)return;var B=U.len,V=this.getMaxBufferLength(H.maxBitrate);if(B>=V)return;if(this._streamEnded(U,K)){var ae={};this.altAudio&&(ae.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,ae),this.state=u.State.ENDED;return}var he=U.end,pe=this.getNextFragment(he,K);if(this.couldBacktrack&&!this.fragPrevious&&pe&&pe.sn!=="initSegment"){var Re=pe.sn-K.startSN;Re>1&&(pe=K.fragments[Re-1],this.fragmentTracker.removeFragment(pe))}if(pe&&this.fragmentTracker.getState(pe)===l.FragmentState.OK&&this.nextLoadPosition>he){var ke=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(I,ke,s.PlaylistLevelType.MAIN),pe=this.getNextFragment(this.nextLoadPosition,K)}if(!pe)return;pe.initSegment&&!pe.initSegment.data&&!this.bitrateTest&&(pe=pe.initSegment),((v=pe.decryptdata)===null||v===void 0?void 0:v.keyFormat)==="identity"&&!((g=pe.decryptdata)!==null&&g!==void 0&&g.key)?this.loadKey(pe,K):this.loadFragment(pe,K,he)},O.loadFragment=function(v,g,w){var M,N=this.fragmentTracker.getState(v);if(this.fragCurrent=v,N===l.FragmentState.BACKTRACKED){var I=this.fragmentTracker.getBacktrackData(v);if(I){this._handleFragmentLoadProgress(I),this._handleFragmentLoadComplete(I);return}else N=l.FragmentState.NOT_LOADED}N===l.FragmentState.NOT_LOADED||N===l.FragmentState.PARTIAL?v.sn==="initSegment"?this._loadInitSegment(v):this.bitrateTest?(v.bitrateTest=!0,this.log("Fragment "+v.sn+" of level "+v.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(v)):(this.startFragRequested=!0,o.prototype.loadFragment.call(this,v,g,w)):N===l.FragmentState.APPENDING?this.reduceMaxBufferLength(v.duration)&&this.fragmentTracker.removeFragment(v):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(v){var g=this.fragmentTracker.getAppendedFrag(v,s.PlaylistLevelType.MAIN);return g&&"fragment"in g?g.fragment:g},O.getBufferedFrag=function(v){return this.fragmentTracker.getBufferedFrag(v,s.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(v){return v?this.getBufferedFrag(v.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var v=this.levels,g=this.media;if(g!=null&&g.readyState){var w,M=this.getAppendedFrag(g.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!g.paused&&v){var N=this.hls.nextLoadLevel,I=v[N],G=this.fragLastKbps;G&&this.fragCurrent?w=this.fragCurrent.duration*I.maxBitrate/(1e3*G)+1:w=0}else w=0;var z=this.getBufferedFrag(g.currentTime+w);if(z){var H=this.followingBufferedFrag(z);if(H){this.abortCurrentFrag();var K=H.maxStartPTS?H.maxStartPTS:H.start,U=H.duration,B=Math.max(z.end,K+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(B,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var v=this.fragCurrent;this.fragCurrent=null,v!=null&&v.loader&&v.loader.abort(),this.state===u.State.KEY_LOADING&&(this.state=u.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(v,g){o.prototype.flushMainBuffer.call(this,v,g,this.altAudio?"video":null)},O.onMediaAttached=function(v,g){o.prototype.onMediaAttached.call(this,v,g);var w=g.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),w.addEventListener("playing",this.onvplaying),w.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,w,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var v=this.media;v&&(v.removeEventListener("playing",this.onvplaying),v.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),o.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var v=this.media,g=v?v.currentTime:null;Object(D.isFiniteNumber)(g)&&this.log("Media seeked to "+g.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(C.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(v,g){var w=!1,M=!1,N;g.levels.forEach(function(I){N=I.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(w=!0),N.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=w&&M&&!Object(p.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=g.levels,this.startFragRequested=!1},O.onLevelLoading=function(v,g){var w=this.levels;if(!w||this.state!==u.State.IDLE)return;var M=w[g.level];(!M.details||M.details.live&&this.levelLastLoaded!==g.level||this.waitForCdnTuneIn(M.details))&&(this.state=u.State.WAITING_LEVEL)},O.onLevelLoaded=function(v,g){var w,M=this.levels,N=g.level,I=g.details,G=I.totalduration;if(!M){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+I.startSN+","+I.endSN+"], cc ["+I.startCC+", "+I.endCC+"] duration:"+G);var z=this.fragCurrent;z&&(this.state===u.State.FRAG_LOADING||this.state===u.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==g.level&&z.loader&&(this.state=u.State.IDLE,z.loader.abort()));var H=M[N],K=0;if(I.live||(w=H.details)!==null&&w!==void 0&&w.live){if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed)return;K=this.alignPlaylists(I,H.details)}if(H.details=I,this.levelLastLoaded=N,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:I,level:N}),this.state===u.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(I))return;this.state=u.State.IDLE}this.startFragRequested?I.live&&this.synchronizeToLiveEdge(I):this.setStartPosition(I,K),this.tick()},O._handleFragmentLoadProgress=function(v){var g,w=v.frag,M=v.part,N=v.payload,I=this.levels;if(!I){this.warn("Levels were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var G=I[w.level],z=G.details;if(!z){this.warn("Dropping fragment "+w.sn+" of level "+w.level+" after level details were reset");return}var H=G.videoCodec,K=z.PTSKnown||!z.live,U=(g=w.initSegment)===null||g===void 0?void 0:g.data,B=this._getAudioCodec(G),V=this.transmuxer=this.transmuxer||new h.default(this.hls,s.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ae=M?M.index:-1,he=ae!==-1,pe=new f.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,N.byteLength,ae,he),Re=this.initPTS[w.cc];V.push(N,U,B,H,w,M,z.totalduration,K,pe,Re)},O.onAudioTrackSwitching=function(v,g){var w=this.altAudio,M=!!g.url,N=g.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var I=this.fragCurrent;I!=null&&I.loader&&(this.log("Switching to main audio track, cancel main fragment load"),I.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;w&&G.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(v,g){var w=g.id,M=!!this.hls.audioTracks[w].url;if(M){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=M,this.tick()},O.onBufferCreated=function(v,g){var w=g.tracks,M,N,I=!1;for(var G in w){var z=w[G];if(z.id==="main"){if(N=G,M=z,G==="video"){var H=w[G];H&&(this.videoBuffer=H.buffer)}}else I=!0}I&&M?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(v,g){var w=g.frag,M=g.part;if(w&&w.type!==s.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(M?" p: "+M.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state),this.state===u.State.PARSED&&(this.state=u.State.IDLE);return}var N=M?M.stats:w.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),w.sn!=="initSegment"&&(this.fragPrevious=w),this.fragBufferedComplete(w,M)},O.onError=function(v,g){switch(g.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(s.PlaylistLevelType.MAIN,g);break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==u.State.ERROR&&(g.fatal?(this.warn(""+g.details),this.state=u.State.ERROR):!g.levelRetry&&this.state===u.State.WAITING_LEVEL&&(this.state=u.State.IDLE));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if(g.parent==="main"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var w=!0,M=this.getFwdBufferInfo(this.media,s.PlaylistLevelType.MAIN);M&&M.len>.5&&(w=!this.reduceMaxBufferLength(M.len)),w&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var v=this.media,g=this.gapController;if(!v||!g||!v.readyState)return;var w=E.BufferHelper.getBuffered(v);!this.loadedmetadata&&w.length?(this.loadedmetadata=!0,this.seekToStartPos()):g.poll(this.lastCurrentTime),this.lastCurrentTime=v.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=u.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(v,g){var w=g.type;if(w!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(w===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,w,s.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(v,g){this.levels=g.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var v=this.media,g=v.currentTime,w=this.startPosition;if(w>=0&&g<w){if(v.seeking){_.logger.log("could not seek to "+w+", already seeking at "+g);return}var M=E.BufferHelper.getBuffered(v),N=M.length?M.start(0):0,I=N-w;I>0&&(I<this.config.maxBufferHole||I<this.config.maxFragLookUpTolerance)&&(_.logger.log("adjusting start position by "+I+" to match buffer start"),w+=I,this.startPosition=w),this.log("seek to target start position "+w+" from current time "+g),v.currentTime=w}},O._getAudioCodec=function(v){var g=this.config.defaultAudioCodec||v.audioCodec;return this.audioCodecSwap&&g&&(this.log("Swapping audio codec"),g.indexOf("mp4a.40.5")!==-1?g="mp4a.40.2":g="mp4a.40.5"),g},O._loadBitrateTestFrag=function(v){var g=this;this._doFragLoad(v).then(function(w){var M=g.hls;if(!w||M.nextLoadLevel||g.fragContextChanged(v))return;g.fragLoadError=0,g.state=u.State.IDLE,g.startFragRequested=!1,g.bitrateTest=!1;var N=v.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),M.trigger(C.Events.FRAG_LOADED,w)})},O._handleTransmuxComplete=function(v){var g,w="main",M=this.hls,N=v.remuxResult,I=v.chunkMeta,G=this.getCurrentContext(I);if(!G){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 z=G.frag,H=G.part,K=G.level,U=N.video,B=N.text,V=N.id3,ae=N.initSegment,he=this.altAudio?void 0:N.audio;if(this.fragContextChanged(z))return;if(this.state=u.State.PARSING,ae){ae.tracks&&(this._bufferInitSegment(K,ae.tracks,z,I),M.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:w,tracks:ae.tracks}));var pe=ae.initPTS,Re=ae.timescale;Object(D.isFiniteNumber)(pe)&&(this.initPTS[z.cc]=pe,M.trigger(C.Events.INIT_PTS_FOUND,{frag:z,id:w,initPTS:pe,timescale:Re}))}if(U&&N.independent!==!1){if(K.details){var ke=U.startPTS,ve=U.endPTS,Te=U.startDTS,be=U.endDTS;if(H)H.elementaryStreams[U.type]={startPTS:ke,endPTS:ve,startDTS:Te,endDTS:be};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ue=this.getLoadPosition()+this.config.maxBufferHole;if(ue<ke){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,ve,z.start,be,!0)}z.setElementaryStreamInfo(U.type,ke,ve,Te,be),this.bufferFragmentData(U,z,H,I)}}else if(N.independent===!1){this.backtrack(z);return}if(he){var le=he.startPTS,re=he.endPTS,fe=he.startDTS,q=he.endDTS;H&&(H.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:re,startDTS:fe,endDTS:q}),z.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,le,re,fe,q),this.bufferFragmentData(he,z,H,I)}if(V!=null&&(g=V.samples)!==null&&g!==void 0&&g.length){var ee={frag:z,id:w,samples:V.samples};M.trigger(C.Events.FRAG_PARSING_METADATA,ee)}if(B){var Ce={frag:z,id:w,samples:B.samples};M.trigger(C.Events.FRAG_PARSING_USERDATA,Ce)}},O._bufferInitSegment=function(v,g,w,M){var N=this;if(this.state!==u.State.PARSING)return;this.audioOnly=!!g.audio&&!g.video,this.altAudio&&!this.audioOnly&&delete g.audio;var I=g.audio,G=g.video,z=g.audiovideo;if(I){var H=v.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),I.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(H="mp4a.40.5")),K.indexOf("android")!==-1&&I.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),v.audioCodec&&v.audioCodec!==H&&this.log('Swapping manifest audio codec "'+v.audioCodec+'" for "'+H+'"'),I.levelCodec=H,I.id="main",this.log("Init audio buffer, container:"+I.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(v.audioCodec||"")+"/"+I.codec+"]")}G&&(G.levelCodec=v.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(v.videoCodec||"")+"/"+G.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(v.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,g),Object.keys(g).forEach(function(U){var B=g[U],V=B.initSegment;V!=null&&V.byteLength&&N.hls.trigger(C.Events.BUFFER_APPENDING,{type:U,data:V,frag:w,part:null,chunkMeta:M,parent:w.type})}),this.tick()},O.backtrack=function(v){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(v);var g=this.fragmentTracker.backtrack(v);this.fragPrevious=null,this.nextLoadPosition=v.start,g?this.resetFragmentLoading(v):this.state=u.State.BACKTRACKING},O.checkFragmentChanged=function(){var v=this.media,g=null;if(v&&v.readyState>1&&v.seeking===!1){var w=v.currentTime;if(E.BufferHelper.isBuffered(v,w)?g=this.getAppendedFrag(w):E.BufferHelper.isBuffered(v,w+.1)&&(g=this.getAppendedFrag(w+.1)),g){var M=this.fragPlaying,N=g.level;(!M||g.sn!==M.sn||M.level!==N||g.urlId!==M.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:g}),(!M||M.level!==N)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=g)}}},i(k,[{key:"nextLevel",get:function(){var v=this.nextBufferedFrag;return v?v.level:-1}},{key:"currentLevel",get:function(){var v=this.media;if(v){var g=this.getAppendedFrag(v.currentTime);if(g)return g.level}return-1}},{key:"nextBufferedFrag",get:function(){var v=this.media;if(v){var g=this.getAppendedFrag(v.currentTime);return this.followingBufferedFrag(g)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(u.default)},"./src/controller/subtitle-stream-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"SubtitleStreamController",function(){return a});var D=T("./src/events.ts"),u=T("./src/utils/logger.ts"),p=T("./src/utils/buffer-helper.ts"),C=T("./src/controller/fragment-finders.ts"),E=T("./src/utils/discontinuities.ts"),l=T("./src/controller/level-helper.ts"),s=T("./src/controller/fragment-tracker.ts"),n=T("./src/controller/base-stream-controller.ts"),h=T("./src/types/loader.ts"),f=T("./src/types/level.ts");function c(t,S){for(var x=0;x<S.length;x++){var o=S[x];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function m(t,S,x){return S&&c(t.prototype,S),x&&c(t,x),t}function _(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,y(t,S)}function y(t,S){return y=Object.setPrototypeOf||function(o,k){return o.__proto__=k,o},y(t,S)}var i=500,a=function(t){_(S,t);function S(o,k){var O;return O=t.call(this,o,k,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var x=S.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var k=this.hls;k.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.on(D.Events.ERROR,this.onError,this),k.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.on(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.on(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x._unregisterListeners=function(){var k=this.hls;k.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.off(D.Events.ERROR,this.onError,this),k.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.off(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.off(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(i),this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},x.onLevelLoaded=function(k,O){this.mainDetails=O.details},x.onSubtitleFragProcessed=function(k,O){var b=O.frag,v=O.success;if(this.fragPrevious=b,this.state=n.State.IDLE,!v)return;var g=this.tracksBuffered[this.currentTrackId];if(!g)return;for(var w,M=b.start,N=0;N<g.length;N++)if(M>=g[N].start&&M<=g[N].end){w=g[N];break}var I=b.start+b.duration;w?w.end=I:(w={start:M,end:I},g.push(w)),this.fragmentTracker.fragBuffered(b)},x.onBufferFlushing=function(k,O){var b=O.startOffset,v=O.endOffset;if(b===0&&v!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,w=this.levels;if(!w.length||!w[g]||!w[g].details)return;var M=w[g].details,N=M.targetduration,I=v-N;if(I<=0)return;O.endOffsetSubtitles=Math.max(0,I),this.tracksBuffered.forEach(function(G){for(var z=0;z<G.length;){if(G[z].end<=I){G.shift();continue}else if(G[z].start<I)G[z].start=I;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(b,I,h.PlaylistLevelType.SUBTITLE)}},x.onError=function(k,O){var b,v=O.frag;if(!v||v.type!==h.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},x.onSubtitleTracksUpdated=function(k,O){var b=this,v=O.subtitleTracks;this.tracksBuffered=[],this.levels=v.map(function(g){return new f.Level(g)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(g){b.tracksBuffered[g.id]=[]}),this.mediaBuffer=null},x.onSubtitleTrackSwitch=function(k,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(i)},x.onSubtitleTrackLoaded=function(k,O){var b,v=O.details,g=O.id,w=this.currentTrackId,M=this.levels;if(!M.length)return;var N=M[w];if(g>=M.length||g!==w||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,v.live||(b=N.details)!==null&&b!==void 0&&b.live){var I=this.mainDetails;if(v.deltaUpdateFailed||!I)return;var G=I.fragments[0];if(!N.details)v.hasProgramDateTime&&I.hasProgramDateTime?Object(E.alignMediaPlaylistByPDT)(v,I):G&&Object(l.addSliding)(v,G.start);else{var z=this.alignPlaylists(v,N.details);z===0&&G&&Object(l.addSliding)(v,G.start)}}if(N.details=v,this.levelLastLoaded=g,this.tick(),v.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var H=Object(C.findFragmentByPTS)(null,v.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},x._handleFragmentLoadComplete=function(k){var O=k.frag,b=k.payload,v=O.decryptdata,g=this.hls;if(this.fragContextChanged(O))return;if(b&&b.byteLength>0&&v&&v.key&&v.iv&&v.method==="AES-128"){var w=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),v.key.buffer,v.iv.buffer).then(function(M){var N=performance.now();g.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:w,tdecrypt:N}})})}},x.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var k,O=this.currentTrackId,b=this.levels;if(!b.length||!b[O]||!b[O].details)return;var v=b[O].details,g=v.targetduration,w=this.config,M=this.media,N=p.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-g,w.maxBufferHole),I=N.end,G=N.len,z=this.getMaxBufferLength()+g;if(G>z)return;console.assert(v,"Subtitle track details are defined on idle subtitle stream controller tick");var H=v.fragments,K=H.length,U=v.edge,B,V=this.fragPrevious;if(I<U){var ae=w.maxFragLookUpTolerance;V&&v.hasProgramDateTime&&(B=Object(C.findFragmentByPDT)(H,V.endProgramDateTime,ae)),B||(B=Object(C.findFragmentByPTS)(V,H,I,ae),!B&&V&&V.start<H[0].start&&(B=H[0]))}else B=H[K-1];(k=B)!==null&&k!==void 0&&k.encrypted?(u.logger.log("Loading key for "+B.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(D.Events.KEY_LOADING,{frag:B})):B&&this.fragmentTracker.getState(B)===s.FragmentState.NOT_LOADED&&this.loadFragment(B,v,I)}},x.loadFragment=function(k,O,b){this.fragCurrent=k,t.prototype.loadFragment.call(this,k,O,b)},m(S,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),S}(n.default)},"./src/controller/subtitle-track-controller.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/events.ts"),u=T("./src/utils/texttrack-utils.ts"),p=T("./src/controller/base-playlist-controller.ts"),C=T("./src/types/loader.ts");function E(c,m){for(var _=0;_<m.length;_++){var y=m[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(c,y.key,y)}}function l(c,m,_){return m&&E(c.prototype,m),_&&E(c,_),c}function s(c,m){c.prototype=Object.create(m.prototype),c.prototype.constructor=c,n(c,m)}function n(c,m){return n=Object.setPrototypeOf||function(y,i){return y.__proto__=i,y},n(c,m)}var h=function(c){s(m,c);function m(y){var i;return i=c.call(this,y,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var _=m.prototype;return _.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},_.registerListeners=function(){var i=this.hls;i.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(D.Events.ERROR,this.onError,this)},_.unregisterListeners=function(){var i=this.hls;i.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(D.Events.ERROR,this.onError,this)},_.onMediaAttached=function(i,a){if(this.media=a.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)},_.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},_.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 i=f(this.media.textTracks);i.forEach(function(a){Object(u.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},_.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},_.onManifestParsed=function(i,a){this.tracks=a.subtitleTracks},_.onSubtitleTrackLoaded=function(i,a){var t=a.id,S=a.details,x=this.trackId,o=this.tracksInGroup[x];if(!o){this.warn("Invalid subtitle track id "+t);return}var k=o.details;o.details=a.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,a,k))},_.onLevelLoading=function(i,a){this.switchLevel(a.level)},_.onLevelSwitching=function(i,a){this.switchLevel(a.level)},_.switchLevel=function(i){var a=this.hls.levels[i];if(!(a!=null&&a.textGroupIds))return;var t=a.textGroupIds[a.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,x=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=x;var o=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var k={subtitleTracks:x};this.log("Updating subtitle tracks, "+x.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,k),o!==-1&&this.setSubtitleTrack(o,S)}},_.findTrackId=function(i){for(var a=this.tracksInGroup,t=0;t<a.length;t++){var S=a[t];if((!this.selectDefaultTrack||S.default)&&(!i||i===S.name))return S.id}return-1},_.onError=function(i,a){if(c.prototype.onError.call(this,i,a),a.fatal||!a.context)return;a.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},_.loadPlaylist=function(i){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var t=a.id,S=a.groupId,x=a.url;if(i)try{x=i.addDirectives(x)}catch(o){this.warn("Could not construct new URL with HLS Delivery Directives: "+o)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADING,{url:x,id:t,groupId:S,deliveryDirectives:i||null})}},_.toggleTrackModes=function(i){var a=this,t=this.media,S=this.subtitleDisplay,x=this.trackId;if(!t)return;var o=f(t.textTracks),k=o.filter(function(v){return v.groupId===a.groupId});if(i===-1)[].slice.call(o).forEach(function(v){v.mode="disabled"});else{var O=k[x];O&&(O.mode="disabled")}var b=k[i];b&&(b.mode=S?"showing":"hidden")},_.setSubtitleTrack=function(i,a){var t,S=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=S[i])!==null&&t!==void 0&&t.details)||i<-1||i>=S.length)return;this.clearTimer();var x=S[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,x){var o=x.id,k=x.groupId,O=k===void 0?"":k,b=x.name,v=x.type,g=x.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:O,name:b,type:v,url:g});var w=this.switchParams(x.url,a==null?void 0:a.details);this.loadPlaylist(w)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:i})},_.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,a=f(this.media.textTracks),t=0;t<a.length;t++)if(a[t].mode==="hidden")i=t;else if(a[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},l(m,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,a)}}]),m}(p.default);function f(c){for(var m=[],_=0;_<c.length;_++){var y=c[_];y.kind==="subtitles"&&y.label&&m.push(c[_])}return m}d.default=h},"./src/controller/timeline-controller.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"TimelineController",function(){return f});var D=T("./src/polyfills/number.ts"),u=T("./src/events.ts"),p=T("./src/utils/cea-608-parser.ts"),C=T("./src/utils/output-filter.ts"),E=T("./src/utils/webvtt-parser.ts"),l=T("./src/utils/texttrack-utils.ts"),s=T("./src/utils/imsc1-ttml-parser.ts"),n=T("./src/types/loader.ts"),h=T("./src/utils/logger.ts"),f=function(){function y(a){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=_(),this.captionsProperties=void 0,this.hls=a,this.config=a.config,this.Cues=a.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 C.default(this,"textTrack1"),S=new C.default(this,"textTrack2"),x=new C.default(this,"textTrack3"),o=new C.default(this,"textTrack4");this.cea608Parser1=new p.default(1,t,S),this.cea608Parser2=new p.default(3,x,o)}a.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(u.Events.FRAG_LOADING,this.onFragLoading,this),a.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=y.prototype;return i.destroy=function(){var t=this.hls;t.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(u.Events.FRAG_LOADING,this.onFragLoading,this),t.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,S,x,o,k){for(var O=!1,b=k.length;b--;){var v=k[b],g=m(v[0],v[1],S,x);if(g>=0&&(v[0]=Math.min(v[0],S),v[1]=Math.max(v[1],x),O=!0,g/(x-S)>.5))return}if(O||k.push([S,x]),this.config.renderTextTracksNatively){var w=this.captionsTracks[t];this.Cues.newCue(w,S,x,o)}else{var M=this.Cues.newCue(null,S,x,o);this.hls.trigger(u.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},i.onInitPtsFound=function(t,S){var x=this,o=S.frag,k=S.id,O=S.initPTS,b=S.timescale,v=this.unparsedVttFrags;k==="main"&&(this.initPTS[o.cc]=O,this.timescale[o.cc]=b),v.length&&(this.unparsedVttFrags=[],v.forEach(function(g){x.onFragLoaded(u.Events.FRAG_LOADED,g)}))},i.getExistingTrack=function(t){var S=this.media;if(S)for(var x=0;x<S.textTracks.length;x++){var o=S.textTracks[x];if(o[t])return o}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var S=this.captionsProperties,x=this.captionsTracks,o=this.media,k=S[t],O=k.label,b=k.languageCode,v=this.getExistingTrack(t);if(v)x[t]=v,Object(l.clearCurrentCues)(x[t]),Object(l.sendAddTrackEvent)(x[t],o);else{var g=this.createTextTrack("captions",O,b);g&&(g[t]=!0,x[t]=g)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var S=this.captionsProperties[t];if(!S)return;var x=S.label,o={_id:t,label:x,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[t]=o,this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[o]})},i.createTextTrack=function(t,S,x){var o=this.media;return o?o.addTextTrack(t,S,x):void 0},i.onMediaAttaching=function(t,S){this.media=S.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(S){Object(l.clearCurrentCues)(t[S]),delete t[S]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=_(),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())},i._cleanTracks=function(){var t=this.media;if(!t)return;var S=t.textTracks;if(S)for(var x=0;x<S.length;x++)Object(l.clearCurrentCues)(S[x])},i.onSubtitleTracksUpdated=function(t,S){var x=this;this.textTracks=[];var o=S.subtitleTracks||[],k=o.some(function(g){return g.textCodec===s.IMSC1_CODEC});if(this.config.enableWebVTT||k&&this.config.enableIMSC1){var O=this.tracks&&o&&this.tracks.length===o.length;if(this.tracks=o||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(g,w){var M;if(w<b.length){for(var N=null,I=0;I<b.length;I++)if(c(b[I],g)){N=b[I];break}N&&(M=N)}M?Object(l.clearCurrentCues)(M):(M=x.createTextTrack("subtitles",g.name,g.lang),M&&(M.mode="disabled")),M&&(M.groupId=g.groupId,x.textTracks.push(M))})}else if(!O&&this.tracks&&this.tracks.length){var v=this.tracks.map(function(g){return{label:g.name,kind:g.type.toLowerCase(),default:g.default,subtitleTrack:g}});this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:v})}}},i.onManifestLoaded=function(t,S){var x=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(o){var k=/(?:CC|SERVICE)([1-4])/.exec(o.instreamId);if(!k)return;var O="textTrack"+k[1],b=x.captionsProperties[O];if(!b)return;b.label=o.name,o.lang&&(b.languageCode=o.lang),b.media=o})},i.onFragLoading=function(t,S){var x=this.cea608Parser1,o=this.cea608Parser2,k=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(x&&o))return;if(S.frag.type===n.PlaylistLevelType.MAIN){var b,v,g=S.frag.sn,w=(b=S==null||((v=S.part)===null||v===void 0)?void 0:v.index)!=null?b:-1;g===k+1||g===k&&w===O+1||(x.reset(),o.reset()),this.lastSn=g,this.lastPartIndex=w}},i.onFragLoaded=function(t,S){var x=S.frag,o=S.payload,k=this.initPTS,O=this.unparsedVttFrags;if(x.type===n.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(D.isFiniteNumber)(k[x.cc])){O.push(S),k.length&&this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Missing initial subtitle PTS")});return}var b=x.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var v=this.tracks[x.level],g=this.vttCCs;g[x.cc]||(g[x.cc]={start:x.start,prevCC:this.prevCC,new:!0},this.prevCC=x.cc),v&&v.textCodec===s.IMSC1_CODEC?this._parseIMSC1(x,o):this._parseVTTs(x,o,g)}}else this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,S){var x=this,o=this.hls;Object(s.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(k){x._appendCues(k,t.level),o.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(k){h.logger.log("Failed to parse IMSC1: "+k),o.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:k})})},i._parseVTTs=function(t,S,x){var o=this,k=this.hls;Object(E.parseWebVTT)(S,this.initPTS[t.cc],this.timescale[t.cc],x,t.cc,t.start,function(O){o._appendCues(O,t.level),k.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){o._fallbackToIMSC1(t,S),h.logger.log("Failed to parse VTT cue: "+O),k.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},i._fallbackToIMSC1=function(t,S){var x=this,o=this.tracks[t.level];o.textCodec||Object(s.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(){o.textCodec=s.IMSC1_CODEC,x._parseIMSC1(t,S)},function(){o.textCodec="wvtt"})},i._appendCues=function(t,S){var x=this.hls;if(this.config.renderTextTracksNatively){var o=this.textTracks[S];if(o.mode==="disabled")return;t.forEach(function(b){return Object(l.addCueToTrack)(o,b)})}else{var k=this.tracks[S],O=k.default?"default":"subtitles"+S;x.trigger(u.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},i.onFragDecrypted=function(t,S){var x=S.frag;if(x.type===n.PlaylistLevelType.SUBTITLE){if(!Object(D.isFiniteNumber)(this.initPTS[x.cc])){this.unparsedVttFrags.push(S);return}this.onFragLoaded(u.Events.FRAG_LOADED,S)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,S){var x=this.cea608Parser1,o=this.cea608Parser2;if(!this.enabled||!(x&&o))return;for(var k=0;k<S.samples.length;k++){var O=S.samples[k].bytes;if(O){var b=this.extractCea608Data(O);x.addData(S.samples[k].pts,b[0]),o.addData(S.samples[k].pts,b[1])}}},i.onBufferFlushing=function(t,S){var x=S.startOffset,o=S.endOffset,k=S.endOffsetSubtitles,O=S.type,b=this.media;if(!b||b.currentTime<o)return;if(!O||O==="video"){var v=this.captionsTracks;Object.keys(v).forEach(function(w){return Object(l.removeCuesInRange)(v[w],x,o)})}if(this.config.renderTextTracksNatively&&(x===0&&k!==void 0)){var g=this.textTracks;Object.keys(g).forEach(function(w){return Object(l.removeCuesInRange)(g[w],x,k)})}},i.extractCea608Data=function(t){for(var S=t[0]&31,x=2,o=[[],[]],k=0;k<S;k++){var O=t[x++],b=127&t[x++],v=127&t[x++],g=(4&O)!==0,w=3&O;if(b===0&&v===0)continue;g&&((w===0||w===1)&&(o[w].push(b),o[w].push(v)))}return o},y}();function c(y,i){return y&&y.label===i.name&&!(y.textTrack1||y.textTrack2)}function m(y,i,a,t){return Math.min(i,t)-Math.max(y,a)}function _(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function u(C,E){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=E}var p=u.prototype;return p.decrypt=function(E,l){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},l,E)},u}()},"./src/crypt/aes-decryptor.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"removePadding",function(){return u}),T.d(d,"default",function(){return p});var D=T("./src/utils/typed-array.ts");function u(C){var E=C.byteLength,l=E&&new DataView(C.buffer).getUint8(E-1);return l?Object(D.sliceUint8)(C,0,E-l):C}var p=function(){function C(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var E=C.prototype;return E.uint8ArrayToUint32Array_=function(s){for(var n=new DataView(s),h=new Uint32Array(4),f=0;f<4;f++)h[f]=n.getUint32(f*4);return h},E.initTable=function(){var s=this.sBox,n=this.invSBox,h=this.subMix,f=h[0],c=h[1],m=h[2],_=h[3],y=this.invSubMix,i=y[0],a=y[1],t=y[2],S=y[3],x=new Uint32Array(256),o=0,k=0,O=0;for(O=0;O<256;O++)O<128?x[O]=O<<1:x[O]=O<<1^283;for(O=0;O<256;O++){var b=k^k<<1^k<<2^k<<3^k<<4;b=b>>>8^b&255^99,s[o]=b,n[b]=o;var v=x[o],g=x[v],w=x[g],M=x[b]*257^b*16843008;f[o]=M<<24|M>>>8,c[o]=M<<16|M>>>16,m[o]=M<<8|M>>>24,_[o]=M,M=w*16843009^g*65537^v*257^o*16843008,i[b]=M<<24|M>>>8,a[b]=M<<16|M>>>16,t[b]=M<<8|M>>>24,S[b]=M,o?(o=v^x[x[x[w^v]]],k^=x[x[k]]):o=k=1}},E.expandKey=function(s){for(var n=this.uint8ArrayToUint32Array_(s),h=!0,f=0;f<n.length&&h;)h=n[f]===this.key[f],f++;if(h)return;this.key=n;var c=this.keySize=n.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var m=this.ksRows=(c+6+1)*4,_,y,i=this.keySchedule=new Uint32Array(m),a=this.invKeySchedule=new Uint32Array(m),t=this.sBox,S=this.rcon,x=this.invSubMix,o=x[0],k=x[1],O=x[2],b=x[3],v,g;for(_=0;_<m;_++){if(_<c){v=i[_]=n[_];continue}g=v,_%c===0?(g=g<<8|g>>>24,g=t[g>>>24]<<24|t[g>>>16&255]<<16|t[g>>>8&255]<<8|t[g&255],g^=S[_/c|0]<<24):c>6&&_%c===4&&(g=t[g>>>24]<<24|t[g>>>16&255]<<16|t[g>>>8&255]<<8|t[g&255]),i[_]=v=(i[_-c]^g)>>>0}for(y=0;y<m;y++)_=m-y,y&3?g=i[_]:g=i[_-4],y<4||_<=4?a[y]=g:a[y]=o[t[g>>>24]]^k[t[g>>>16&255]]^O[t[g>>>8&255]]^b[t[g&255]],a[y]=a[y]>>>0},E.networkToHostOrderSwap=function(s){return s<<24|(s&65280)<<8|(s&16711680)>>8|s>>>24},E.decrypt=function(s,n,h){for(var f=this.keySize+6,c=this.invKeySchedule,m=this.invSBox,_=this.invSubMix,y=_[0],i=_[1],a=_[2],t=_[3],S=this.uint8ArrayToUint32Array_(h),x=S[0],o=S[1],k=S[2],O=S[3],b=new Int32Array(s),v=new Int32Array(b.length),g,w,M,N,I,G,z,H,K,U,B,V,ae,he,pe=this.networkToHostOrderSwap;n<b.length;){for(K=pe(b[n]),U=pe(b[n+1]),B=pe(b[n+2]),V=pe(b[n+3]),I=K^c[0],G=V^c[1],z=B^c[2],H=U^c[3],ae=4,he=1;he<f;he++)g=y[I>>>24]^i[G>>16&255]^a[z>>8&255]^t[H&255]^c[ae],w=y[G>>>24]^i[z>>16&255]^a[H>>8&255]^t[I&255]^c[ae+1],M=y[z>>>24]^i[H>>16&255]^a[I>>8&255]^t[G&255]^c[ae+2],N=y[H>>>24]^i[I>>16&255]^a[G>>8&255]^t[z&255]^c[ae+3],I=g,G=w,z=M,H=N,ae=ae+4;g=m[I>>>24]<<24^m[G>>16&255]<<16^m[z>>8&255]<<8^m[H&255]^c[ae],w=m[G>>>24]<<24^m[z>>16&255]<<16^m[H>>8&255]<<8^m[I&255]^c[ae+1],M=m[z>>>24]<<24^m[H>>16&255]<<16^m[I>>8&255]<<8^m[G&255]^c[ae+2],N=m[H>>>24]<<24^m[I>>16&255]<<16^m[G>>8&255]<<8^m[z&255]^c[ae+3],v[n]=pe(g^x),v[n+1]=pe(N^o),v[n+2]=pe(M^k),v[n+3]=pe(w^O),x=K,o=U,k=B,O=V,n=n+4}return v.buffer},C}()},"./src/crypt/decrypter.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return n});var D=T("./src/crypt/aes-crypto.ts"),u=T("./src/crypt/fast-aes-key.ts"),p=T("./src/crypt/aes-decryptor.ts"),C=T("./src/utils/logger.ts"),E=T("./src/utils/mp4-tools.ts"),l=T("./src/utils/typed-array.ts"),s=16,n=function(){function h(c,m,_){var y=_===void 0?{}:_,i=y.removePKCS7Padding,a=i===void 0?!0:i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=m,this.removePKCS7Padding=a,a)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(S){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var f=h.prototype;return f.destroy=function(){this.observer=null},f.isSync=function(){return this.config.enableSoftwareAES},f.flush=function(){var m=this.currentResult;if(!m){this.reset();return}var _=new Uint8Array(m);return this.reset(),this.removePKCS7Padding?Object(p.removePadding)(_):_},f.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},f.decrypt=function(m,_,y,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(m),_,y);var a=this.flush();a&&i(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(m),_,y).then(i)},f.softwareDecrypt=function(m,_,y){var i=this.currentIV,a=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(m=Object(E.appendUint8Array)(t,m),this.remainderData=null);var S=this.getValidChunk(m);if(!S.length)return null;i&&(y=i);var x=this.softwareDecrypter;x||(x=this.softwareDecrypter=new p.default),x.expandKey(_);var o=a;return this.currentResult=x.decrypt(S.buffer,0,y),this.currentIV=Object(l.sliceUint8)(S,-16).buffer,o||null},f.webCryptoDecrypt=function(m,_,y){var i=this,a=this.subtle;return(this.key!==_||!this.fastAesKey)&&(this.key=_,this.fastAesKey=new u.default(a,_)),this.fastAesKey.expandKey().then(function(t){if(!a)return Promise.reject(new Error("web crypto not initialized"));var S=new D.default(a,y);return S.decrypt(m.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,m,_,y)})},f.onWebCryptoError=function(m,_,y,i){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",m),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(_,y,i)},f.getValidChunk=function(m){var _=m,y=m.length-m.length%s;return y!==m.length&&(_=Object(l.sliceUint8)(m,0,y),this.remainderData=Object(l.sliceUint8)(m,y)),_},f.logOnce=function(m){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+m),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function u(C,E){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=E}var p=u.prototype;return p.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},u}()},"./src/demux/aacdemuxer.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/demux/base-audio-demuxer.ts"),u=T("./src/demux/adts.ts"),p=T("./src/utils/logger.ts"),C=T("./src/demux/id3.ts");function E(n,h){n.prototype=Object.create(h.prototype),n.prototype.constructor=n,l(n,h)}function l(n,h){return l=Object.setPrototypeOf||function(c,m){return c.__proto__=m,c},l(n,h)}var s=function(n){E(h,n);function h(c,m){var _;return _=n.call(this)||this,_.observer=void 0,_.config=void 0,_.observer=c,_.config=m,_}var f=h.prototype;return f.resetInitSegment=function(m,_,y){n.prototype.resetInitSegment.call(this,m,_,y),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:m,duration:y,inputTimeScale:9e4,dropped:0}},h.probe=function(m){if(!m)return!1;for(var _=C.getID3Data(m,0)||[],y=_.length,i=m.length;y<i;y++)if(u.probe(m,y))return p.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(m,_){return u.canParse(m,_)},f.appendFrame=function(m,_,y){u.initTrackConfig(m,this.observer,_,y,m.manifestCodec);var i=u.appendFrame(m,_,y,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},h}(D.default);s.minProbeByteLength=9,d.default=s},"./src/demux/adts.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"getAudioConfig",function(){return C}),T.d(d,"isHeaderPattern",function(){return E}),T.d(d,"getHeaderLength",function(){return l}),T.d(d,"getFullFrameLength",function(){return s}),T.d(d,"canGetFrameLength",function(){return n}),T.d(d,"isHeader",function(){return h}),T.d(d,"canParse",function(){return f}),T.d(d,"probe",function(){return c}),T.d(d,"initTrackConfig",function(){return m}),T.d(d,"getFrameDuration",function(){return _}),T.d(d,"parseFrameHeader",function(){return y}),T.d(d,"appendFrame",function(){return i});var D=T("./src/utils/logger.ts"),u=T("./src/errors.ts"),p=T("./src/events.ts");function C(a,t,S,x){var o,k,O,b,v=navigator.userAgent.toLowerCase(),g=x,w=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=((t[S+2]&192)>>>6)+1;var M=(t[S+2]&60)>>>2;if(M>w.length-1){a.trigger(p.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[S+2]&1)<<2,O|=(t[S+3]&192)>>>6,D.logger.log("manifest codec:"+x+", ADTS type:"+o+", samplingIndex:"+M),/firefox/i.test(v)?M>=6?(o=5,b=new Array(4),k=M-3):(o=2,b=new Array(2),k=M):v.indexOf("android")!==-1?(o=2,b=new Array(2),k=M):(o=5,b=new Array(4),x&&(x.indexOf("mp4a.40.29")!==-1||x.indexOf("mp4a.40.5")!==-1)||!x&&M>=6?k=M-3:((x&&x.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(v))||!x&&O===1)&&(o=2,b=new Array(2)),k=M)),b[0]=o<<3,b[0]|=(M&14)>>1,b[1]|=(M&1)<<7,b[1]|=O<<3,o===5&&(b[1]|=(k&14)>>1,b[2]=(k&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:w[M],channelCount:O,codec:"mp4a.40."+o,manifestCodec:g}}function E(a,t){return a[t]===255&&(a[t+1]&246)===240}function l(a,t){return a[t+1]&1?7:9}function s(a,t){return(a[t+3]&3)<<11|a[t+4]<<3|(a[t+5]&224)>>>5}function n(a,t){return t+5<a.length}function h(a,t){return t+1<a.length&&E(a,t)}function f(a,t){return n(a,t)&&E(a,t)&&s(a,t)<=a.length-t}function c(a,t){if(h(a,t)){var S=l(a,t);if(t+S>=a.length)return!1;var x=s(a,t);if(x<=S)return!1;var o=t+x;return o===a.length||h(a,o)}return!1}function m(a,t,S,x,o){if(!a.samplerate){var k=C(t,S,x,o);if(!k)return;a.config=k.config,a.samplerate=k.samplerate,a.channelCount=k.channelCount,a.codec=k.codec,a.manifestCodec=k.manifestCodec,D.logger.log("parsed codec:"+a.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function _(a){return 1024*9e4/a}function y(a,t,S,x,o){var k=l(a,t),O=s(a,t);if(O-=k,O>0){var b=S+x*o;return{headerLength:k,frameLength:O,stamp:b}}}function i(a,t,S,x,o){var k=_(a.samplerate),O=y(t,S,x,o,k);if(O){var b=O.frameLength,v=O.headerLength,g=O.stamp,w=v+b,M=Math.max(0,S+w-t.length),N;M?(N=new Uint8Array(w-v),N.set(t.subarray(S+v,t.length),0)):N=t.subarray(S+v,S+w);var I={unit:N,pts:g};return M||a.samples.push(I),{sample:I,length:w,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"initPTSFn",function(){return s});var D=T("./src/polyfills/number.ts"),u=T("./src/demux/id3.ts"),p=T("./src/demux/dummy-demuxed-track.ts"),C=T("./src/utils/mp4-tools.ts"),E=T("./src/utils/typed-array.ts"),l=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=n.prototype;return h.resetInitSegment=function(c,m,_){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(c,m){return!1},h.appendFrame=function(c,m,_){},h.demux=function(c,m){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var _=u.getID3Data(c,0),y=_?_.length:0,i,a,t=this._audioTrack,S=this._id3Track,x=_?u.getTimeStamp(_):void 0,o=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=s(x,m)),_&&_.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:_}),a=this.initPTS;y<o;){if(this.canParse(c,y)){var k=this.appendFrame(t,c,y);k?(this.frameIndex++,a=k.sample.pts,y+=k.length,i=y):y=o}else u.canParse(c,y)?(_=u.getID3Data(c,y),S.samples.push({pts:a,dts:a,data:_}),y+=_.length,i=y):y++;if(y===o&&i!==o){var O=Object(E.sliceUint8)(c,i);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(p.dummyTrack)(),id3Track:S,textTrack:Object(p.dummyTrack)()}},h.demuxSampleAes=function(c,m,_){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(c){var m=this.cachedData;return m&&(this.cachedData=null,this.demux(m,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(p.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(p.dummyTrack)()}},h.destroy=function(){},n}(),s=function(h,f){return Object(D.isFiniteNumber)(h)?h*90:f*9e4};d.default=l},"./src/demux/chunk-cache.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function p(){this.chunks=[],this.dataLength=0}var C=p.prototype;return C.push=function(l){this.chunks.push(l),this.dataLength+=l.length},C.flush=function(){var l=this.chunks,s=this.dataLength,n;if(l.length)l.length===1?n=l[0]:n=u(l,s);else return new Uint8Array(0);return this.reset(),n},C.reset=function(){this.chunks.length=0,this.dataLength=0},p}();function u(p,C){for(var E=new Uint8Array(C),l=0,s=0;s<p.length;s++){var n=p[s];E.set(n,l),l+=n.length}return E}},"./src/demux/dummy-demuxed-track.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"dummyTrack",function(){return D});function D(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/logger.ts"),u=function(){function p(E){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=E,this.bytesAvailable=E.byteLength,this.word=0,this.bitsAvailable=0}var C=p.prototype;return C.loadWord=function(){var l=this.data,s=this.bytesAvailable,n=l.byteLength-s,h=new Uint8Array(4),f=Math.min(4,s);if(f===0)throw new Error("no bytes available");h.set(l.subarray(n,n+f)),this.word=new DataView(h.buffer).getUint32(0),this.bitsAvailable=f*8,this.bytesAvailable-=f},C.skipBits=function(l){var s;this.bitsAvailable>l?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,s=l>>3,l-=s>>3,this.bytesAvailable-=s,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},C.readBits=function(l){var s=Math.min(this.bitsAvailable,l),n=this.word>>>32-s;return l>32&&D.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=s,this.bitsAvailable>0?this.word<<=s:this.bytesAvailable>0&&this.loadWord(),s=l-s,s>0&&this.bitsAvailable?n<<s|this.readBits(s):n},C.skipLZ=function(){var l;for(l=0;l<this.bitsAvailable;++l)if((this.word&2147483648>>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},C.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},C.readBoolean=function(){return this.readBits(1)===1},C.readUByte=function(){return this.readBits(8)},C.readUShort=function(){return this.readBits(16)},C.readUInt=function(){return this.readBits(32)},C.skipScalingList=function(l){for(var s=8,n=8,h,f=0;f<l;f++)n!==0&&(h=this.readEG(),n=(s+h+256)%256),s=n===0?s:n},C.readSPS=function(){var l=0,s=0,n=0,h=0,f,c,m,_=this.readUByte.bind(this),y=this.readBits.bind(this),i=this.readUEG.bind(this),a=this.readBoolean.bind(this),t=this.skipBits.bind(this),S=this.skipEG.bind(this),x=this.skipUEG.bind(this),o=this.skipScalingList.bind(this);_();var k=_();if(y(5),t(3),_(),x(),k===100||k===110||k===122||k===244||k===44||k===83||k===86||k===118||k===128){var O=i();if(O===3&&t(1),x(),x(),t(1),a())for(c=O!==3?8:12,m=0;m<c;m++)a()&&(m<6?o(16):o(64))}x();var b=i();if(b===0)i();else if(b===1)for(t(1),S(),S(),f=i(),m=0;m<f;m++)S();x(),t(1);var v=i(),g=i(),w=y(1);w===0&&t(1),t(1),a()&&(l=i(),s=i(),n=i(),h=i());var M=[1,1];if(a()&&a()){var N=_();switch(N){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:{M=[_()<<8|_(),_()<<8|_()];break}}}return{width:Math.ceil((v+1)*16-l*2-s*2),height:(2-w)*(g+1)*16-(w?2:4)*(n+h),pixelRatio:M}},C.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},p}();d.default=u},"./src/demux/id3.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isHeader",function(){return D}),T.d(d,"isFooter",function(){return u}),T.d(d,"getID3Data",function(){return p}),T.d(d,"canParse",function(){return E}),T.d(d,"getTimeStamp",function(){return l}),T.d(d,"isTimeStampFrame",function(){return s}),T.d(d,"getID3Frames",function(){return h}),T.d(d,"decodeFrame",function(){return f}),T.d(d,"utf8ArrayToStr",function(){return i}),T.d(d,"testables",function(){return a});var D=function(o,k){return k+10<=o.length&&(o[k]===73&&o[k+1]===68&&o[k+2]===51&&(o[k+3]<255&&o[k+4]<255&&(o[k+6]<128&&o[k+7]<128&&o[k+8]<128&&o[k+9]<128)))},u=function(o,k){return k+10<=o.length&&(o[k]===51&&o[k+1]===68&&o[k+2]===73&&(o[k+3]<255&&o[k+4]<255&&(o[k+6]<128&&o[k+7]<128&&o[k+8]<128&&o[k+9]<128)))},p=function(o,k){for(var O=k,b=0;D(o,k);){b+=10;var v=C(o,k+6);b+=v,u(o,k+10)&&(b+=10),k+=b}return b>0?o.subarray(O,O+b):void 0},C=function(o,k){var O=0;return O=(o[k]&127)<<21,O|=(o[k+1]&127)<<14,O|=(o[k+2]&127)<<7,O|=o[k+3]&127,O},E=function(o,k){return D(o,k)&&C(o,k+6)+10<=o.length-k},l=function(o){for(var k=h(o),O=0;O<k.length;O++){var b=k[O];if(s(b))return y(b)}return},s=function(o){return o&&o.key==="PRIV"&&o.info==="com.apple.streaming.transportStreamTimestamp"},n=function(o){var k=String.fromCharCode(o[0],o[1],o[2],o[3]),O=C(o,4),b=10;return{type:k,size:O,data:o.subarray(b,b+O)}},h=function(o){for(var k=0,O=[];D(o,k);){var b=C(o,k+6);k+=10;for(var v=k+b;k+8<v;){var g=n(o.subarray(k)),w=f(g);w&&O.push(w),k+=g.size+10}u(o,k)&&(k+=10)}return O},f=function(o){return o.type==="PRIV"?c(o):o.type[0]==="W"?_(o):m(o)},c=function(o){if(o.size<2)return;var k=i(o.data,!0),O=new Uint8Array(o.data.subarray(k.length+1));return{key:o.type,info:k,data:O.buffer}},m=function(o){if(o.size<2)return;if(o.type==="TXXX"){var k=1,O=i(o.data.subarray(k),!0);k+=O.length+1;var b=i(o.data.subarray(k));return{key:o.type,info:O,data:b}}var v=i(o.data.subarray(1));return{key:o.type,data:v}},_=function(o){if(o.type==="WXXX"){if(o.size<2)return;var k=1,O=i(o.data.subarray(k),!0);k+=O.length+1;var b=i(o.data.subarray(k));return{key:o.type,info:O,data:b}}var v=i(o.data);return{key:o.type,data:v}},y=function(o){if(o.data.byteLength===8){var k=new Uint8Array(o.data),O=k[3]&1,b=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return b/=45,O&&(b+=4772185884e-2),Math.round(b)}return},i=function(o,k){k===void 0&&(k=!1);var O=S();if(O){var b=O.decode(o);if(k){var v=b.indexOf("\0");return v!==-1?b.substring(0,v):b}return b.replace(/\0/g,"")}for(var g=o.length,w,M,N,I="",G=0;G<g;){if(w=o[G++],w===0&&k)return I;if(w===0||w===3)continue;switch(w>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:I+=String.fromCharCode(w);break;case 12:case 13:M=o[G++],I+=String.fromCharCode((w&31)<<6|M&63);break;case 14:M=o[G++],N=o[G++],I+=String.fromCharCode((w&15)<<12|(M&63)<<6|(N&63)<<0);break;default:}}return I},a={decodeTextFrame:m},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/demux/base-audio-demuxer.ts"),u=T("./src/demux/id3.ts"),p=T("./src/utils/logger.ts"),C=T("./src/demux/mpegaudio.ts");function E(n,h){n.prototype=Object.create(h.prototype),n.prototype.constructor=n,l(n,h)}function l(n,h){return l=Object.setPrototypeOf||function(c,m){return c.__proto__=m,c},l(n,h)}var s=function(n){E(h,n);function h(){return n.apply(this,arguments)||this}var f=h.prototype;return f.resetInitSegment=function(m,_,y){n.prototype.resetInitSegment.call(this,m,_,y),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:m,duration:y,inputTimeScale:9e4,dropped:0}},h.probe=function(m){if(!m)return!1;for(var _=u.getID3Data(m,0)||[],y=_.length,i=m.length;y<i;y++)if(C.probe(m,y))return p.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(m,_){return C.canParse(m,_)},f.appendFrame=function(m,_,y){return this.initPTS===null?void 0:C.appendFrame(m,_,y,this.initPTS,this.frameIndex)},h}(D.default);s.minProbeByteLength=4,d.default=s},"./src/demux/mp4demuxer.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/mp4-tools.ts"),u=T("./src/demux/dummy-demuxed-track.ts"),p=function(){function C(l,s){this.remainderData=null,this.config=void 0,this.config=s}var E=C.prototype;return E.resetTimeStamp=function(){},E.resetInitSegment=function(){},E.resetContiguity=function(){},C.probe=function(s){return Object(D.findBox)({data:s,start:0,end:Math.min(s.length,16384)},["moof"]).length>0},E.demux=function(s){var n=s,h=Object(u.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(D.appendUint8Array)(this.remainderData,s));var f=Object(D.segmentValidRange)(n);this.remainderData=f.remainder,h.samples=f.valid||new Uint8Array}else h.samples=n;return{audioTrack:Object(u.dummyTrack)(),avcTrack:h,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},E.flush=function(){var s=Object(u.dummyTrack)();return s.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(u.dummyTrack)(),avcTrack:s,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},E.demuxSampleAes=function(s,n,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},E.destroy=function(){},C}();p.minProbeByteLength=1024,d.default=p},"./src/demux/mpegaudio.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"appendFrame",function(){return l}),T.d(d,"parseHeader",function(){return s}),T.d(d,"isHeaderPattern",function(){return n}),T.d(d,"isHeader",function(){return h}),T.d(d,"canParse",function(){return f}),T.d(d,"probe",function(){return c});var D=null,u=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],p=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],E=[0,1,1,4];function l(m,_,y,i,a){if(y+24>_.length)return;var t=s(_,y);if(t&&y+t.frameLength<=_.length){var S=t.samplesPerFrame*9e4/t.sampleRate,x=i+a*S,o={unit:_.subarray(y,y+t.frameLength),pts:x,dts:x};return m.config=[],m.channelCount=t.channelCount,m.samplerate=t.sampleRate,m.samples.push(o),{sample:o,length:t.frameLength,missing:0}}}function s(m,_){var y=m[_+1]>>3&3,i=m[_+1]>>1&3,a=m[_+2]>>4&15,t=m[_+2]>>2&3;if(y!==1&&a!==0&&a!==15&&t!==3){var S=m[_+2]>>1&1,x=m[_+3]>>6,o=y===3?3-i:i===3?3:4,k=u[o*14+a-1]*1e3,O=y===3?0:y===2?1:2,b=p[O*3+t],v=x===3?1:2,g=C[y][i],w=E[i],M=g*8*w,N=Math.floor(g*k/b+S)*w;if(D===null){var I=navigator.userAgent||"",G=I.match(/Chrome\/(\d+)/i);D=G?parseInt(G[1]):0}var z=!!D&&D<=87;return z&&i===2&&k>=224e3&&x===0&&(m[_+3]=m[_+3]|128),{sampleRate:b,channelCount:v,frameLength:N,samplesPerFrame:M}}}function n(m,_){return m[_]===255&&(m[_+1]&224)===224&&(m[_+1]&6)!==0}function h(m,_){return _+1<m.length&&n(m,_)}function f(m,_){var y=4;return n(m,_)&&y<=m.length-_}function c(m,_){if(_+1<m.length&&n(m,_)){var y=4,i=s(m,_),a=y;i!=null&&i.frameLength&&(a=i.frameLength);var t=_+a;return t===m.length||h(m,t)}return!1}},"./src/demux/sample-aes.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/crypt/decrypter.ts"),u=T("./src/demux/tsdemuxer.ts"),p=function(){function C(l,s,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new D.default(l,s,{removePKCS7Padding:!1})}var E=C.prototype;return E.decryptBuffer=function(s,n){this.decrypter.decrypt(s,this.keyData.key.buffer,this.keyData.iv.buffer,n)},E.decryptAacSample=function(s,n,h,f){var c=s[n].unit,m=c.subarray(16,c.length-c.length%16),_=m.buffer.slice(m.byteOffset,m.byteOffset+m.length),y=this;this.decryptBuffer(_,function(i){var a=new Uint8Array(i);c.set(a,16),f||y.decryptAacSamples(s,n+1,h)})},E.decryptAacSamples=function(s,n,h){for(;;n++){if(n>=s.length){h();return}if(s[n].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(s,n,h,f),!f)return}},E.getAvcEncryptedData=function(s){for(var n=Math.floor((s.length-48)/160)*16+16,h=new Int8Array(n),f=0,c=32;c<=s.length-16;c+=160,f+=16)h.set(s.subarray(c,c+16),f);return h},E.getAvcDecryptedUnit=function(s,n){for(var h=new Uint8Array(n),f=0,c=32;c<=s.length-16;c+=160,f+=16)s.set(h.subarray(f,f+16),c);return s},E.decryptAvcSample=function(s,n,h,f,c,m){var _=Object(u.discardEPB)(c.data),y=this.getAvcEncryptedData(_),i=this;this.decryptBuffer(y.buffer,function(a){c.data=i.getAvcDecryptedUnit(_,a),m||i.decryptAvcSamples(s,n,h+1,f)})},E.decryptAvcSamples=function(s,n,h,f){if(s instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,h=0){if(n>=s.length){f();return}for(var c=s[n].units;!(h>=c.length);h++){var m=c[h];if(m.data.length<=48||m.type!==1&&m.type!==5)continue;var _=this.decrypter.isSync();if(this.decryptAvcSample(s,n,h,f,m,_),!_)return}}},C}();d.default=p},"./src/demux/transmuxer-interface.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c});var D=T("./node_modules/webworkify-webpack/index.js"),u=T.n(D),p=T("./src/events.ts"),C=T("./src/demux/transmuxer.ts"),E=T("./src/utils/logger.ts"),l=T("./src/errors.ts"),s=T("./src/utils/mediasource-helper.ts"),n=T("./node_modules/eventemitter3/index.js"),h=T.n(n),f=Object(s.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function m(y,i,a,t){var S=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=y,this.id=i,this.onTransmuxComplete=a,this.onFlush=t;var x=y.config,o=function(g,w){w=w||{},w.frag=S.frag,w.id=S.id,y.trigger(g,w)};this.observer=new n.EventEmitter,this.observer.on(p.Events.FRAG_DECRYPTED,o),this.observer.on(p.Events.ERROR,o);var k={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(x.enableWorker&&typeof Worker!="undefined"){E.logger.log("demuxing in webworker");var b;try{b=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(v){y.trigger(p.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(v.message+" ("+v.filename+":"+v.lineno+")")})},b.postMessage({cmd:"init",typeSupported:k,vendor:O,id:i,config:JSON.stringify(x)})}catch(v){E.logger.warn("Error in worker:",v),E.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new C.default(this.observer,k,x,O,i),this.worker=null}}else this.transmuxer=new C.default(this.observer,k,x,O,i)}var _=m.prototype;return _.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},_.push=function(i,a,t,S,x,o,k,O,b,v){var g=this;b.transmuxing.start=self.performance.now();var w=this.transmuxer,M=this.worker,N=o?o.start:x.start,I=x.decryptdata,G=this.frag,z=!(G&&x.cc===G.cc),H=!(G&&b.level===G.level),K=G?b.sn-G.sn:-1,U=this.part?b.part-this.part.index:1,B=!H&&(K===1||K===0&&U===1),V=self.performance.now();(H||K||x.stats.parsing.start===0)&&(x.stats.parsing.start=V),o&&(U||!B)&&(o.stats.parsing.start=V);var ae=new C.TransmuxState(z,B,O,H,N);if(!B||z){E.logger.log("[transmuxer-interface, "+x.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
discontinuity: `+z+`
trackSwitch: `+H+`
contiguous: `+B+`
accurateTimeOffset: `+O+`
timeOffset: `+N);var he=new C.TransmuxConfig(t,S,a,k,v);this.configureTransmuxer(he)}if(this.frag=x,this.part=o,M)M.postMessage({cmd:"demux",data:i,decryptdata:I,chunkMeta:b,state:ae},i instanceof ArrayBuffer?[i]:[]);else if(w){var pe=w.push(i,I,b,ae);Object(C.isPromise)(pe)?pe.then(function(Re){g.handleTransmuxComplete(Re)}):this.handleTransmuxComplete(pe)}},_.flush=function(i){var a=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:i});else if(t){var x=t.flush(i);Object(C.isPromise)(x)?x.then(function(o){a.handleFlushResult(o,i)}):this.handleFlushResult(x,i)}},_.handleFlushResult=function(i,a){var t=this;i.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(a)},_.onWorkerMessage=function(i){var a=i.data,t=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,t.trigger(a.event,a.data);break}}},_.configureTransmuxer=function(i){var a=this.worker,t=this.transmuxer;a?a.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},_.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},m}()},"./src/demux/transmuxer-worker.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return l});var D=T("./src/demux/transmuxer.ts"),u=T("./src/events.ts"),p=T("./src/utils/logger.ts"),C=T("./node_modules/eventemitter3/index.js"),E=T.n(C);function l(c){var m=new C.EventEmitter,_=function(i,a){c.postMessage({event:i,data:a})};m.on(u.Events.FRAG_DECRYPTED,_),m.on(u.Events.ERROR,_),c.addEventListener("message",function(y){var i=y.data;switch(i.cmd){case"init":{var a=JSON.parse(i.config);c.transmuxer=new D.default(m,i.typeSupported,a,i.vendor,i.id),Object(p.enableLogs)(a.debug),_("init",null);break}case"configure":{c.transmuxer.configure(i.config);break}case"demux":{var t=c.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(D.isPromise)(t)?t.then(function(o){s(c,o)}):s(c,t);break}case"flush":{var S=i.chunkMeta,x=c.transmuxer.flush(S);Object(D.isPromise)(x)?x.then(function(o){h(c,o,S)}):h(c,x,S);break}default:break}})}function s(c,m){if(f(m.remuxResult))return;var _=[],y=m.remuxResult,i=y.audio,a=y.video;i&&n(_,i),a&&n(_,a),c.postMessage({event:"transmuxComplete",data:m},_)}function n(c,m){m.data1&&c.push(m.data1.buffer),m.data2&&c.push(m.data2.buffer)}function h(c,m,_){m.forEach(function(y){s(c,y)}),c.postMessage({event:"flush",data:_})}function f(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return a}),T.d(d,"isPromise",function(){return x}),T.d(d,"TransmuxConfig",function(){return o}),T.d(d,"TransmuxState",function(){return k});var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/crypt/decrypter.ts"),C=T("./src/demux/aacdemuxer.ts"),E=T("./src/demux/mp4demuxer.ts"),l=T("./src/demux/tsdemuxer.ts"),s=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),h=T("./src/remux/passthrough-remuxer.ts"),f=T("./src/demux/chunk-cache.ts"),c=T("./src/utils/mp4-tools.ts"),m=T("./src/utils/logger.ts"),_;try{_=self.performance.now.bind(self.performance)}catch(O){m.logger.debug("Unable to use Performance API on this environment"),_=self.Date.now}var y=[{demux:l.default,remux:n.default},{demux:E.default,remux:h.default},{demux:C.default,remux:n.default},{demux:s.default,remux:n.default}],i=1024;y.forEach(function(O){var b=O.demux;i=Math.max(i,b.minProbeByteLength)});var a=function(){function O(v,g,w,M,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=v,this.typeSupported=g,this.config=w,this.vendor=M,this.id=N}var b=O.prototype;return b.configure=function(g){this.transmuxConfig=g,this.decrypter&&this.decrypter.reset()},b.push=function(g,w,M,N){var I=this,G=M.transmuxing;G.executeStart=_();var z=new Uint8Array(g),H=this.cache,K=this.config,U=this.currentTransmuxState,B=this.transmuxConfig;N&&(this.currentTransmuxState=N);var V=t(z,w);if(V&&V.method==="AES-128"){var ae=this.getDecrypter();if(K.enableSoftwareAES){var he=ae.softwareDecrypt(z,V.key.buffer,V.iv.buffer);if(!he)return G.executeEnd=_(),S(M);z=new Uint8Array(he)}else return this.decryptionPromise=ae.webCryptoDecrypt(z,V.key.buffer,V.iv.buffer).then(function(J){var X=I.push(J,null,M);return I.decryptionPromise=null,X}),this.decryptionPromise}var pe=N||U,Re=pe.contiguous,ke=pe.discontinuity,ve=pe.trackSwitch,Te=pe.accurateTimeOffset,be=pe.timeOffset,ue=B.audioCodec,le=B.videoCodec,re=B.defaultInitPts,fe=B.duration,q=B.initSegmentData;if((ke||ve)&&this.resetInitSegment(q,ue,le,fe),ke&&this.resetInitialTimestamp(re),Re||this.resetContiguity(),this.needsProbing(z,ke,ve)){if(H.dataLength){var ee=H.flush();z=Object(c.appendUint8Array)(ee,z)}this.configureTransmuxer(z,B)}var Ce=this.transmux(z,V,be,Te,M),te=this.currentTransmuxState;return te.contiguous=!0,te.discontinuity=!1,te.trackSwitch=!1,G.executeEnd=_(),Ce},b.flush=function(g){var w=this,M=g.transmuxing;M.executeStart=_();var N=this.decrypter,I=this.cache,G=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return w.flush(g)});var H=[],K=G.timeOffset;if(N){var U=N.flush();U&&H.push(this.push(U,null,g))}var B=I.dataLength;I.reset();var V=this.demuxer,ae=this.remuxer;if(!V||!ae)return B>=i&&this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=_(),[S(g)];var he=V.flush(K);return x(he)?he.then(function(pe){return w.flushRemux(H,pe,g),H}):(this.flushRemux(H,he,g),H)},b.flushRemux=function(g,w,M){var N=w.audioTrack,I=w.avcTrack,G=w.id3Track,z=w.textTrack,H=this.currentTransmuxState,K=H.accurateTimeOffset,U=H.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var B=this.remuxer.remux(N,I,G,z,U,K,!0,this.id);g.push({remuxResult:B,chunkMeta:M}),M.transmuxing.executeEnd=_()},b.resetInitialTimestamp=function(g){var w=this.demuxer,M=this.remuxer;if(!w||!M)return;w.resetTimeStamp(g),M.resetTimeStamp(g)},b.resetContiguity=function(){var g=this.demuxer,w=this.remuxer;if(!g||!w)return;g.resetContiguity(),w.resetNextTimestamp()},b.resetInitSegment=function(g,w,M,N){var I=this.demuxer,G=this.remuxer;if(!I||!G)return;I.resetInitSegment(w,M,N),G.resetInitSegment(g,w,M)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(g,w,M,N,I){var G;return w&&w.method==="SAMPLE-AES"?G=this.transmuxSampleAes(g,w,M,N,I):G=this.transmuxUnencrypted(g,M,N,I),G},b.transmuxUnencrypted=function(g,w,M,N){var I=this.demuxer.demux(g,w,!1,!this.config.progressive),G=I.audioTrack,z=I.avcTrack,H=I.id3Track,K=I.textTrack,U=this.remuxer.remux(G,z,H,K,w,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},b.transmuxSampleAes=function(g,w,M,N,I){var G=this;return this.demuxer.demuxSampleAes(g,w,M).then(function(z){var H=G.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,M,N,!1,G.id);return{remuxResult:H,chunkMeta:I}})},b.configureTransmuxer=function(g,w){for(var M=this.config,N=this.observer,I=this.typeSupported,G=this.vendor,z=w.audioCodec,H=w.defaultInitPts,K=w.duration,U=w.initSegmentData,B=w.videoCodec,V,ae=0,he=y.length;ae<he;ae++)if(y[ae].demux.probe(g)){V=y[ae];break}V||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),V={demux:E.default,remux:h.default});var pe=this.demuxer,Re=this.remuxer,ke=V.remux,ve=V.demux;(!Re||!(Re instanceof ke))&&(this.remuxer=new ke(N,M,I,G)),(!pe||!(pe instanceof ve))&&(this.demuxer=new ve(N,M,I),this.probe=ve.probe),this.resetInitSegment(U,z,B,K),this.resetInitialTimestamp(H)},b.needsProbing=function(g,w,M){return!this.demuxer||!this.remuxer||w||M},b.getDecrypter=function(){var g=this.decrypter;return g||(g=this.decrypter=new p.default(this.observer,this.config)),g},O}();function t(O,b){var v=null;return O.byteLength>0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(v=b),v}var S=function(b){return{remuxResult:{},chunkMeta:b}};function x(O){return"then"in O&&O.then instanceof Function}var o=function(b,v,g,w,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=v,this.initSegmentData=g,this.duration=w,this.defaultInitPts=M},k=function(b,v,g,w,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=v,this.accurateTimeOffset=g,this.trackSwitch=w,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"discardEPB",function(){return S});var D=T("./src/demux/adts.ts"),u=T("./src/demux/mpegaudio.ts"),p=T("./src/demux/exp-golomb.ts"),C=T("./src/demux/id3.ts"),E=T("./src/demux/sample-aes.ts"),l=T("./src/events.ts"),s=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),h=T("./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},c=function(){function x(k,O,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=k,this.config=O,this.typeSupported=b}x.probe=function(O){var b=x.syncOffset(O);return b<0?!1:(b&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},x.syncOffset=function(O){for(var b=Math.min(1e3,O.length-3*188),v=0;v<b;){if(O[v]===71&&O[v+188]===71&&O[v+2*188]===71)return v;v++}return-1},x.createTrack=function(O,b){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:f[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?b:void 0}};var o=x.prototype;return o.resetInitSegment=function(O,b,v){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=x.createTrack("video",v),this._audioTrack=x.createTrack("audio",v),this._id3Track=x.createTrack("id3",v),this._txtTrack=x.createTrack("text",v),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=b,this._duration=v},o.resetTimeStamp=function(){},o.resetContiguity=function(){var O=this._audioTrack,b=this._avcTrack,v=this._id3Track;O&&(O.pesData=null),b&&(b.pesData=null),v&&(v.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},o.demux=function(O,b,v,g){v===void 0&&(v=!1),g===void 0&&(g=!1),v||(this.sampleAes=null);var w,M=this._avcTrack,N=this._audioTrack,I=this._id3Track,G=M.pid,z=M.pesData,H=N.pid,K=I.pid,U=N.pesData,B=I.pesData,V=!1,ae=this.pmtParsed,he=this._pmtId,pe=O.length;if(this.remainderData&&(O=Object(s.appendUint8Array)(this.remainderData,O),pe=O.length,this.remainderData=null),pe<188&&!g)return this.remainderData=O,{audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};var Re=Math.max(0,x.syncOffset(O));pe-=(pe+Re)%188,pe<O.byteLength&&!g&&(this.remainderData=new Uint8Array(O.buffer,pe,O.buffer.byteLength-pe));for(var ke=Re;ke<pe;ke+=188)if(O[ke]===71){var ve=!!(O[ke+1]&64),Te=((O[ke+1]&31)<<8)+O[ke+2],be=(O[ke+3]&48)>>4,ue=void 0;if(be>1){if(ue=ke+5+O[ke+4],ue===ke+188)continue}else ue=ke+4;switch(Te){case G:ve&&(z&&(w=i(z))&&this.parseAVCPES(w,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(ue,ke+188)),z.size+=ke+188-ue);break;case H:ve&&(U&&(w=i(U))&&(N.isAAC?this.parseAACPES(w):this.parseMPEGPES(w)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ue,ke+188)),U.size+=ke+188-ue);break;case K:ve&&(B&&(w=i(B))&&this.parseID3PES(w),B={data:[],size:0}),B&&(B.data.push(O.subarray(ue,ke+188)),B.size+=ke+188-ue);break;case 0:ve&&(ue+=O[ue]+1),he=this._pmtId=_(O,ue);break;case he:{ve&&(ue+=O[ue]+1);var le=y(O,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,v);G=le.avc,G>0&&(M.pid=G),H=le.audio,H>0&&(N.pid=H,N.isAAC=le.isAAC),K=le.id3,K>0&&(I.pid=K),V&&!ae&&(n.logger.log("reparse from beginning"),V=!1,ke=Re-188),ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:V=!0;break}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=z,N.pesData=U,I.pesData=B;var re={audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};return g&&this.extractRemainingSamples(re),re},o.flush=function(){var O=this.remainderData;this.remainderData=null;var b;return O?b=this.demux(O,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},o.extractRemainingSamples=function(O){var b=O.audioTrack,v=O.avcTrack,g=O.id3Track,w=v.pesData,M=b.pesData,N=g.pesData,I;w&&(I=i(w))?(this.parseAVCPES(I,!0),v.pesData=null):v.pesData=w,M&&(I=i(M))?(b.isAAC?this.parseAACPES(I):this.parseMPEGPES(I),b.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=M),N&&(I=i(N))?(this.parseID3PES(I),g.pesData=null):g.pesData=N},o.demuxSampleAes=function(O,b,v){var g=this.demux(O,v,!0,!this.config.progressive),w=this.sampleAes=new E.default(this.observer,this.config,b);return this.decrypt(g,w)},o.decrypt=function(O,b){return new Promise(function(v){var g=O.audioTrack,w=O.avcTrack;g.samples&&g.isAAC?b.decryptAacSamples(g.samples,0,function(){w.samples?b.decryptAvcSamples(w.samples,0,0,function(){v(O)}):v(O)}):w.samples&&b.decryptAvcSamples(w.samples,0,0,function(){v(O)})})},o.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},o.parseAVCPES=function(O,b){var v=this,g=this._avcTrack,w=this.parseAVCNALu(O.data),M=!1,N=this.avcSample,I,G=!1;O.data=null,N&&w.length&&!g.audFound&&(a(N,g),N=this.avcSample=m(!1,O.pts,O.dts,"")),w.forEach(function(z){switch(z.type){case 1:{I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var H=z.data;if(G&&H.length>4){var K=new p.default(H).readSliceType();(K===2||K===4||K===7||K===9)&&(N.key=!0)}break}case 5:I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{I=!0,M&&N&&(N.debug+="SEI ");var U=new p.default(S(z.data));U.readUByte();for(var B=0,V=0,ae=!1,he=0;!ae&&U.bytesAvailable>1;){B=0;do he=U.readUByte(),B+=he;while(he===255);V=0;do he=U.readUByte(),V+=he;while(he===255);if(B===4&&U.bytesAvailable!==0){ae=!0;var pe=U.readUByte();if(pe===181){var Re=U.readUShort();if(Re===49){var ke=U.readUInt();if(ke===1195456820){var ve=U.readUByte();if(ve===3){for(var Te=U.readUByte(),be=U.readUByte(),ue=31&Te,le=[Te,be],re=0;re<ue;re++)le.push(U.readUByte()),le.push(U.readUByte()),le.push(U.readUByte());t(v._txtTrack.samples,{type:3,pts:O.pts,bytes:le})}}}}}else if(B===5&&U.bytesAvailable!==0){if(ae=!0,V>16){for(var fe=[],q=0;q<16;q++)fe.push(U.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&fe.push("-");for(var ee=V-16,Ce=new Uint8Array(ee),te=0;te<ee;te++)Ce[te]=U.readUByte();t(v._txtTrack.samples,{pts:O.pts,payloadType:B,uuid:fe.join(""),userData:Object(C.utf8ArrayToStr)(Ce),userDataBytes:Ce})}}else if(V<U.bytesAvailable)for(var J=0;J<V;J++)U.readUByte()}break}case 7:if(I=!0,G=!0,M&&N&&(N.debug+="SPS "),!g.sps){var X=new p.default(z.data),Q=X.readSPS();g.width=Q.width,g.height=Q.height,g.pixelRatio=Q.pixelRatio,g.sps=[z.data],g.duration=v._duration;for(var Ee=z.data.subarray(1,4),ge="avc1.",Oe=0;Oe<3;Oe++){var Qe=Ee[Oe].toString(16);Qe.length<2&&(Qe="0"+Qe),ge+=Qe}g.codec=ge}break;case 8:I=!0,M&&N&&(N.debug+="PPS "),g.pps||(g.pps=[z.data]);break;case 9:I=!1,g.audFound=!0,N&&a(N,g),N=v.avcSample=m(!1,O.pts,O.dts,M?"AUD ":"");break;case 12:I=!1;break;default:I=!1,N&&(N.debug+="unknown NAL "+z.type+" ");break}if(N&&I){var rt=N.units;rt.push(z)}}),b&&N&&(a(N,g),this.avcSample=null)},o.getLastNalUnit=function(){var O,b=this.avcSample,v;if(!b||b.units.length===0){var g=this._avcTrack.samples;b=g[g.length-1]}if((O=b)!==null&&O!==void 0&&O.units){var w=b.units;v=w[w.length-1]}return v},o.parseAVCNALu=function(O){var b=O.byteLength,v=this._avcTrack,g=v.naluState||0,w=g,M=[],N=0,I,G,z,H=-1,K=0;for(g===-1&&(H=0,K=O[0]&31,g=0,N=1);N<b;){if(I=O[N++],!g){g=I?0:1;continue}if(g===1){g=I?0:2;continue}if(!I)g=3;else if(I===1){if(H>=0){var U={data:O.subarray(H,N-g-1),type:K};M.push(U)}else{var B=this.getLastNalUnit();if(B&&(w&&N<=4-w&&(B.state&&(B.data=B.data.subarray(0,B.data.byteLength-w))),G=N-g-1,G>0)){var V=new Uint8Array(B.data.byteLength+G);V.set(B.data,0),V.set(O.subarray(0,G),B.data.byteLength),B.data=V,B.state=0}}N<b?(z=O[N]&31,H=N,K=z,g=0):g=-1}else g=0}if(H>=0&&g>=0){var ae={data:O.subarray(H,b),type:K,state:g};M.push(ae)}if(M.length===0){var he=this.getLastNalUnit();if(he){var pe=new Uint8Array(he.data.byteLength+O.byteLength);pe.set(he.data,0),pe.set(O,he.data.byteLength),he.data=pe}}return v.naluState=g,M},o.parseAACPES=function(O){var b=0,v=this._audioTrack,g=this.aacOverFlow,w=O.data;if(g){this.aacOverFlow=null;var M=g.sample.unit.byteLength,N=Math.min(g.missing,M),I=M-N;g.sample.unit.set(w.subarray(0,N),I),v.samples.push(g.sample),b=g.missing}var G,z;for(G=b,z=w.length;G<z-1&&!D.isHeader(w,G);G++);if(G!==b){var H,K;if(G<z-1?(H="AAC PES did not start with ADTS header,offset:"+G,K=!1):(H="no ADTS header found in AAC PES",K=!0),n.logger.warn("parsing error:"+H),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:H}),K)return}D.initTrackConfig(v,this.observer,w,G,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(g){var B=D.getFrameDuration(v.samplerate);U=g.sample.pts+B}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var V=0;G<z;)if(D.isHeader(w,G)){if(G+5<z){var ae=D.appendFrame(v,w,G,U,V);if(ae)if(ae.missing)this.aacOverFlow=ae;else{G+=ae.length,V++;continue}}break}else G++},o.parseMPEGPES=function(O){var b=O.data,v=b.length,g=0,w=0,M=O.pts;if(M===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;w<v;)if(u.isHeader(b,w)){var N=u.appendFrame(this._audioTrack,b,w,M,g);if(N)w+=N.length,g++;else break}else w++},o.parseID3PES=function(O){if(O.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},x}();c.minProbeByteLength=188;function m(x,o,k,O){return{key:x,frame:!1,pts:o,dts:k,units:[],debug:O,length:0}}function _(x,o){return(x[o+10]&31)<<8|x[o+11]}function y(x,o,k,O){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},v=(x[o+1]&15)<<8|x[o+2],g=o+3+v-4,w=(x[o+10]&15)<<8|x[o+11];for(o+=12+w;o<g;){var M=(x[o+1]&31)<<8|x[o+2];switch(x[o]){case 207:if(!O){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=M);break;case 21:b.id3===-1&&(b.id3=M);break;case 219:if(!O){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=M);break;case 3:case 4:k?b.audio===-1&&(b.audio=M,b.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}o+=((x[o+3]&15)<<8|x[o+4])+5}return b}function i(x){var o=0,k,O,b,v,g,w=x.data;if(!x||x.size===0)return null;for(;w[0].length<19&&w.length>1;){var M=new Uint8Array(w[0].length+w[1].length);M.set(w[0]),M.set(w[1],w[0].length),w[0]=M,w.splice(1,1)}k=w[0];var N=(k[0]<<16)+(k[1]<<8)+k[2];if(N===1){if(O=(k[4]<<8)+k[5],O&&O>x.size-6)return null;var I=k[7];I&192&&(v=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,I&64?(g=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,v-g>60*9e4&&(n.logger.warn(Math.round((v-g)/9e4)+"s delta between PTS and DTS, align them"),v=g)):g=v),b=k[8];var G=b+9;if(x.size<=G)return null;x.size-=G;for(var z=new Uint8Array(x.size),H=0,K=w.length;H<K;H++){k=w[H];var U=k.byteLength;if(G)if(G>U){G-=U;continue}else k=k.subarray(G),U-=G,G=0;z.set(k,o),o+=U}return O&&(O-=b+3),{data:z,pts:v,dts:g,len:O}}return null}function a(x,o){if(x.units.length&&x.frame){if(x.pts===void 0){var k=o.samples,O=k.length;if(O){var b=k[O-1];x.pts=b.pts,x.dts=b.dts}else{o.dropped++;return}}o.samples.push(x)}x.debug.length&&n.logger.log(x.pts+"/"+x.dts+":"+x.debug)}function t(x,o){var k=x.length;if(k>0){if(o.pts>=x[k-1].pts)x.push(o);else for(var O=k-1;O>=0;O--)if(o.pts<x[O].pts){x.splice(O,0,o);break}}else x.push(o)}function S(x){for(var o=x.byteLength,k=[],O=1;O<o-2;)x[O]===0&&x[O+1]===0&&x[O+2]===3?(k.push(O+2),O+=2):O++;if(k.length===0)return x;var b=o-k.length,v=new Uint8Array(b),g=0;for(O=0;O<b;g++,O++)g===k[0]&&(g++,k.shift()),v[O]=x[g];return v}d.default=c},"./src/errors.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"ErrorTypes",function(){return D}),T.d(d,"ErrorDetails",function(){return u});var D;(function(p){p.NETWORK_ERROR="networkError",p.MEDIA_ERROR="mediaError",p.KEY_SYSTEM_ERROR="keySystemError",p.MUX_ERROR="muxError",p.OTHER_ERROR="otherError"})(D||(D={}));var u;(function(p){p.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",p.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",p.KEY_SYSTEM_NO_SESSION="keySystemNoSession",p.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",p.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",p.MANIFEST_LOAD_ERROR="manifestLoadError",p.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",p.MANIFEST_PARSING_ERROR="manifestParsingError",p.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",p.LEVEL_EMPTY_ERROR="levelEmptyError",p.LEVEL_LOAD_ERROR="levelLoadError",p.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",p.LEVEL_SWITCH_ERROR="levelSwitchError",p.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",p.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",p.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",p.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",p.FRAG_LOAD_ERROR="fragLoadError",p.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",p.FRAG_DECRYPT_ERROR="fragDecryptError",p.FRAG_PARSING_ERROR="fragParsingError",p.REMUX_ALLOC_ERROR="remuxAllocError",p.KEY_LOAD_ERROR="keyLoadError",p.KEY_LOAD_TIMEOUT="keyLoadTimeOut",p.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",p.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",p.BUFFER_APPEND_ERROR="bufferAppendError",p.BUFFER_APPENDING_ERROR="bufferAppendingError",p.BUFFER_STALLED_ERROR="bufferStalledError",p.BUFFER_FULL_ERROR="bufferFullError",p.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",p.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",p.INTERNAL_EXCEPTION="internalException",p.INTERNAL_ABORTED="aborted",p.UNKNOWN="unknown"})(u||(u={}))},"./src/events.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"Events",function(){return D});var D;(function(u){u.MEDIA_ATTACHING="hlsMediaAttaching",u.MEDIA_ATTACHED="hlsMediaAttached",u.MEDIA_DETACHING="hlsMediaDetaching",u.MEDIA_DETACHED="hlsMediaDetached",u.BUFFER_RESET="hlsBufferReset",u.BUFFER_CODECS="hlsBufferCodecs",u.BUFFER_CREATED="hlsBufferCreated",u.BUFFER_APPENDING="hlsBufferAppending",u.BUFFER_APPENDED="hlsBufferAppended",u.BUFFER_EOS="hlsBufferEos",u.BUFFER_FLUSHING="hlsBufferFlushing",u.BUFFER_FLUSHED="hlsBufferFlushed",u.MANIFEST_LOADING="hlsManifestLoading",u.MANIFEST_LOADED="hlsManifestLoaded",u.MANIFEST_PARSED="hlsManifestParsed",u.LEVEL_SWITCHING="hlsLevelSwitching",u.LEVEL_SWITCHED="hlsLevelSwitched",u.LEVEL_LOADING="hlsLevelLoading",u.LEVEL_LOADED="hlsLevelLoaded",u.LEVEL_UPDATED="hlsLevelUpdated",u.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",u.LEVELS_UPDATED="hlsLevelsUpdated",u.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",u.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",u.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",u.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",u.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",u.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",u.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",u.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",u.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",u.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",u.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",u.CUES_PARSED="hlsCuesParsed",u.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",u.INIT_PTS_FOUND="hlsInitPtsFound",u.FRAG_LOADING="hlsFragLoading",u.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",u.FRAG_LOADED="hlsFragLoaded",u.FRAG_DECRYPTED="hlsFragDecrypted",u.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",u.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",u.FRAG_PARSING_METADATA="hlsFragParsingMetadata",u.FRAG_PARSED="hlsFragParsed",u.FRAG_BUFFERED="hlsFragBuffered",u.FRAG_CHANGED="hlsFragChanged",u.FPS_DROP="hlsFpsDrop",u.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",u.ERROR="hlsError",u.DESTROYING="hlsDestroying",u.KEY_LOADING="hlsKeyLoading",u.KEY_LOADED="hlsKeyLoaded",u.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",u.BACK_BUFFER_REACHED="hlsBackBufferReached"})(D||(D={}))},"./src/hls.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return x});var D=T("./node_modules/url-toolkit/src/url-toolkit.js"),u=T.n(D),p=T("./src/loader/playlist-loader.ts"),C=T("./src/loader/key-loader.ts"),E=T("./src/controller/id3-track-controller.ts"),l=T("./src/controller/latency-controller.ts"),s=T("./src/controller/level-controller.ts"),n=T("./src/controller/fragment-tracker.ts"),h=T("./src/controller/stream-controller.ts"),f=T("./src/is-supported.ts"),c=T("./src/utils/logger.ts"),m=T("./src/config.ts"),_=T("./node_modules/eventemitter3/index.js"),y=T.n(_),i=T("./src/events.ts"),a=T("./src/errors.ts");function t(o,k){for(var O=0;O<k.length;O++){var b=k[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(o,b.key,b)}}function S(o,k,O){return k&&t(o.prototype,k),O&&t(o,O),o}var x=function(){o.isSupported=function(){return Object(f.isSupported)()};function o(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new _.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var b=this.config=Object(m.mergeConfig)(o.DefaultConfig,O);this.userConfig=O,Object(c.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(m.enableStreamingMode)(b);var v=b.abrController,g=b.bufferController,w=b.capLevelController,M=b.fpsController,N=this.abrController=new v(this),I=this.bufferController=new g(this),G=this.capLevelController=new w(this),z=new M(this),H=new p.default(this),K=new C.default(this),U=new E.default(this),B=this.levelController=new s.default(this),V=new n.FragmentTracker(this),ae=this.streamController=new h.default(this,V);G.setStreamController(ae),z.setStreamController(ae);var he=[B,ae];this.networkControllers=he;var pe=[H,K,N,I,G,z,U,V];this.audioTrackController=this.createController(b.audioTrackController,null,he),this.createController(b.audioStreamController,V,he),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,he),this.createController(b.subtitleStreamController,V,he),this.createController(b.timelineController,null,pe),this.emeController=this.createController(b.emeController,null,pe),this.cmcdController=this.createController(b.cmcdController,null,pe),this.latencyController=this.createController(l.default,null,pe),this.coreComponents=pe}var k=o.prototype;return k.createController=function(b,v,g){if(b){var w=v?new b(this,v):new b(this);return g&&g.push(w),w}return null},k.on=function(b,v,g){g===void 0&&(g=this),this._emitter.on(b,v,g)},k.once=function(b,v,g){g===void 0&&(g=this),this._emitter.once(b,v,g)},k.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},k.off=function(b,v,g,w){g===void 0&&(g=this),this._emitter.off(b,v,g,w)},k.listeners=function(b){return this._emitter.listeners(b)},k.emit=function(b,v,g){return this._emitter.emit(b,v,g)},k.trigger=function(b,v){if(this.config.debug)return this.emit(b,b,v);try{return this.emit(b,b,v)}catch(g){c.logger.error("An internal error happened while handling event "+b+'. Error message: "'+g.message+'". Here is a stacktrace:',g),this.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:g})}return!1},k.listenerCount=function(b){return this._emitter.listenerCount(b)},k.destroy=function(){c.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},k.attachMedia=function(b){c.logger.log("attachMedia"),this._media=b,this.trigger(i.Events.MEDIA_ATTACHING,{media:b})},k.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(b){this.stopLoad();var v=this.media,g=this.url,w=this.url=D.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});c.logger.log("loadSource:"+w),v&&g&&g!==w&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(v)),this.trigger(i.Events.MANIFEST_LOADING,{url:b})},k.startLoad=function(b){b===void 0&&(b=-1),c.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(v){v.startLoad(b)})},k.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},k.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){c.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},k.removeLevel=function(b,v){v===void 0&&(v=0),this.levelController.removeLevel(b,v)},S(o,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){c.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){c.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){c.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){c.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){c.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var v=!!b;v!==this.config.capLevelToPlayerSize&&(v?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=v)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(c.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,v=this.config.minAutoBitrate;if(!b)return 0;for(var g=b.length,w=0;w<g;w++)if(b[w].maxBitrate>v)return w;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,v=this.autoLevelCapping,g;return v===-1&&b&&b.length?g=b.length-1:g=v,g}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var v=this.audioTrackController;v&&(v.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var v=this.subtitleTrackController;v&&(v.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var v=this.subtitleTrackController;v&&(v.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return i.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return o.defaultConfig?o.defaultConfig:m.hlsDefaultConfig},set:function(b){o.defaultConfig=b}}]),o}();x.defaultConfig=void 0},"./src/is-supported.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isSupported",function(){return p}),T.d(d,"changeTypeSupported",function(){return C});var D=T("./src/utils/mediasource-helper.ts");function u(){return self.SourceBuffer||self.WebKitSourceBuffer}function p(){var E=Object(D.getMediaSource)();if(!E)return!1;var l=u(),s=E&&typeof E.isTypeSupported=="function"&&E.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!l||l.prototype&&typeof l.prototype.appendBuffer=="function"&&typeof l.prototype.remove=="function";return!!s&&!!n}function C(){var E,l=u();return typeof(l==null||((E=l.prototype)===null||E===void 0)?void 0:E.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return c}),T.d(d,"LoadError",function(){return _});var D=T("./src/polyfills/number.ts"),u=T("./src/errors.ts");function p(y,i){y.prototype=Object.create(i.prototype),y.prototype.constructor=y,n(y,i)}function C(y){var i=typeof Map=="function"?new Map:void 0;return C=function(t){if(t===null||!s(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,S)}function S(){return E(t,arguments,h(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),n(S,t)},C(y)}function E(y,i,a){return l()?E=Reflect.construct:E=function(S,x,o){var k=[null];k.push.apply(k,x);var O=Function.bind.apply(S,k),b=new O;return o&&n(b,o.prototype),b},E.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(y){return!1}}function s(y){return Function.toString.call(y).indexOf("[native code]")!==-1}function n(y,i){return n=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},n(y,i)}function h(y){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},h(y)}var f=Math.pow(2,17),c=function(){function y(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var i=y.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,S){var x=this,o=t.url;if(!o)return Promise.reject(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(o?"part list":"url")));this.abort();var k=this.config,O=k.fLoader,b=k.loader;return new Promise(function(v,g){x.loader&&x.loader.destroy();var w=x.loader=t.loader=O?new O(k):new b(k),M=m(t),N={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};t.stats=w.stats,w.load(M,N,{onSuccess:function(G,z,H,K){x.resetLoader(t,w),v({frag:t,part:null,payload:G.data,networkDetails:K})},onError:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:G,networkDetails:H}))},onAbort:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:H}))},onTimeout:function(G,z,H){x.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:H}))},onProgress:function(G,z,H,K){S&&S({frag:t,part:null,payload:H,networkDetails:K})}})})},i.loadPart=function(t,S,x){var o=this;this.abort();var k=this.config,O=k.fLoader,b=k.loader;return new Promise(function(v,g){o.loader&&o.loader.destroy();var w=o.loader=t.loader=O?new O(k):new b(k),M=m(t,S),N={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};S.stats=w.stats,w.load(M,N,{onSuccess:function(G,z,H,K){o.resetLoader(t,w),o.updateStatsFromPart(t,S);var U={frag:t,part:S,payload:G.data,networkDetails:K};x(U),v(U)},onError:function(G,z,H){o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:G,networkDetails:H}))},onAbort:function(G,z,H){t.stats.aborted=S.stats.aborted,o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:H}))},onTimeout:function(G,z,H){o.resetLoader(t,w),g(new _({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:H}))}})})},i.updateStatsFromPart=function(t,S){var x=t.stats,o=S.stats,k=o.total;if(x.loaded+=o.loaded,k){var O=Math.round(t.duration/S.duration),b=Math.min(Math.round(x.loaded/k),O),v=O-b,g=v*Math.round(x.loaded/b);x.total=x.loaded+g}else x.total=Math.max(x.loaded,x.total);var w=x.loading,M=o.loading;w.start?w.first+=M.first-M.start:(w.start=M.start,w.first=M.first),w.end=M.end},i.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},y}();function m(y,i){i===void 0&&(i=null);var a=i||y,t={frag:y,part:i,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},S=a.byteRangeStartOffset,x=a.byteRangeEndOffset;return Object(D.isFiniteNumber)(S)&&Object(D.isFiniteNumber)(x)&&(t.rangeStart=S,t.rangeEnd=x),t}var _=function(y){p(i,y);function i(a){for(var t,S=arguments.length,x=new Array(S>1?S-1:0),o=1;o<S;o++)x[o-1]=arguments[o];return t=y.call.apply(y,[this].concat(x))||this,t.data=void 0,t.data=a,t}return i}(C(Error))},"./src/loader/fragment.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"ElementaryStreamTypes",function(){return c}),T.d(d,"BaseSegment",function(){return m}),T.d(d,"Fragment",function(){return _}),T.d(d,"Part",function(){return y});var D=T("./src/polyfills/number.ts"),u=T("./node_modules/url-toolkit/src/url-toolkit.js"),p=T.n(u),C=T("./src/utils/logger.ts"),E=T("./src/loader/level-key.ts"),l=T("./src/loader/load-stats.ts");function s(i,a){i.prototype=Object.create(a.prototype),i.prototype.constructor=i,n(i,a)}function n(i,a){return n=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},n(i,a)}function h(i,a){for(var t=0;t<a.length;t++){var S=a[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function f(i,a,t){return a&&h(i.prototype,a),t&&h(i,t),i}var c;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(c||(c={}));var m=function(){function i(t){var S;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(S={},S[c.AUDIO]=null,S[c.VIDEO]=null,S[c.AUDIOVIDEO]=null,S),this.baseurl=t}var a=i.prototype;return a.setByteRange=function(S,x){var o=S.split("@",2),k=[];o.length===1?k[0]=x?x.byteRangeEndOffset:0:k[0]=parseInt(o[1]),k[1]=parseInt(o[0])+k[0],this._byteRange=k},f(i,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(u.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(S){this._url=S}}]),i}(),_=function(i){s(a,i);function a(S,x){var o;return o=i.call(this,x)||this,o._decryptdata=null,o.rawProgramDateTime=null,o.programDateTime=null,o.tagList=[],o.duration=0,o.sn=0,o.levelkey=void 0,o.type=void 0,o.loader=null,o.level=-1,o.cc=0,o.startPTS=void 0,o.endPTS=void 0,o.appendedPTS=void 0,o.startDTS=void 0,o.endDTS=void 0,o.start=0,o.deltaPTS=void 0,o.maxStartPTS=void 0,o.minEndPTS=void 0,o.stats=new l.LoadStats,o.urlId=0,o.data=void 0,o.bitrateTest=!1,o.title=null,o.initSegment=null,o.type=S,o}var t=a.prototype;return t.createInitializationVector=function(x){for(var o=new Uint8Array(16),k=12;k<16;k++)o[k]=x>>8*(15-k)&255;return o},t.setDecryptDataFromLevelKey=function(x,o){var k=x;return(x==null?void 0:x.method)==="AES-128"&&x.uri&&!x.iv&&(k=E.LevelKey.fromURI(x.uri),k.method=x.method,k.iv=this.createInitializationVector(o),k.keyFormat="identity"),k},t.setElementaryStreamInfo=function(x,o,k,O,b,v){v===void 0&&(v=!1);var g=this.elementaryStreams,w=g[x];if(!w){g[x]={startPTS:o,endPTS:k,startDTS:O,endDTS:b,partial:v};return}w.startPTS=Math.min(w.startPTS,o),w.endPTS=Math.max(w.endPTS,k),w.startDTS=Math.min(w.startDTS,O),w.endDTS=Math.max(w.endDTS,b)},t.clearElementaryStreamInfo=function(){var x=this.elementaryStreams;x[c.AUDIO]=null,x[c.VIDEO]=null,x[c.AUDIOVIDEO]=null},f(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var x=this.sn;typeof x!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&C.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),x=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,x)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(D.isFiniteNumber)(this.programDateTime))return null;var x=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+x*1e3}},{key:"encrypted",get:function(){var x;return!!((x=this.decryptdata)!==null&&x!==void 0&&x.keyFormat&&this.decryptdata.uri)}}]),a}(m),y=function(i){s(a,i);function a(t,S,x,o,k){var O;O=i.call(this,x)||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 l.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=S,O.index=o;var b=t.enumeratedString("BYTERANGE");return b&&O.setByteRange(b,k),k&&(O.fragOffset=k.fragOffset+k.duration),O}return f(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),a}(m)},"./src/loader/key-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return C});var D=T("./src/events.ts"),u=T("./src/errors.ts"),p=T("./src/utils/logger.ts"),C=function(){function E(s){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=s,this._registerListeners()}var l=E.prototype;return l._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},l._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},l.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var h=this.loaders[n];h&&h.destroy()}this.loaders={}},l.onKeyLoading=function(n,h){var f=h.frag,c=f.type,m=this.loaders[c];if(!f.decryptdata){p.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var _=f.decryptdata.uri;if(_!==this.decrypturl||this.decryptkey===null){var y=this.hls.config;if(m&&(p.logger.warn("abort previous key loader for type:"+c),m.abort()),!_){p.logger.warn("key uri is falsy");return}var i=y.loader,a=f.loader=this.loaders[c]=new i(y);this.decrypturl=_,this.decryptkey=null;var t={url:_,frag:f,responseType:"arraybuffer"},S={timeout:y.fragLoadingTimeOut,maxRetry:0,retryDelay:y.fragLoadingRetryDelay,maxRetryDelay:y.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(t,S,x)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:f}))},l.loadsuccess=function(n,h,f){var c=f.frag;if(!c.decryptdata){p.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(n.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(D.Events.KEY_LOADED,{frag:c})},l.loaderror=function(n,h){var f=h.frag,c=f.loader;c&&c.abort(),delete this.loaders[f.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:n})},l.loadtimeout=function(n,h){var f=h.frag,c=f.loader;c&&c.abort(),delete this.loaders[f.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},E}()},"./src/loader/level-details.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"LevelDetails",function(){return E});var D=T("./src/polyfills/number.ts");function u(l,s){for(var n=0;n<s.length;n++){var h=s[n];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}function p(l,s,n){return s&&u(l.prototype,s),n&&u(l,n),l}var C=10,E=function(){function l(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 s=l.prototype;return s.reloaded=function(h){if(!h){this.advanced=!0,this.updated=!0;return}var f=this.lastPartSn-h.lastPartSn,c=this.lastPartIndex-h.lastPartIndex;this.updated=this.endSN!==h.endSN||!!c||!!f,this.advanced=this.endSN>h.endSN||f>0||f===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},p(l,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(D.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var f=this.driftEnd-this.driftStart;return f*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.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 h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),l}()},"./src/loader/level-key.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"LevelKey",function(){return E});var D=T("./node_modules/url-toolkit/src/url-toolkit.js"),u=T.n(D);function p(l,s){for(var n=0;n<s.length;n++){var h=s[n];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}function C(l,s,n){return s&&p(l.prototype,s),n&&p(l,n),l}var E=function(){l.fromURL=function(n,h){return new l(n,h)},l.fromURI=function(n){return new l(n)};function l(s,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(D.buildAbsoluteURL)(s,n,{alwaysNormalize:!0}):this._uri=s}return C(l,[{key:"uri",get:function(){return this._uri}}]),l}()},"./src/loader/load-stats.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"LoadStats",function(){return D});var D=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return a});var D=T("./src/polyfills/number.ts"),u=T("./node_modules/url-toolkit/src/url-toolkit.js"),p=T.n(u),C=T("./src/loader/fragment.ts"),E=T("./src/loader/level-details.ts"),l=T("./src/loader/level-key.ts"),s=T("./src/utils/attr-list.ts"),n=T("./src/utils/logger.ts"),h=T("./src/utils/codecs.ts"),f=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,m=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"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("|")),y=/\.(mp4|m4s|m4v|m4a)$/i;function i(k){var O,b;return y.test((O=(b=u.parseURL(k))===null||b===void 0?void 0:b.path)!=null?O:"")}var a=function(){function k(){}return k.findGroup=function(b,v){for(var g=0;g<b.length;g++){var w=b[g];if(w.id===v)return w}},k.convertAVC1ToAVCOTI=function(b){var v=b.split(".");if(v.length>2){var g=v.shift()+".";return g+=parseInt(v.shift()).toString(16),g+=("000"+parseInt(v.shift()).toString(16)).substr(-4),g}return b},k.resolve=function(b,v){return u.buildAbsoluteURL(v,b,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(b,v){var g=[],w={},M=!1;f.lastIndex=0;for(var N;(N=f.exec(b))!=null;)if(N[1]){var I=new s.AttrList(N[1]),G={attrs:I,bitrate:I.decimalInteger("AVERAGE-BANDWIDTH")||I.decimalInteger("BANDWIDTH"),name:I.NAME,url:k.resolve(N[2],v)},z=I.decimalResolution("RESOLUTION");z&&(G.width=z.width,G.height=z.height),t((I.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=k.convertAVC1ToAVCOTI(G.videoCodec)),g.push(G)}else if(N[3]){var H=new s.AttrList(N[3]);H["DATA-ID"]&&(M=!0,w[H["DATA-ID"]]=H)}return{levels:g,sessionData:M?w:null}},k.parseMasterPlaylistMedia=function(b,v,g,w){w===void 0&&(w=[]);var M,N=[],I=0;for(c.lastIndex=0;(M=c.exec(b))!==null;){var G=new s.AttrList(M[1]);if(G.TYPE===g){var z={attrs:G,bitrate:0,id:I++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:g,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?k.resolve(G.URI,v):""};if(w.length){var H=k.findGroup(w,z.groupId)||w[0];S(z,H,"audioCodec"),S(z,H,"textCodec")}N.push(z)}}return N},k.parseLevelPlaylist=function(b,v,g,w,M){var N=new E.LevelDetails(v),I=N.fragments,G=null,z=0,H=0,K=0,U=0,B=null,V=new C.Fragment(w,v),ae,he,pe,Re=-1,ke=!1;for(m.lastIndex=0,N.m3u8=b;(ae=m.exec(b))!==null;){ke&&(ke=!1,V=new C.Fragment(w,v),V.start=K,V.sn=z,V.cc=U,V.level=g,G&&(V.initSegment=G,V.rawProgramDateTime=G.rawProgramDateTime));var ve=ae[1];if(ve){V.duration=parseFloat(ve);var Te=(" "+ae[2]).slice(1);V.title=Te||null,V.tagList.push(Te?["INF",ve,Te]:["INF",ve])}else if(ae[3])Object(D.isFiniteNumber)(V.duration)&&(V.start=K,pe&&(V.levelkey=pe),V.sn=z,V.level=g,V.cc=U,V.urlId=M,I.push(V),V.relurl=(" "+ae[3]).slice(1),o(V,B),B=V,K+=V.duration,z++,H=0,ke=!0);else if(ae[4]){var be=(" "+ae[4]).slice(1);B?V.setByteRange(be,B):V.setByteRange(be)}else if(ae[5])V.rawProgramDateTime=(" "+ae[5]).slice(1),V.tagList.push(["PROGRAM-DATE-TIME",V.rawProgramDateTime]),Re===-1&&(Re=I.length);else{if(ae=ae[0].match(_),!ae){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he<ae.length&&!(typeof ae[he]!="undefined");he++);var ue=(" "+ae[he]).slice(1),le=(" "+ae[he+1]).slice(1),re=ae[he+2]?(" "+ae[he+2]).slice(1):"";switch(ue){case"PLAYLIST-TYPE":N.type=le.toUpperCase();break;case"MEDIA-SEQUENCE":z=N.startSN=parseInt(le);break;case"SKIP":{var fe=new s.AttrList(le),q=fe.decimalInteger("SKIPPED-SEGMENTS");if(Object(D.isFiniteNumber)(q)){N.skippedSegments=q;for(var ee=q;ee--;)I.unshift(null);z+=q}var Ce=fe.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ce&&(N.recentlyRemovedDateranges=Ce.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(le);break;case"VERSION":N.version=parseInt(le);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(le||re)&&V.tagList.push(re?[le,re]:[le]);break;case"DIS":U++;case"GAP":V.tagList.push([ue]);break;case"BITRATE":V.tagList.push([ue,le]);break;case"DISCONTINUITY-SEQ":U=parseInt(le);break;case"KEY":{var te,J=new s.AttrList(le),X=J.enumeratedString("METHOD"),Q=J.URI,Ee=J.hexadecimalInteger("IV"),ge=J.enumeratedString("KEYFORMATVERSIONS"),Oe=J.enumeratedString("KEYID"),Qe=(te=J.enumeratedString("KEYFORMAT"))!=null?te:"identity",rt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(rt.indexOf(Qe)>-1){n.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;X&&(pe=l.LevelKey.fromURL(v,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(pe.method=X,pe.keyFormat=Qe,Oe&&(pe.keyID=Oe),ge&&(pe.keyFormatVersions=ge),pe.iv=Ee));break}case"START":{var nt=new s.AttrList(le),ut=nt.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)(ut)&&(N.startTimeOffset=ut);break}case"MAP":{var dt=new s.AttrList(le);V.relurl=dt.URI,dt.BYTERANGE&&V.setByteRange(dt.BYTERANGE),V.level=g,V.sn="initSegment",pe&&(V.levelkey=pe),V.initSegment=null,G=V,ke=!0;break}case"SERVER-CONTROL":{var mt=new s.AttrList(le);N.canBlockReload=mt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=mt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&mt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=mt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new s.AttrList(le);N.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var De=N.partList;De||(De=N.partList=[]);var at=H>0?De[De.length-1]:void 0,ht=H++,Ze=new C.Part(new s.AttrList(le),V,v,ht,at);De.push(Ze),V.duration+=Ze.duration;break}case"PRELOAD-HINT":{var st=new s.AttrList(le);N.preloadHint=st;break}case"RENDITION-REPORT":{var Ue=new s.AttrList(le);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+ae);break}}}B&&!B.relurl?(I.pop(),K-=B.duration,N.partList&&(N.fragmentHint=B)):N.partList&&(o(V,B),V.cc=U,N.fragmentHint=V);var Me=I.length,Ne=I[0],xe=I[Me-1];if(K+=N.skippedSegments*N.targetduration,K>0&&Me&&xe){N.averagetargetduration=K/Me;var Se=xe.sn;N.endSN=Se!=="initSegment"?Se:0,Ne&&(N.startCC=Ne.cc,Ne.initSegment||N.fragments.every(function(Ae){return Ae.relurl&&i(Ae.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),V=new C.Fragment(w,v),V.relurl=xe.relurl,V.level=g,V.sn="initSegment",Ne.initSegment=V,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(K+=N.fragmentHint.duration),N.totalduration=K,N.endCC=U,Re>0&&x(I,Re),N},k}();function t(k,O){["video","audio","text"].forEach(function(b){var v=k.filter(function(w){return Object(h.isCodecType)(w,b)});if(v.length){var g=v.filter(function(w){return w.lastIndexOf("avc1",0)===0||w.lastIndexOf("mp4a",0)===0});O[b+"Codec"]=g.length>0?g[0]:v[0],k=k.filter(function(w){return v.indexOf(w)===-1})}}),O.unknownCodecs=k}function S(k,O,b){var v=O[b];v&&(k[b]=v)}function x(k,O){for(var b=k[O],v=O;v--;){var g=k[v];if(!g)return;g.programDateTime=b.programDateTime-g.duration*1e3,b=g}}function o(k,O){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):O!=null&&O.programDateTime&&(k.programDateTime=O.endProgramDateTime),Object(D.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/polyfills/number.ts"),u=T("./src/events.ts"),p=T("./src/errors.ts"),C=T("./src/utils/logger.ts"),E=T("./src/utils/mp4-tools.ts"),l=T("./src/loader/m3u8-parser.ts"),s=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function h(m){var _=m.type;switch(_){case s.PlaylistContextType.AUDIO_TRACK:return s.PlaylistLevelType.AUDIO;case s.PlaylistContextType.SUBTITLE_TRACK:return s.PlaylistLevelType.SUBTITLE;default:return s.PlaylistLevelType.MAIN}}function f(m,_){var y=m.url;return(y===void 0||y.indexOf("data:")===0)&&(y=_.url),y}var c=function(){function m(y){this.hls=void 0,this.loaders=Object.create(null),this.hls=y,this.registerListeners()}var _=m.prototype;return _.registerListeners=function(){var i=this.hls;i.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(u.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},_.unregisterListeners=function(){var i=this.hls;i.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(u.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},_.createInternalLoader=function(i){var a=this.hls.config,t=a.pLoader,S=a.loader,x=t||S,o=new x(a);return i.loader=o,this.loaders[i.type]=o,o},_.getInternalLoader=function(i){return this.loaders[i.type]},_.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},_.destroyInternalLoaders=function(){for(var i in this.loaders){var a=this.loaders[i];a&&a.destroy(),this.resetInternalLoader(i)}},_.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},_.onManifestLoading=function(i,a){var t=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:s.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},_.onLevelLoading=function(i,a){var t=a.id,S=a.level,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:s.PlaylistContextType.LEVEL,url:x,deliveryDirectives:o})},_.onAudioTrackLoading=function(i,a){var t=a.id,S=a.groupId,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:s.PlaylistContextType.AUDIO_TRACK,url:x,deliveryDirectives:o})},_.onSubtitleTrackLoading=function(i,a){var t=a.id,S=a.groupId,x=a.url,o=a.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:s.PlaylistContextType.SUBTITLE_TRACK,url:x,deliveryDirectives:o})},_.load=function(i){var a,t=this.hls.config,S=this.getInternalLoader(i);if(S){var x=S.context;if(x&&x.url===i.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),S.abort()}var o,k,O,b;switch(i.type){case s.PlaylistContextType.MANIFEST:o=t.manifestLoadingMaxRetry,k=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,b=t.manifestLoadingMaxRetryTimeout;break;case s.PlaylistContextType.LEVEL:case s.PlaylistContextType.AUDIO_TRACK:case s.PlaylistContextType.SUBTITLE_TRACK:o=0,k=t.levelLoadingTimeOut;break;default:o=t.levelLoadingMaxRetry,k=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,b=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(i),(a=i.deliveryDirectives)!==null&&a!==void 0&&a.part){var v;if(i.type===s.PlaylistContextType.LEVEL&&i.level!==null?v=this.hls.levels[i.level].details:i.type===s.PlaylistContextType.AUDIO_TRACK&&i.id!==null?v=this.hls.audioTracks[i.id].details:i.type===s.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(v=this.hls.subtitleTracks[i.id].details),v){var g=v.partTarget,w=v.targetduration;g&&w&&(k=Math.min(Math.max(g*3,w*.8)*1e3,k))}}var M={timeout:k,maxRetry:o,retryDelay:O,maxRetryDelay:b,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(i,M,N)},_.loadsuccess=function(i,a,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,a,t,S);return}this.resetInternalLoader(t.type);var x=i.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",S);return}a.parsing.start=performance.now(),x.indexOf("#EXTINF:")>0||x.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,a,t,S):this.handleMasterPlaylist(i,a,t,S)},_.loaderror=function(i,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!1,i)},_.loadtimeout=function(i,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!0)},_.handleMasterPlaylist=function(i,a,t,S){var x=this.hls,o=i.data,k=f(i,t),O=l.default.parseMasterPlaylist(o,k),b=O.levels,v=O.sessionData;if(!b.length){this.handleManifestParsingError(i,t,"no level found in manifest",S);return}var g=b.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),w=b.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),M=l.default.parseMasterPlaylistMedia(o,k,"AUDIO",g),N=l.default.parseMasterPlaylistMedia(o,k,"SUBTITLES",w),I=l.default.parseMasterPlaylistMedia(o,k,"CLOSED-CAPTIONS");if(M.length){var G=M.some(function(z){return!z.url});!G&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}x.trigger(u.Events.MANIFEST_LOADED,{levels:b,audioTracks:M,subtitles:N,captions:I,url:k,stats:a,networkDetails:S,sessionData:v})},_.handleTrackOrLevelPlaylist=function(i,a,t,S){var x=this.hls,o=t.id,k=t.level,O=t.type,b=f(i,t),v=Object(D.isFiniteNumber)(o)?o:0,g=Object(D.isFiniteNumber)(k)?k:v,w=h(t),M=l.default.parseLevelPlaylist(i.data,b,g,w,v);if(!M.fragments.length){x.trigger(u.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===s.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:b};x.trigger(u.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:b,stats:a,networkDetails:S,sessionData:null})}if(a.parsing.end=performance.now(),M.needSidxRanges){var I,G=(I=M.fragments[0].initSegment)===null||I===void 0?void 0:I.url;this.load({url:G,isSidxRequest:!0,type:O,level:k,levelDetails:M,id:o,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(i,a,t,S)},_.handleSidxRequest=function(i,a){var t=Object(E.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var S=t.references,x=a.levelDetails;S.forEach(function(o,k){var O=o.info,b=x.fragments[k];b.byteRange.length===0&&b.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),b.initSegment&&b.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},_.handleManifestParsingError=function(i,a,t,S){this.hls.trigger(u.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===s.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:a,networkDetails:S})},_.handleNetworkError=function(i,a,t,S){t===void 0&&(t=!1),C.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var x=p.ErrorDetails.UNKNOWN,o=!1,k=this.getInternalLoader(i);switch(i.type){case s.PlaylistContextType.MANIFEST:x=t?p.ErrorDetails.MANIFEST_LOAD_TIMEOUT:p.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case s.PlaylistContextType.LEVEL:x=t?p.ErrorDetails.LEVEL_LOAD_TIMEOUT:p.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case s.PlaylistContextType.AUDIO_TRACK:x=t?p.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;case s.PlaylistContextType.SUBTITLE_TRACK:x=t?p.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:p.ErrorDetails.SUBTITLE_LOAD_ERROR,o=!1;break}k&&this.resetInternalLoader(i.type);var O={type:p.ErrorTypes.NETWORK_ERROR,details:x,fatal:o,url:i.url,loader:k,context:i,networkDetails:a};S&&(O.response=S),this.hls.trigger(u.Events.ERROR,O)},_.handlePlaylistLoaded=function(i,a,t,S){var x=t.type,o=t.level,k=t.id,O=t.groupId,b=t.loader,v=t.levelDetails,g=t.deliveryDirectives;if(!(v!=null&&v.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",S);return}if(!b)return;v.live&&(b.getCacheAge&&(v.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(v.ageHeader))&&(v.ageHeader=0));switch(x){case s.PlaylistContextType.MANIFEST:case s.PlaylistContextType.LEVEL:this.hls.trigger(u.Events.LEVEL_LOADED,{details:v,level:o||0,id:k||0,stats:a,networkDetails:S,deliveryDirectives:g});break;case s.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(u.Events.AUDIO_TRACK_LOADED,{details:v,id:k||0,groupId:O||"",stats:a,networkDetails:S,deliveryDirectives:g});break;case s.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(u.Events.SUBTITLE_TRACK_LOADED,{details:v,id:k||0,groupId:O||"",stats:a,networkDetails:S,deliveryDirectives:g});break}},m}();d.default=c},"./src/polyfills/number.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isFiniteNumber",function(){return D}),T.d(d,"MAX_SAFE_INTEGER",function(){return u});var D=Number.isFinite||function(p){return typeof p=="number"&&isFinite(p)},u=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,d,T){"use strict";T.r(d);var D=function(){function u(){}return u.getSilentFrame=function(C,E){switch(C){case"mp4a.40.2":if(E===1)return new Uint8Array([0,200,0,128,35,128]);if(E===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(E===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(E===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(E===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(E===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(E===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(E===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(E===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},u}();d.default=D},"./src/remux/mp4-generator.ts":function(P,d,T){"use strict";T.r(d);var D=Math.pow(2,32)-1,u=function(){function p(){}return p.init=function(){p.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 E;for(E in p.types)p.types.hasOwnProperty(E)&&(p.types[E]=[E.charCodeAt(0),E.charCodeAt(1),E.charCodeAt(2),E.charCodeAt(3)]);var l=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=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]);p.HDLR_TYPES={video:l,audio:s};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);p.STTS=p.STSC=p.STCO=h,p.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),p.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),p.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),p.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);p.FTYP=p.box(p.types.ftyp,f,m,f,c),p.DINF=p.box(p.types.dinf,p.box(p.types.dref,n))},p.box=function(E){for(var l=8,s=arguments.length,n=new Array(s>1?s-1:0),h=1;h<s;h++)n[h-1]=arguments[h];for(var f=n.length,c=f;f--;)l+=n[f].byteLength;var m=new Uint8Array(l);for(m[0]=l>>24&255,m[1]=l>>16&255,m[2]=l>>8&255,m[3]=l&255,m.set(E,4),f=0,l=8;f<c;f++)m.set(n[f],l),l+=n[f].byteLength;return m},p.hdlr=function(E){return p.box(p.types.hdlr,p.HDLR_TYPES[E])},p.mdat=function(E){return p.box(p.types.mdat,E)},p.mdhd=function(E,l){l*=E;var s=Math.floor(l/(D+1)),n=Math.floor(l%(D+1));return p.box(p.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,E>>24&255,E>>16&255,E>>8&255,E&255,s>>24,s>>16&255,s>>8&255,s&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},p.mdia=function(E){return p.box(p.types.mdia,p.mdhd(E.timescale,E.duration),p.hdlr(E.type),p.minf(E))},p.mfhd=function(E){return p.box(p.types.mfhd,new Uint8Array([0,0,0,0,E>>24,E>>16&255,E>>8&255,E&255]))},p.minf=function(E){return E.type==="audio"?p.box(p.types.minf,p.box(p.types.smhd,p.SMHD),p.DINF,p.stbl(E)):p.box(p.types.minf,p.box(p.types.vmhd,p.VMHD),p.DINF,p.stbl(E))},p.moof=function(E,l,s){return p.box(p.types.moof,p.mfhd(E),p.traf(s,l))},p.moov=function(E){for(var l=E.length,s=[];l--;)s[l]=p.trak(E[l]);return p.box.apply(null,[p.types.moov,p.mvhd(E[0].timescale,E[0].duration)].concat(s).concat(p.mvex(E)))},p.mvex=function(E){for(var l=E.length,s=[];l--;)s[l]=p.trex(E[l]);return p.box.apply(null,[p.types.mvex].concat(s))},p.mvhd=function(E,l){l*=E;var s=Math.floor(l/(D+1)),n=Math.floor(l%(D+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,E>>24&255,E>>16&255,E>>8&255,E&255,s>>24,s>>16&255,s>>8&255,s&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 p.box(p.types.mvhd,h)},p.sdtp=function(E){var l=E.samples||[],s=new Uint8Array(4+l.length),n,h;for(n=0;n<l.length;n++)h=l[n].flags,s[n+4]=h.dependsOn<<4|h.isDependedOn<<2|h.hasRedundancy;return p.box(p.types.sdtp,s)},p.stbl=function(E){return p.box(p.types.stbl,p.stsd(E),p.box(p.types.stts,p.STTS),p.box(p.types.stsc,p.STSC),p.box(p.types.stsz,p.STSZ),p.box(p.types.stco,p.STCO))},p.avc1=function(E){var l=[],s=[],n,h,f;for(n=0;n<E.sps.length;n++)h=E.sps[n],f=h.byteLength,l.push(f>>>8&255),l.push(f&255),l=l.concat(Array.prototype.slice.call(h));for(n=0;n<E.pps.length;n++)h=E.pps[n],f=h.byteLength,s.push(f>>>8&255),s.push(f&255),s=s.concat(Array.prototype.slice.call(h));var c=p.box(p.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|E.sps.length].concat(l).concat([E.pps.length]).concat(s))),m=E.width,_=E.height,y=E.pixelRatio[0],i=E.pixelRatio[1];return p.box(p.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,m>>8&255,m&255,_>>8&255,_&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,p.box(p.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),p.box(p.types.pasp,new Uint8Array([y>>24,y>>16&255,y>>8&255,y&255,i>>24,i>>16&255,i>>8&255,i&255])))},p.esds=function(E){var l=E.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(E.config).concat([6,1,2]))},p.mp4a=function(E){var l=E.samplerate;return p.box(p.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,E.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),p.box(p.types.esds,p.esds(E)))},p.mp3=function(E){var l=E.samplerate;return p.box(p.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,E.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},p.stsd=function(E){return E.type==="audio"?!E.isAAC&&E.codec==="mp3"?p.box(p.types.stsd,p.STSD,p.mp3(E)):p.box(p.types.stsd,p.STSD,p.mp4a(E)):p.box(p.types.stsd,p.STSD,p.avc1(E))},p.tkhd=function(E){var l=E.id,s=E.duration*E.timescale,n=E.width,h=E.height,f=Math.floor(s/(D+1)),c=Math.floor(s%(D+1));return p.box(p.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,h>>8&255,h&255,0,0]))},p.traf=function(E,l){var s=p.sdtp(E),n=E.id,h=Math.floor(l/(D+1)),f=Math.floor(l%(D+1));return p.box(p.types.traf,p.box(p.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),p.box(p.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,f>>24,f>>16&255,f>>8&255,f&255])),p.trun(E,s.length+16+20+8+16+8+8),s)},p.trak=function(E){return E.duration=E.duration||4294967295,p.box(p.types.trak,p.tkhd(E),p.mdia(E))},p.trex=function(E){var l=E.id;return p.box(p.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},p.trun=function(E,l){var s=E.samples||[],n=s.length,h=12+16*n,f=new Uint8Array(h),c,m,_,y,i,a;for(l+=8+h,f.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),c=0;c<n;c++)m=s[c],_=m.duration,y=m.size,i=m.flags,a=m.cts,f.set([_>>>24&255,_>>>16&255,_>>>8&255,_&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*c);return p.box(p.types.trun,f)},p.initSegment=function(E){p.types||p.init();var l=p.moov(E),s=new Uint8Array(p.FTYP.byteLength+l.byteLength);return s.set(p.FTYP),s.set(l,p.FTYP.byteLength),s},p}();u.types=void 0,u.HDLR_TYPES=void 0,u.STTS=void 0,u.STSC=void 0,u.STCO=void 0,u.STSZ=void 0,u.VMHD=void 0,u.SMHD=void 0,u.STSD=void 0,u.FTYP=void 0,u.DINF=void 0,d.default=u},"./src/remux/mp4-remuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return a}),T.d(d,"normalizePts",function(){return t});var D=T("./src/polyfills/number.ts"),u=T("./src/remux/aac-helper.ts"),p=T("./src/remux/mp4-generator.ts"),C=T("./src/events.ts"),E=T("./src/errors.ts"),l=T("./src/utils/logger.ts"),s=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(k[v]=b[v])}return k},h.apply(this,arguments)}var f=10*1e3,c=1024,m=1152,_=null,y=null,i=!1,a=function(){function k(b,v,g,w){if(w===void 0&&(w=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=b,this.config=v,this.typeSupported=g,this.ISGenerated=!1,_===null){var M=navigator.userAgent||"",N=M.match(/Chrome\/(\d+)/i);_=N?parseInt(N[1]):0}if(y===null){var I=navigator.userAgent.match(/Safari\/(\d+)/i);y=I?parseInt(I[1]):0}i=!!_&&_<75||!!y&&y<600}var O=k.prototype;return O.destroy=function(){},O.resetTimeStamp=function(v){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=v},O.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(v){var g=!1,w=v.reduce(function(M,N){var I=N.pts-M;return I<-4294967296?(g=!0,t(M,N.pts)):I>0?M:N.pts},v[0].pts);return g&&l.logger.debug("PTS rollover detected"),w},O.remux=function(v,g,w,M,N,I,G,z){var H,K,U,B,V,ae,he=N,pe=N,Re=v.pid>-1,ke=g.pid>-1,ve=g.samples.length,Te=v.samples.length>0,be=ve>1,ue=(!Re||Te)&&(!ke||be)||this.ISGenerated||G;if(ue){this.ISGenerated||(U=this.generateIS(v,g,N));var le=this.isVideoContiguous,re=-1;if(be&&(re=S(g.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(ae=!0,re>0){l.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+ve+" video samples due to a missing keyframe");var fe=this.getVideoStartPts(g.samples);g.samples=g.samples.slice(re),g.dropped+=re,pe+=(g.samples[0].pts-fe)/(g.timescale||9e4)}else re===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+ve+" video samples"),ae=!1);if(this.ISGenerated){if(Te&&be){var q=this.getVideoStartPts(g.samples),ee=t(v.samples[0].pts,q)-q,Ce=ee/g.inputTimeScale;he+=Math.max(0,Ce),pe+=Math.max(0,-Ce)}if(Te){if(v.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(v,g,N)),K=this.remuxAudio(v,he,this.isAudioContiguous,I,ke||be||z===s.PlaylistLevelType.AUDIO?pe:void 0),be){var te=K?K.endPTS-K.startPTS:0;g.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(v,g,N)),H=this.remuxVideo(g,pe,le,te)}}else be&&(H=this.remuxVideo(g,pe,le,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(w.samples.length&&(V=this.remuxID3(w,N)),M.samples.length&&(B=this.remuxText(M,N))),{audio:K,video:H,initSegment:U,independent:ae,text:B,id3:V}},O.generateIS=function(v,g,w){var M=v.samples,N=g.samples,I=this.typeSupported,G={},z=!Object(D.isFiniteNumber)(this._initPTS),H="audio/mp4",K,U,B;if(z&&(K=U=Infinity),v.config&&M.length&&(v.timescale=v.samplerate,v.isAAC||(I.mpeg?(H="audio/mpeg",v.codec=""):I.mp3&&(v.codec="mp3")),G.audio={id:"audio",container:H,codec:v.codec,initSegment:!v.isAAC&&I.mpeg?new Uint8Array(0):p.default.initSegment([v]),metadata:{channelCount:v.channelCount}},z&&(B=v.inputTimeScale,K=U=M[0].pts-Math.round(B*w))),g.sps&&g.pps&&N.length&&(g.timescale=g.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:g.codec,initSegment:p.default.initSegment([g]),metadata:{width:g.width,height:g.height}},z)){B=g.inputTimeScale;var V=this.getVideoStartPts(N),ae=Math.round(B*w);U=Math.min(U,t(N[0].dts,V)-ae),K=Math.min(K,V-ae)}if(Object.keys(G).length)return this.ISGenerated=!0,z&&(this._initPTS=K,this._initDTS=U),{tracks:G,initPTS:K,timescale:B}},O.remuxVideo=function(v,g,w,M){var N=v.inputTimeScale,I=v.samples,G=[],z=I.length,H=this._initPTS,K=this.nextAvcDts,U=8,B,V,ae,he=Number.POSITIVE_INFINITY,pe=Number.NEGATIVE_INFINITY,Re=0,ke=!1;if(!w||K===null){var ve=g*N,Te=I[0].pts-t(I[0].dts,I[0].pts);K=ve-Te}for(var be=0;be<z;be++){var ue=I[be];if(ue.pts=t(ue.pts-H,K),ue.dts=t(ue.dts-H,K),ue.dts>ue.pts){var le=9e4*.2;Re=Math.max(Math.min(Re,ue.pts-ue.dts),-1*le)}ue.dts<I[be>0?be-1:be].dts&&(ke=!0)}ke&&I.sort(function(mr,hr){var St=mr.dts-hr.dts,$r=mr.pts-hr.pts;return St||$r}),V=I[0].dts,ae=I[I.length-1].dts;var re=Math.round((ae-V)/(z-1));if(Re<0){if(Re<re*-2){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-re,!0)+" ms");for(var fe=Re,q=0;q<z;q++)I[q].dts=fe=Math.max(fe,I[q].pts-re),I[q].pts=Math.max(fe,I[q].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Re,!0)+" ms to overcome this issue");for(var ee=0;ee<z;ee++)I[ee].dts=I[ee].dts+Re}V=I[0].dts}if(w){var Ce=V-K,te=Ce>re,J=Ce<-1;if(te||J){te?l.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms ("+Ce+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Ce,!0)+" ms ("+Ce+"dts) overlapping between fragments detected"),V=K;var X=I[0].pts-Ce;I[0].dts=V,I[0].pts=X,l.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(X,!0)+"/"+Object(n.toMsFromMpegTsClock)(V,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms")}}i&&(V=Math.max(0,V));for(var Q=0,Ee=0,ge=0;ge<z;ge++){for(var Oe=I[ge],Qe=Oe.units,rt=Qe.length,nt=0,ut=0;ut<rt;ut++)nt+=Qe[ut].data.length;Ee+=nt,Q+=rt,Oe.length=nt,Oe.dts=Math.max(Oe.dts,V),Oe.pts=Math.max(Oe.pts,Oe.dts,0),he=Math.min(Oe.pts,he),pe=Math.max(Oe.pts,pe)}ae=I[z-1].dts;var dt=Ee+4*Q+8,mt;try{mt=new Uint8Array(dt)}catch(mr){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:E.ErrorTypes.MUX_ERROR,details:E.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:dt,reason:"fail allocating video mdat "+dt});return}var He=new DataView(mt.buffer);He.setUint32(0,dt),mt.set(p.default.types.mdat,4);for(var De=0;De<z;De++){for(var at=I[De],ht=at.units,Ze=0,st=0,Ue=ht.length;st<Ue;st++){var Me=ht[st],Ne=Me.data,xe=Me.data.byteLength;He.setUint32(U,xe),U+=4,mt.set(Ne,U),U+=xe,Ze+=4+xe}if(De<z-1)B=I[De+1].dts-at.dts;else{var Se=this.config,Ae=at.dts-I[De>0?De-1:De].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(Se.maxBufferHole*N),Je=(M?he+M*N:this.nextAudioPts)-at.pts;Je>Le?(B=Je-Ae,B<0&&(B=Ae),l.logger.log("[mp4-remuxer]: It is approximately "+Je/90+" ms to the next segment; using duration "+B/90+" ms for the last video frame.")):B=Ae}else B=Ae}var Ve=Math.round(at.pts-at.dts);G.push(new x(at.key,B,Ze,Ve))}if(G.length&&_&&_<70){var gt=G[0].flags;gt.dependsOn=2,gt.isNonSync=0}console.assert(B!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=ae+B,this.isVideoContiguous=!0;var yt=p.default.moof(v.sequenceNumber++,V,h({},v,{samples:G})),Bt="video",Nt={data1:yt,data2:mt,startPTS:he/N,endPTS:(pe+B)/N,startDTS:V/N,endDTS:K/N,type:Bt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:v.dropped};return v.samples=[],v.dropped=0,console.assert(mt.length,"MDAT length must not be zero"),Nt},O.remuxAudio=function(v,g,w,M,N){var I=v.inputTimeScale,G=v.samplerate?v.samplerate:I,z=I/G,H=v.isAAC?c:m,K=H*z,U=this._initPTS,B=!v.isAAC&&this.typeSupported.mpeg,V=[],ae=v.samples,he=B?0:8,pe=this.nextAudioPts||-1,Re=g*I;if(this.isAudioContiguous=w=w||ae.length&&pe>0&&(M&&Math.abs(Re-pe)<9e3||Math.abs(t(ae[0].pts-U,Re)-pe)<20*K),ae.forEach(function(Ne){Ne.pts=t(Ne.pts-U,Re)}),!w||pe<0){if(ae=ae.filter(function(Ne){return Ne.pts>=0}),!ae.length)return;N===0?pe=0:M?pe=Math.max(0,Re):pe=ae[0].pts}if(v.isAAC)for(var ke=N!==void 0,ve=this.config.maxAudioFramesDrift,Te=0,be=pe;Te<ae.length;Te++){var ue=ae[Te],le=ue.pts,re=le-be,fe=Math.abs(1e3*re/I);if(re<=-ve*K&&ke)Te===0&&(l.logger.warn("Audio frame @ "+(le/I).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/I)+" ms."),this.nextAudioPts=pe=be=le);else if(re>=ve*K&&fe<f&&ke){var q=Math.round(re/K);be=le-q*K,be<0&&(q--,be+=K),Te===0&&(this.nextAudioPts=pe=be),l.logger.warn("[mp4-remuxer]: Injecting "+q+" audio frame @ "+(be/I).toFixed(3)+"s due to "+Math.round(1e3*re/I)+" ms gap.");for(var ee=0;ee<q;ee++){var Ce=Math.max(be,0),te=u.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);te||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),te=ue.unit.subarray()),ae.splice(Te,0,{unit:te,pts:Ce}),be+=K,Te++}}ue.pts=be,be+=K}for(var J=null,X=null,Q,Ee=0,ge=ae.length;ge--;)Ee+=ae[ge].unit.byteLength;for(var Oe=0,Qe=ae.length;Oe<Qe;Oe++){var rt=ae[Oe],nt=rt.unit,ut=rt.pts;if(X!==null){var dt=V[Oe-1];dt.duration=Math.round((ut-X)/z)}else if(w&&v.isAAC&&(ut=pe),J=ut,Ee>0){Ee+=he;try{Q=new Uint8Array(Ee)}catch(Ne){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:E.ErrorTypes.MUX_ERROR,details:E.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ee,reason:"fail allocating audio mdat "+Ee});return}if(!B){var mt=new DataView(Q.buffer);mt.setUint32(0,Ee),Q.set(p.default.types.mdat,4)}}else return;Q.set(nt,he);var He=nt.byteLength;he+=He,V.push(new x(!0,H,He,0)),X=ut}var De=V.length;if(!De)return;var at=V[V.length-1];this.nextAudioPts=pe=X+z*at.duration;var ht=B?new Uint8Array(0):p.default.moof(v.sequenceNumber++,J/z,h({},v,{samples:V}));v.samples=[];var Ze=J/I,st=pe/I,Ue="audio",Me={data1:ht,data2:Q,startPTS:Ze,endPTS:st,startDTS:Ze,endDTS:st,type:Ue,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Me},O.remuxEmptyAudio=function(v,g,w,M){var N=v.inputTimeScale,I=v.samplerate?v.samplerate:N,G=N/I,z=this.nextAudioPts,H=(z!==null?z:M.startDTS*N)+this._initDTS,K=M.endDTS*N+this._initDTS,U=G*c,B=Math.ceil((K-H)/U),V=u.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),!V){l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ae=[],he=0;he<B;he++){var pe=H+he*U;ae.push({unit:V,pts:pe,dts:pe})}return v.samples=ae,this.remuxAudio(v,g,w,!1)},O.remuxID3=function(v,g){var w=v.samples.length;if(!w)return;for(var M=v.inputTimeScale,N=this._initPTS,I=this._initDTS,G=0;G<w;G++){var z=v.samples[G];z.pts=t(z.pts-N,g*M)/M,z.dts=t(z.dts-I,g*M)/M}var H=v.samples;return v.samples=[],{samples:H}},O.remuxText=function(v,g){var w=v.samples.length;if(!w)return;for(var M=v.inputTimeScale,N=this._initPTS,I=0;I<w;I++){var G=v.samples[I];G.pts=t(G.pts-N,g*M)/M}v.samples.sort(function(H,K){return H.pts-K.pts});var z=v.samples;return v.samples=[],{samples:z}},k}();function t(k,O){var b;if(O===null)return k;for(O<k?b=-8589934592:b=8589934592;Math.abs(k-O)>4294967296;)k+=b;return k}function S(k){for(var O=0;O<k.length;O++)if(k[O].key)return O;return-1}var x=function(O,b,v,g){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=v,this.cts=g,this.flags=new o(O)},o=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(P,d,T){"use strict";T.r(d);var D=T("./src/polyfills/number.ts"),u=T("./src/utils/mp4-tools.ts"),p=T("./src/loader/fragment.ts"),C=T("./src/utils/logger.ts"),E=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 h=n.prototype;return h.destroy=function(){},h.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},h.resetNextTimestamp=function(){this.lastEndDTS=null},h.resetInitSegment=function(c,m,_){this.audioCodec=m,this.videoCodec=_,this.generateInitSegment(c),this.emitInitSegment=!0},h.generateInitSegment=function(c){var m=this.audioCodec,_=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var y=this.initData=Object(u.parseInitSegment)(c);m||(m=s(y.audio,p.ElementaryStreamTypes.AUDIO)),_||(_=s(y.video,p.ElementaryStreamTypes.VIDEO));var i={};y.audio&&y.video?i.audiovideo={container:"video/mp4",codec:m+","+_,initSegment:c,id:"main"}:y.audio?i.audio={container:"audio/mp4",codec:m,initSegment:c,id:"audio"}:y.video?i.video={container:"video/mp4",codec:_,initSegment:c,id:"main"}:C.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},h.remux=function(c,m,_,y,i){var a=this.initPTS,t=this.lastEndDTS,S={audio:void 0,video:void 0,text:y,id3:_,initSegment:void 0};Object(D.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var x=m.samples;if(!x||!x.length)return S;var o={initPTS:void 0,timescale:1},k=this.initData;if((!k||!k.length)&&(this.generateInitSegment(x),k=this.initData),!k||!k.length)return C.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(o.tracks=this.initTracks,this.emitInitSegment=!1),Object(D.isFiniteNumber)(a)||(this.initPTS=o.initPTS=a=l(k,x,t));var O=Object(u.getDuration)(x,k),b=t,v=O+b;Object(u.offsetStartDTS)(k,x,a),O>0?this.lastEndDTS=v:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var g=!!k.audio,w=!!k.video,M="";g&&(M+="audio"),w&&(M+="video");var N={data1:x,startPTS:b,startDTS:b,endPTS:v,endDTS:v,type:M,hasAudio:g,hasVideo:w,nb:1,dropped:0};return S.audio=N.type==="audio"?N:void 0,S.video=N.type!=="audio"?N:void 0,S.text=y,S.id3=_,S.initSegment=o,S},n}(),l=function(h,f,c){return Object(u.getStartDTS)(h,f)-c};function s(n,h){var f=n==null?void 0:n.codec;return f&&f.length>4?f:f==="hvc1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||h===p.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}d.default=E},"./src/task-loop.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function u(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var p=u.prototype;return p.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},p.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},p.onHandlerDestroyed=function(){},p.hasInterval=function(){return!!this._tickInterval},p.hasNextTick=function(){return!!this._tickTimer},p.setInterval=function(E){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,E),!0)},p.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},p.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},p.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},p.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},p.doTick=function(){},u}()},"./src/types/cmcd.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"CMCDVersion",function(){return D}),T.d(d,"CMCDObjectType",function(){return u}),T.d(d,"CMCDStreamingFormat",function(){return p}),T.d(d,"CMCDStreamType",function(){return C});var D=1,u;(function(E){E.MANIFEST="m",E.AUDIO="a",E.VIDEO="v",E.MUXED="av",E.INIT="i",E.CAPTION="c",E.TIMED_TEXT="tt",E.KEY="k",E.OTHER="o"})(u||(u={}));var p;(function(E){E.DASH="d",E.HLS="h",E.SMOOTH="s",E.OTHER="o"})(p||(p={}));var C;(function(E){E.VOD="v",E.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"HlsSkip",function(){return p}),T.d(d,"getSkipValue",function(){return C}),T.d(d,"HlsUrlParameters",function(){return E}),T.d(d,"Level",function(){return l});function D(s,n){for(var h=0;h<n.length;h++){var f=n[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}function u(s,n,h){return n&&D(s.prototype,n),h&&D(s,h),s}var p;(function(s){s.No="",s.Yes="YES",s.v2="v2"})(p||(p={}));function C(s,n){var h=s.canSkipUntil,f=s.canSkipDateRanges,c=s.endSN,m=n!==void 0?n-c:0;return h&&m<h?f?p.v2:p.Yes:p.No}var E=function(){function s(h,f,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=h,this.part=f,this.skip=c}var n=s.prototype;return n.addDirectives=function(f){var c=new self.URL(f);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},s}(),l=function(){function s(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(h){return h}).join(",").replace(/\.[^.,]+/g,"")}return u(s,[{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(h){var f=h%this.url.length;this._urlId!==f&&(this.details=void 0,this._urlId=f)}}]),s}()},"./src/types/loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"PlaylistContextType",function(){return D}),T.d(d,"PlaylistLevelType",function(){return u});var D;(function(p){p.MANIFEST="manifest",p.LEVEL="level",p.AUDIO_TRACK="audioTrack",p.SUBTITLE_TRACK="subtitleTrack"})(D||(D={}));var u;(function(p){p.MAIN="main",p.AUDIO="audio",p.SUBTITLE="subtitle"})(u||(u={}))},"./src/types/transmuxer.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"ChunkMetadata",function(){return D});var D=function(C,E,l,s,n,h){s===void 0&&(s=0),n===void 0&&(n=-1),h===void 0&&(h=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=u(),this.buffering={audio:u(),video:u(),audiovideo:u()},this.level=C,this.sn=E,this.id=l,this.size=s,this.part=n,this.partial=h};function u(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"AttrList",function(){return p});var D=/^(\d+)x(\d+)$/,u=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,p=function(){function C(l){typeof l=="string"&&(l=C.parseAttrList(l));for(var s in l)l.hasOwnProperty(s)&&(this[s]=l[s])}var E=C.prototype;return E.decimalInteger=function(s){var n=parseInt(this[s],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},E.hexadecimalInteger=function(s){if(this[s]){var n=(this[s]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var h=new Uint8Array(n.length/2),f=0;f<n.length/2;f++)h[f]=parseInt(n.slice(f*2,f*2+2),16);return h}else return null},E.hexadecimalIntegerAsNumber=function(s){var n=parseInt(this[s],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},E.decimalFloatingPoint=function(s){return parseFloat(this[s])},E.optionalFloat=function(s,n){var h=this[s];return h?parseFloat(h):n},E.enumeratedString=function(s){return this[s]},E.bool=function(s){return this[s]==="YES"},E.decimalResolution=function(s){var n=D.exec(this[s]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},C.parseAttrList=function(s){var n,h={},f='"';for(u.lastIndex=0;(n=u.exec(s))!==null;){var c=n[2];c.indexOf(f)===0&&c.lastIndexOf(f)===c.length-1&&(c=c.slice(1,-1)),h[n[1]]=c}return h},C}()},"./src/utils/binary-search.ts":function(P,d,T){"use strict";T.r(d);var D={search:function(p,C){for(var E=0,l=p.length-1,s=null,n=null;E<=l;){s=(E+l)/2|0,n=p[s];var h=C(n);if(h>0)E=s+1;else if(h<0)l=s-1;else return n}return null}};d.default=D},"./src/utils/buffer-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"BufferHelper",function(){return p});var D=T("./src/utils/logger.ts"),u={length:0,start:function(){return 0},end:function(){return 0}},p=function(){function C(){}return C.isBuffered=function(l,s){try{if(l){for(var n=C.getBuffered(l),h=0;h<n.length;h++)if(s>=n.start(h)&&s<=n.end(h))return!0}}catch(f){}return!1},C.bufferInfo=function(l,s,n){try{if(l){var h=C.getBuffered(l),f=[],c;for(c=0;c<h.length;c++)f.push({start:h.start(c),end:h.end(c)});return this.bufferedInfo(f,s,n)}}catch(m){}return{len:0,start:s,end:s,nextStart:void 0}},C.bufferedInfo=function(l,s,n){s=Math.max(0,s),l.sort(function(o,k){var O=o.start-k.start;return O||k.end-o.end});var h=[];if(n)for(var f=0;f<l.length;f++){var c=h.length;if(c){var m=h[c-1].end;l[f].start-m<n?l[f].end>m&&(h[c-1].end=l[f].end):h.push(l[f])}else h.push(l[f])}else h=l;for(var _=0,y,i=s,a=s,t=0;t<h.length;t++){var S=h[t].start,x=h[t].end;if(s+n>=S&&s<x)i=S,a=x,_=a-s;else if(s+n<S){y=S;break}}return{len:_,start:i||0,end:a||0,nextStart:y}},C.getBuffered=function(l){try{return l.buffered}catch(s){return D.logger.log("failed to get media.buffered",s),u}},C}()},"./src/utils/cea-608-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"Row",function(){return a}),T.d(d,"CaptionScreen",function(){return t});var D=T("./src/utils/logger.ts"),u={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},p=function(v){var g=v;return u.hasOwnProperty(v)&&(g=u[v]),String.fromCharCode(g)},C=15,E=100,l={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},s={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},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},f=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(c||(c={}));var m=function(){function b(){this.time=null,this.verboseLevel=c.ERROR}var v=b.prototype;return v.log=function(w,M){this.verboseLevel>=w&&D.logger.log(this.time+" ["+w+"] "+M)},b}(),_=function(v){for(var g=[],w=0;w<v.length;w++)g.push(v[w].toString(16));return g},y=function(){function b(g,w,M,N,I){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=g||"white",this.underline=w||!1,this.italics=M||!1,this.background=N||"black",this.flash=I||!1}var v=b.prototype;return v.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},v.setStyles=function(w){for(var M=["foreground","underline","italics","background","flash"],N=0;N<M.length;N++){var I=M[N];w.hasOwnProperty(I)&&(this[I]=w[I])}},v.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},v.equals=function(w){return this.foreground===w.foreground&&this.underline===w.underline&&this.italics===w.italics&&this.background===w.background&&this.flash===w.flash},v.copy=function(w){this.foreground=w.foreground,this.underline=w.underline,this.italics=w.italics,this.background=w.background,this.flash=w.flash},v.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),i=function(){function b(g,w,M,N,I,G){this.uchar=void 0,this.penState=void 0,this.uchar=g||" ",this.penState=new y(w,M,N,I,G)}var v=b.prototype;return v.reset=function(){this.uchar=" ",this.penState.reset()},v.setChar=function(w,M){this.uchar=w,this.penState.copy(M)},v.setPenState=function(w){this.penState.copy(w)},v.equals=function(w){return this.uchar===w.uchar&&this.penState.equals(w.penState)},v.copy=function(w){this.uchar=w.uchar,this.penState.copy(w.penState)},v.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),a=function(){function b(g){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var w=0;w<E;w++)this.chars.push(new i);this.logger=g,this.pos=0,this.currPenState=new y}var v=b.prototype;return v.equals=function(w){for(var M=!0,N=0;N<E;N++)if(!this.chars[N].equals(w.chars[N])){M=!1;break}return M},v.copy=function(w){for(var M=0;M<E;M++)this.chars[M].copy(w.chars[M])},v.isEmpty=function(){for(var w=!0,M=0;M<E;M++)if(!this.chars[M].isEmpty()){w=!1;break}return w},v.setCursor=function(w){this.pos!==w&&(this.pos=w),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>E&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=E)},v.moveCursor=function(w){var M=this.pos+w;if(w>1)for(var N=this.pos+1;N<M+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(M)},v.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},v.insertChar=function(w){w>=144&&this.backSpace();var M=p(w);if(this.pos>=E){this.logger.log(c.ERROR,"Cannot insert "+w.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},v.clearFromPos=function(w){var M;for(M=w;M<E;M++)this.chars[M].reset()},v.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},v.clearToEndOfRow=function(){this.clearFromPos(this.pos)},v.getTextString=function(){for(var w=[],M=!0,N=0;N<E;N++){var I=this.chars[N].uchar;I!==" "&&(M=!1),w.push(I)}return M?"":w.join("")},v.setPenStyles=function(w){this.currPenState.setStyles(w);var M=this.chars[this.pos];M.setPenState(this.currPenState)},b}(),t=function(){function b(g){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var w=0;w<C;w++)this.rows.push(new a(g));this.logger=g,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var v=b.prototype;return v.reset=function(){for(var w=0;w<C;w++)this.rows[w].clear();this.currRow=C-1},v.equals=function(w){for(var M=!0,N=0;N<C;N++)if(!this.rows[N].equals(w.rows[N])){M=!1;break}return M},v.copy=function(w){for(var M=0;M<C;M++)this.rows[M].copy(w.rows[M])},v.isEmpty=function(){for(var w=!0,M=0;M<C;M++)if(!this.rows[M].isEmpty()){w=!1;break}return w},v.backSpace=function(){var w=this.rows[this.currRow];w.backSpace()},v.clearToEndOfRow=function(){var w=this.rows[this.currRow];w.clearToEndOfRow()},v.insertChar=function(w){var M=this.rows[this.currRow];M.insertChar(w)},v.setPen=function(w){var M=this.rows[this.currRow];M.setPenStyles(w)},v.moveCursor=function(w){var M=this.rows[this.currRow];M.moveCursor(w)},v.setCursor=function(w){this.logger.log(c.INFO,"setCursor: "+w);var M=this.rows[this.currRow];M.setCursor(w)},v.setPAC=function(w){this.logger.log(c.INFO,"pacData = "+JSON.stringify(w));var M=w.row-1;if(this.nrRollUpRows&&M<this.nrRollUpRows-1&&(M=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==M){for(var N=0;N<C;N++)this.rows[N].clear();var I=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var z=G.rows[I].cueStartTime,H=this.logger.time;if(z&&H!==null&&z<H)for(var K=0;K<this.nrRollUpRows;K++)this.rows[M-this.nrRollUpRows+K+1].copy(G.rows[I+K])}}this.currRow=M;var U=this.rows[this.currRow];if(w.indent!==null){var B=w.indent,V=Math.max(B-1,0);U.setCursor(w.indent),w.color=U.chars[V].penState.foreground}var ae={foreground:w.color,underline:w.underline,italics:w.italics,background:"black",flash:!1};this.setPen(ae)},v.setBkgData=function(w){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(w)),this.backSpace(),this.setPen(w),this.insertChar(32)},v.setRollUpRows=function(w){this.nrRollUpRows=w},v.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var w=this.currRow+1-this.nrRollUpRows,M=this.rows.splice(w,1)[0];M.clear(),this.rows.splice(this.currRow,0,M),this.logger.log(c.INFO,"Rolling up")},v.getDisplayText=function(w){w=w||!1;for(var M=[],N="",I=-1,G=0;G<C;G++){var z=this.rows[G].getTextString();z&&(I=G+1,w?M.push("Row "+I+": '"+z+"'"):M.push(z.trim()))}return M.length>0&&(w?N="["+M.join(" | ")+"]":N=M.join(`
`)),N},v.getTextAndFormat=function(){return this.rows},b}(),S=function(){function b(g,w,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=g,this.outputFilter=w,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var v=b.prototype;return v.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},v.getHandler=function(){return this.outputFilter},v.setHandler=function(w){this.outputFilter=w},v.setPAC=function(w){this.writeScreen.setPAC(w)},v.setBkgData=function(w){this.writeScreen.setBkgData(w)},v.setMode=function(w){if(w===this.mode)return;this.mode=w,this.logger.log(c.INFO,"MODE="+w),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=w},v.insertChars=function(w){for(var M=0;M<w.length;M++)this.writeScreen.insertChar(w[M]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,N+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},v.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},v.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},v.ccAOF=function(){},v.ccAON=function(){},v.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},v.ccRU=function(w){this.logger.log(c.INFO,"RU("+w+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(w)},v.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},v.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},v.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},v.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},v.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},v.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},v.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},v.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var w=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=w,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},v.ccTO=function(w){this.logger.log(c.INFO,"TO("+w+") - Tab Offset"),this.writeScreen.moveCursor(w)},v.ccMIDROW=function(w){var M={flash:!1};if(M.underline=w%2===1,M.italics=w>=46,M.italics)M.foreground="white";else{var N=Math.floor(w/2)-16,I=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=I[N]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},v.outputDataUpdate=function(w){w===void 0&&(w=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),w&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},v.cueSplitAtTime=function(w){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,w,this.displayedMemory),this.cueStartTime=w))},b}(),x=function(){function b(g,w,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new m;this.channels=[null,new S(g,w,N),new S(g+1,M,N)],this.cmdHistory=O(),this.logger=N}var v=b.prototype;return v.getHandler=function(w){return this.channels[w].getHandler()},v.setHandler=function(w,M){this.channels[w].setHandler(M)},v.addData=function(w,M){var N,I,G,z=!1;this.logger.time=w;for(var H=0;H<M.length;H+=2){if(I=M[H]&127,G=M[H+1]&127,I===0&&G===0)continue;if(this.logger.log(c.DATA,"["+_([M[H],M[H+1]])+"] -> ("+_([I,G])+")"),N=this.parseCmd(I,G),N||(N=this.parseMidrow(I,G)),N||(N=this.parsePAC(I,G)),N||(N=this.parseBackgroundAttributes(I,G)),!N&&(z=this.parseChars(I,G),z)){var K=this.currentChannel;if(K&&K>0){var U=this.channels[K];U.insertChars(z)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!z&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+_([I,G])+" orig: "+_([M[H],M[H+1]]))}},v.parseCmd=function(w,M){var N=this.cmdHistory,I=(w===20||w===28||w===21||w===29)&&M>=32&&M<=47,G=(w===23||w===31)&&M>=33&&M<=35;if(!(I||G))return!1;if(k(w,M,N))return o(null,null,N),this.logger.log(c.DEBUG,"Repeated command ("+_([w,M])+") is dropped"),!0;var z=w===20||w===21||w===23?1:2,H=this.channels[z];return w===20||w===21||w===28||w===29?M===32?H.ccRCL():M===33?H.ccBS():M===34?H.ccAOF():M===35?H.ccAON():M===36?H.ccDER():M===37?H.ccRU(2):M===38?H.ccRU(3):M===39?H.ccRU(4):M===40?H.ccFON():M===41?H.ccRDC():M===42?H.ccTR():M===43?H.ccRTD():M===44?H.ccEDM():M===45?H.ccCR():M===46?H.ccENM():M===47&&H.ccEOC():H.ccTO(M-32),o(w,M,N),this.currentChannel=z,!0},v.parseMidrow=function(w,M){var N=0;if((w===17||w===25)&&M>=32&&M<=47){if(w===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var I=this.channels[N];return I?(I.ccMIDROW(M),this.logger.log(c.DEBUG,"MIDROW ("+_([w,M])+")"),!0):!1}return!1},v.parsePAC=function(w,M){var N,I=this.cmdHistory,G=(w>=17&&w<=23||w>=25&&w<=31)&&M>=64&&M<=127,z=(w===16||w===24)&&M>=64&&M<=95;if(!(G||z))return!1;if(k(w,M,I))return o(null,null,I),!0;var H=w<=23?1:2;M>=64&&M<=95?N=H===1?l[w]:n[w]:N=H===1?s[w]:h[w];var K=this.channels[H];return K?(K.setPAC(this.interpretPAC(N,M)),o(w,M,I),this.currentChannel=H,!0):!1},v.interpretPAC=function(w,M){var N,I={color:null,italics:!1,indent:null,underline:!1,row:w};return M>95?N=M-96:N=M-64,I.underline=(N&1)===1,N<=13?I.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(I.italics=!0,I.color="white"):I.indent=Math.floor((N-16)/2)*4,I},v.parseChars=function(w,M){var N,I=null,G=null;if(w>=25?(N=2,G=w-8):(N=1,G=w),G>=17&&G<=19){var z;G===17?z=M+80:G===18?z=M+112:z=M+144,this.logger.log(c.INFO,"Special char '"+p(z)+"' in channel "+N),I=[z]}else w>=32&&w<=127&&(I=M===0?[w]:[w,M]);if(I){var H=_(I);this.logger.log(c.DEBUG,"Char codes = "+H.join(",")),o(w,M,this.cmdHistory)}return I},v.parseBackgroundAttributes=function(w,M){var N=(w===16||w===24)&&M>=32&&M<=47,I=(w===23||w===31)&&M>=45&&M<=47;if(!(N||I))return!1;var G,z={};w===16||w===24?(G=Math.floor((M-32)/2),z.background=f[G],M%2===1&&(z.background=z.background+"_semi")):M===45?z.background="transparent":(z.foreground="black",M===47&&(z.underline=!0));var H=w<=23?1:2,K=this.channels[H];return K.setBkgData(z),o(w,M,this.cmdHistory),!0},v.reset=function(){for(var w=0;w<Object.keys(this.channels).length;w++){var M=this.channels[w];M&&M.reset()}this.cmdHistory=O()},v.cueSplitAtTime=function(w){for(var M=0;M<this.channels.length;M++){var N=this.channels[M];N&&N.cueSplitAtTime(w)}},b}();function o(b,v,g){g.a=b,g.b=v}function k(b,v,g){return g.a===b&&g.b===v}function O(){return{a:null,b:null}}d.default=x},"./src/utils/codecs.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"isCodecType",function(){return u}),T.d(d,"isCodecSupportedInMp4",function(){return p});var D={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function u(C,E){var l=D[E];return!!l&&l[C.slice(0,4)]===!0}function p(C,E){return MediaSource.isTypeSupported((E||"video")+'/mp4;codecs="'+C+'"')}},"./src/utils/cues.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/vttparser.ts"),u=T("./src/utils/webvtt-parser.ts"),p=T("./src/utils/texttrack-utils.ts"),C=/\s/,E={newCue:function(s,n,h,f){for(var c=[],m,_,y,i,a,t=self.VTTCue||self.TextTrackCue,S=0;S<f.rows.length;S++)if(m=f.rows[S],y=!0,i=0,a="",!m.isEmpty()){for(var x=0;x<m.chars.length;x++)C.test(m.chars[x].uchar)&&y?i++:(a+=m.chars[x].uchar,y=!1);m.cueStartTime=n,n===h&&(h+=1e-4),i>=16?i--:i++;var o=Object(D.fixLineBreaks)(a.trim()),k=Object(u.generateCueId)(n,h,o);(!s||!s.cues||!s.cues.getCueById(k))&&(_=new t(n,h,o),_.id=k,_.line=S+1,_.align="left",_.position=10+Math.min(80,Math.floor(i*8/32)*10),c.push(_))}return s&&c.length&&(c.sort(function(O,b){return O.line==="auto"||b.line==="auto"?0:O.line>8&&b.line>8?b.line-O.line:O.line-b.line}),c.forEach(function(O){return Object(p.addCueToTrack)(s,O)})),c}};d.default=E},"./src/utils/discontinuities.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"findFirstFragWithCC",function(){return C}),T.d(d,"shouldAlignOnDiscontinuities",function(){return E}),T.d(d,"findDiscontinuousReferenceFrag",function(){return l}),T.d(d,"adjustSlidingStart",function(){return n}),T.d(d,"alignStream",function(){return h}),T.d(d,"alignPDT",function(){return c}),T.d(d,"alignFragmentByPDTDelta",function(){return m}),T.d(d,"alignMediaPlaylistByPDT",function(){return _});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/logger.ts"),p=T("./src/controller/level-helper.ts");function C(y,i){for(var a=null,t=0,S=y.length;t<S;t++){var x=y[t];if(x&&x.cc===i){a=x;break}}return a}function E(y,i,a){return!!(i.details&&(a.endCC>a.startCC||y&&y.cc<a.startCC))}function l(y,i){var a=y.fragments,t=i.fragments;if(!t.length||!a.length){u.logger.log("No fragments to align");return}var S=C(a,t[0].cc);if(!S||S&&!S.startPTS){u.logger.log("No frag in previous level to align on");return}return S}function s(y,i){if(y){var a=y.start+i;y.start=y.startPTS=a,y.endPTS=a+y.duration}}function n(y,i){for(var a=i.fragments,t=0,S=a.length;t<S;t++)s(a[t],y);i.fragmentHint&&s(i.fragmentHint,y),i.alignedSliding=!0}function h(y,i,a){if(!i)return;f(y,a,i),!a.alignedSliding&&i.details&&c(a,i.details),!a.alignedSliding&&i.details&&!a.skippedSegments&&Object(p.adjustSliding)(i.details,a)}function f(y,i,a){if(E(y,a,i)){var t=l(a.details,i);t&&Object(D.isFiniteNumber)(t.start)&&(u.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),n(t.start,i))}}function c(y,i){if(!i.fragments.length||!y.hasProgramDateTime||!i.hasProgramDateTime)return;var a=i.fragments[0].programDateTime,t=y.fragments[0].programDateTime,S=(t-a)/1e3+i.fragments[0].start;S&&Object(D.isFiniteNumber)(S)&&(u.logger.log("Adjusting PTS using programDateTime delta "+(t-a)+"ms, sliding:"+S.toFixed(3)+" "+y.url+" "),n(S,y))}function m(y,i){var a=y.programDateTime;if(!a)return;var t=(a-i)/1e3;y.start=y.startPTS=t,y.endPTS=t+y.duration}function _(y,i){if(!i.fragments.length||!y.hasProgramDateTime||!i.hasProgramDateTime)return;var a=i.fragments[0].programDateTime,t=i.fragments[0].start,S=a-t*1e3;y.fragments.forEach(function(x){m(x,S)}),y.fragmentHint&&m(y.fragmentHint,S),y.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/ewma.ts"),u=function(){function p(E,l,s){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new D.default(E),this.fast_=new D.default(l)}var C=p.prototype;return C.update=function(l,s){var n=this.slow_,h=this.fast_;this.slow_.halfLife!==l&&(this.slow_=new D.default(l,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==s&&(this.fast_=new D.default(s,h.getEstimate(),h.getTotalWeight()))},C.sample=function(l,s){l=Math.max(l,this.minDelayMs_);var n=8*s,h=l/1e3,f=n/h;this.fast_.sample(h,f),this.slow_.sample(h,f)},C.canEstimate=function(){var l=this.fast_;return l&&l.getTotalWeight()>=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},p}();d.default=u},"./src/utils/ewma.ts":function(P,d,T){"use strict";T.r(d);var D=function(){function u(C,E,l){E===void 0&&(E=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=E,this.totalWeight_=l}var p=u.prototype;return p.sample=function(E,l){var s=Math.pow(this.alpha_,E);this.estimate_=l*(1-s)+s*this.estimate_,this.totalWeight_+=E},p.getTotalWeight=function(){return this.totalWeight_},p.getEstimate=function(){if(this.alpha_){var E=1-Math.pow(this.alpha_,this.totalWeight_);if(E)return this.estimate_/E}return this.estimate_},u}();d.default=D},"./src/utils/fetch-loader.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"fetchSupported",function(){return m});var D=T("./src/polyfills/number.ts"),u=T("./src/loader/load-stats.ts"),p=T("./src/demux/chunk-cache.ts");function C(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,h(t,S)}function E(t){var S=typeof Map=="function"?new Map:void 0;return E=function(o){if(o===null||!n(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(o))return S.get(o);S.set(o,k)}function k(){return l(o,arguments,f(this).constructor)}return k.prototype=Object.create(o.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),h(k,o)},E(t)}function l(t,S,x){return s()?l=Reflect.construct:l=function(k,O,b){var v=[null];v.push.apply(v,O);var g=Function.bind.apply(k,v),w=new g;return b&&h(w,b.prototype),w},l.apply(null,arguments)}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function h(t,S){return h=Object.setPrototypeOf||function(o,k){return o.__proto__=k,o},h(t,S)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},f(t)}function c(){return c=Object.assign||function(t){for(var S=1;S<arguments.length;S++){var x=arguments[S];for(var o in x)Object.prototype.hasOwnProperty.call(x,o)&&(t[o]=x[o])}return t},c.apply(this,arguments)}function m(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var _=function(){function t(x){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=x.fetchSetup||i,this.controller=new self.AbortController,this.stats=new u.LoadStats}var S=t.prototype;return S.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},S.abortInternal=function(){var o=this.response;(!o||!o.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var o;this.abortInternal(),(o=this.callbacks)!==null&&o!==void 0&&o.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(o,k,O){var b=this,v=this.stats;if(v.loading.start)throw new Error("Loader can only be used once.");v.loading.start=self.performance.now();var g=y(o,this.controller.signal),w=O.onProgress,M=o.responseType==="arraybuffer",N=M?"byteLength":"length";this.context=o,this.config=k,this.callbacks=O,this.request=this.fetchSetup(o,g),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),O.onTimeout(v,o,b.response)},k.timeout),self.fetch(this.request).then(function(I){if(b.response=b.loader=I,!I.ok){var G=I.status,z=I.statusText;throw new a(z||"fetch, bad network response",G,I)}return v.loading.first=Math.max(self.performance.now(),v.loading.start),v.total=parseInt(I.headers.get("Content-Length")||"0"),w&&Object(D.isFiniteNumber)(k.highWaterMark)?b.loadProgressively(I,v,o,k.highWaterMark,w):M?I.arrayBuffer():I.text()}).then(function(I){var G=b.response;self.clearTimeout(b.requestTimeout),v.loading.end=Math.max(self.performance.now(),v.loading.first),v.loaded=v.total=I[N];var z={url:G.url,data:I};w&&!Object(D.isFiniteNumber)(k.highWaterMark)&&w(v,o,I,G),O.onSuccess(z,v,o,G)}).catch(function(I){if(self.clearTimeout(b.requestTimeout),v.aborted)return;var G=I.code||0;O.onError({code:G,text:I.message},o,I.details)})},S.getCacheAge=function(){var o=null;if(this.response){var k=this.response.headers.get("age");o=k?parseFloat(k):null}return o},S.loadProgressively=function(o,k,O,b,v){b===void 0&&(b=0);var g=new p.default,w=o.body.getReader(),M=function N(){return w.read().then(function(I){if(I.done)return g.dataLength&&v(k,O,g.flush(),o),Promise.resolve(new ArrayBuffer(0));var G=I.value,z=G.length;return k.loaded+=z,z<b||g.dataLength?(g.push(G),g.dataLength>=b&&v(k,O,g.flush(),o)):v(k,O,G,o),N()}).catch(function(){return Promise.reject()})};return M()},t}();function y(t,S){var x={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},t.headers))};return t.rangeEnd&&x.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),x}function i(t,S){return new self.Request(t.url,S)}var a=function(t){C(S,t);function S(x,o,k){var O;return O=t.call(this,x)||this,O.code=void 0,O.details=void 0,O.code=o,O.details=k,O}return S}(E(Error));d.default=_},"./src/utils/imsc1-ttml-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"IMSC1_CODEC",function(){return n}),T.d(d,"parseIMSC1",function(){return m});var D=T("./src/utils/mp4-tools.ts"),u=T("./src/utils/vttparser.ts"),p=T("./src/utils/vttcue.ts"),C=T("./src/demux/id3.ts"),E=T("./src/utils/timescale-conversion.ts"),l=T("./src/utils/webvtt-parser.ts");function s(){return s=Object.assign||function(b){for(var v=1;v<arguments.length;v++){var g=arguments[v];for(var w in g)Object.prototype.hasOwnProperty.call(g,w)&&(b[w]=g[w])}return b},s.apply(this,arguments)}var n="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function m(b,v,g,w,M){var N=Object(D.findBox)(new Uint8Array(b),["mdat"]);if(N.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var I=N[0],G=Object(C.utf8ArrayToStr)(new Uint8Array(b,I.start,I.end-I.start)),z=Object(E.toTimescaleFromScale)(v,1,g);try{w(_(G,z))}catch(H){M(H)}}function _(b,v){var g=new DOMParser,w=g.parseFromString(b,"text/xml"),M=w.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},I=Object.keys(N).reduce(function(U,B){return U[B]=M.getAttribute("ttp:"+B)||N[B],U},{}),G=M.getAttribute("xml:space")!=="preserve",z=i(y(M,"styling","style")),H=i(y(M,"layout","region")),K=y(M,"body","[begin]");return[].map.call(K,function(U){var B=a(U,G);if(!B||!U.hasAttribute("begin"))return null;var V=o(U.getAttribute("begin"),I),ae=o(U.getAttribute("dur"),I),he=o(U.getAttribute("end"),I);if(V===null)throw x(U);if(he===null){if(ae===null)throw x(U);he=V+ae}var pe=new p.default(V-v,he-v,B);pe.id=Object(l.generateCueId)(pe.startTime,pe.endTime,pe.text);var Re=H[U.getAttribute("region")],ke=z[U.getAttribute("style")];pe.position=10,pe.size=80;var ve=t(Re,ke),Te=ve.textAlign;if(Te){var be=c[Te];be&&(pe.lineAlign=be),pe.align=Te}return s(pe,ve),pe}).filter(function(U){return U!==null})}function y(b,v,g){var w=b.getElementsByTagName(v)[0];return w?[].slice.call(w.querySelectorAll(g)):[]}function i(b){return b.reduce(function(v,g){var w=g.getAttribute("xml:id");return w&&(v[w]=g),v},{})}function a(b,v){return[].slice.call(b.childNodes).reduce(function(g,w,M){var N;return w.nodeName==="br"&&M?g+`
`:(N=w.childNodes)!==null&&N!==void 0&&N.length?a(w,v):v?g+w.textContent.trim().replace(/\s+/g," "):g+w.textContent},"")}function t(b,v){var g="http://www.w3.org/ns/ttml#styling",w=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return w.reduce(function(M,N){var I=S(v,g,N)||S(b,g,N);return I&&(M[N]=I),M},{})}function S(b,v,g){return b.hasAttributeNS(v,g)?b.getAttributeNS(v,g):null}function x(b){return new Error("Could not parse ttml timestamp "+b)}function o(b,v){if(!b)return null;var g=Object(u.parseTimeStamp)(b);return g===null&&(h.test(b)?g=k(b,v):f.test(b)&&(g=O(b,v))),g}function k(b,v){var g=h.exec(b),w=(g[4]|0)+(g[5]|0)/v.subFrameRate;return(g[1]|0)*3600+(g[2]|0)*60+(g[3]|0)+w/v.frameRate}function O(b,v){var g=f.exec(b),w=Number(g[1]),M=g[2];switch(M){case"h":return w*3600;case"m":return w*60;case"ms":return w*1e3;case"f":return w/v.frameRate;case"t":return w/v.tickRate}return w}},"./src/utils/logger.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"enableLogs",function(){return l}),T.d(d,"logger",function(){return s});var D=function(){},u={trace:D,debug:D,log:D,warn:D,info:D,error:D},p=u;function C(n){var h=self.console[n];return h?h.bind(self.console,"["+n+"] >"):D}function E(n){for(var h=arguments.length,f=new Array(h>1?h-1:0),c=1;c<h;c++)f[c-1]=arguments[c];f.forEach(function(m){p[m]=n[m]?n[m].bind(n):C(m)})}function l(n){if(self.console&&n===!0||typeof n=="object"){E(n,"debug","log","info","warn","error");try{p.log()}catch(h){p=u}}else p=u}var s=p},"./src/utils/mediakeys-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"KeySystems",function(){return D}),T.d(d,"requestMediaKeySystemAccess",function(){return u});var D;(function(p){p.WIDEVINE="com.widevine.alpha",p.PLAYREADY="com.microsoft.playready"})(D||(D={}));var u=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"getMediaSource",function(){return D});function D(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"bin2str",function(){return E}),T.d(d,"readUint16",function(){return l}),T.d(d,"readUint32",function(){return s}),T.d(d,"writeUint32",function(){return n}),T.d(d,"findBox",function(){return h}),T.d(d,"parseSegmentIndex",function(){return f}),T.d(d,"parseInitSegment",function(){return c}),T.d(d,"getStartDTS",function(){return m}),T.d(d,"getDuration",function(){return _}),T.d(d,"computeRawDurationFromSamples",function(){return y}),T.d(d,"offsetStartDTS",function(){return i}),T.d(d,"segmentValidRange",function(){return a}),T.d(d,"appendUint8Array",function(){return t});var D=T("./src/utils/typed-array.ts"),u=T("./src/loader/fragment.ts"),p=Math.pow(2,32)-1,C=[].push;function E(S){return String.fromCharCode.apply(null,S)}function l(S,x){"data"in S&&(x+=S.start,S=S.data);var o=S[x]<<8|S[x+1];return o<0?65536+o:o}function s(S,x){"data"in S&&(x+=S.start,S=S.data);var o=S[x]<<24|S[x+1]<<16|S[x+2]<<8|S[x+3];return o<0?4294967296+o:o}function n(S,x,o){"data"in S&&(x+=S.start,S=S.data),S[x]=o>>24,S[x+1]=o>>16&255,S[x+2]=o>>8&255,S[x+3]=o&255}function h(S,x){var o=[];if(!x.length)return o;var k,O,b;"data"in S?(k=S.data,O=S.start,b=S.end):(k=S,O=0,b=k.byteLength);for(var v=O;v<b;){var g=s(k,v),w=E(k.subarray(v+4,v+8)),M=g>1?v+g:b;if(w===x[0])if(x.length===1)o.push({data:k,start:v+8,end:M});else{var N=h({data:k,start:v+8,end:M},x.slice(1));N.length&&C.apply(o,N)}v=M}return o}function f(S){var x=h(S,["moov"]),o=x[0],k=o?o.end:null,O=h(S,["sidx"]);if(!O||!O[0])return null;var b=[],v=O[0],g=v.data[0],w=g===0?8:16,M=s(v,w);w+=4;var N=0,I=0;g===0?w+=8:w+=16,w+=2;var G=v.end+I,z=l(v,w);w+=2;for(var H=0;H<z;H++){var K=w,U=s(v,K);K+=4;var B=U&2147483647,V=(U&2147483648)>>>31;if(V===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ae=s(v,K);K+=4,b.push({referenceSize:B,subsegmentDuration:ae,info:{duration:ae/M,start:G,end:G+B-1}}),G+=B,K+=4,w=K}return{earliestPresentationTime:N,timescale:M,version:g,referencesCount:z,references:b,moovEndOffset:k}}function c(S){for(var x=[],o=h(S,["moov","trak"]),k=0;k<o.length;k++){var O=o[k],b=h(O,["tkhd"])[0];if(b){var v=b.data[b.start],g=v===0?12:20,w=s(b,g),M=h(O,["mdia","mdhd"])[0];if(M){v=M.data[M.start],g=v===0?12:20;var N=s(M,g),I=h(O,["mdia","hdlr"])[0];if(I){var G=E(I.data.subarray(I.start+8,I.start+12)),z={soun:u.ElementaryStreamTypes.AUDIO,vide:u.ElementaryStreamTypes.VIDEO}[G];if(z){var H=h(O,["mdia","minf","stbl","stsd"])[0],K=void 0;H&&(K=E(H.data.subarray(H.start+12,H.start+16))),x[w]={timescale:N,type:z},x[z]={timescale:N,id:w,codec:K}}}}}}var U=h(S,["moov","mvex","trex"]);return U.forEach(function(B){var V=s(B,4),ae=x[V];ae&&(ae.default={duration:s(B,12),flags:s(B,20)})}),x}function m(S,x){return h(x,["moof","traf"]).reduce(function(o,k){var O=h(k,["tfdt"])[0],b=O.data[O.start],v=h(k,["tfhd"]).reduce(function(g,w){var M=s(w,4),N=S[M];if(N){var I=s(O,4);b===1&&(I*=Math.pow(2,32),I+=s(O,8));var G=N.timescale||9e4,z=I/G;if(isFinite(z)&&(g===null||z<g))return z}return g},null);return v!==null&&isFinite(v)&&(o===null||v<o)?v:o},null)||0}function _(S,x){for(var o=0,k=0,O=0,b=h(S,["moof","traf"]),v=0;v<b.length;v++){var g=b[v],w=h(g,["tfhd"])[0],M=s(w,4),N=x[M];if(!N)continue;var I=N.default,G=s(w,0)|(I==null?void 0:I.flags),z=I==null?void 0:I.duration;G&8&&(G&2?z=s(w,12):z=s(w,8));for(var H=N.timescale||9e4,K=h(g,["trun"]),U=0;U<K.length;U++){if(z){var B=s(K[U],4);o=z*B}else o=y(K[U]);N.type===u.ElementaryStreamTypes.VIDEO?k+=o/H:N.type===u.ElementaryStreamTypes.AUDIO&&(O+=o/H)}}if(k===0&&O===0){var V=f(S);if(V!=null&&V.references)return V.references.reduce(function(ae,he){return ae+he.info.duration||0},0)}return k||O}function y(S){var x=s(S,0),o=8;x&1&&(o+=4),x&4&&(o+=4);for(var k=0,O=s(S,4),b=0;b<O;b++){if(x&256){var v=s(S,o);k+=v,o+=4}x&512&&(o+=4),x&1024&&(o+=4),x&2048&&(o+=4)}return k}function i(S,x,o){h(x,["moof","traf"]).forEach(function(k){h(k,["tfhd"]).forEach(function(O){var b=s(O,4),v=S[b];if(!v)return;var g=v.timescale||9e4;h(k,["tfdt"]).forEach(function(w){var M=w.data[w.start],N=s(w,4);if(M===0)n(w,4,N-o*g);else{N*=Math.pow(2,32),N+=s(w,8),N-=o*g,N=Math.max(N,0);var I=Math.floor(N/(p+1)),G=Math.floor(N%(p+1));n(w,4,I),n(w,8,G)}})})})}function a(S){var x={valid:null,remainder:null},o=h(S,["moof"]);if(o){if(o.length<2)return x.remainder=S,x}else return x;var k=o[o.length-1];return x.valid=Object(D.sliceUint8)(S,0,k.start-8),x.remainder=Object(D.sliceUint8)(S,k.start-8),x}function t(S,x){var o=new Uint8Array(S.length+x.length);return o.set(S),o.set(x,S.length),o}},"./src/utils/output-filter.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"default",function(){return D});var D=function(){function u(C,E){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=C,this.trackName=E}var p=u.prototype;return p.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},p.newCue=function(E,l,s){(this.startTime===null||this.startTime>E)&&(this.startTime=E),this.endTime=l,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)},p.reset=function(){this.cueRanges=[]},u}()},"./src/utils/texttrack-utils.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"sendAddTrackEvent",function(){return u}),T.d(d,"addCueToTrack",function(){return p}),T.d(d,"clearCurrentCues",function(){return C}),T.d(d,"removeCuesInRange",function(){return E}),T.d(d,"getCuesInRange",function(){return s});var D=T("./src/utils/logger.ts");function u(n,h){var f;try{f=new Event("addtrack")}catch(c){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=n,h.dispatchEvent(f)}function p(n,h){var f=n.mode;if(f==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(h.id))try{if(n.addCue(h),!n.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(m){D.logger.debug("[texttrack-utils]: "+m);var c=new self.TextTrackCue(h.startTime,h.endTime,h.text);c.id=h.id,n.addCue(c)}f==="disabled"&&(n.mode=f)}function C(n){var h=n.mode;if(h==="disabled"&&(n.mode="hidden"),n.cues)for(var f=n.cues.length;f--;)n.removeCue(n.cues[f]);h==="disabled"&&(n.mode=h)}function E(n,h,f){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var m=s(n.cues,h,f),_=0;_<m.length;_++)n.removeCue(m[_]);c==="disabled"&&(n.mode=c)}function l(n,h){if(h<n[0].startTime)return 0;var f=n.length-1;if(h>n[f].endTime)return-1;for(var c=0,m=f;c<=m;){var _=Math.floor((m+c)/2);if(h<n[_].startTime)m=_-1;else if(h>n[_].startTime&&c<f)c=_+1;else return _}return n[c].startTime-h<h-n[m].startTime?c:m}function s(n,h,f){var c=[],m=l(n,h);if(m>-1)for(var _=m,y=n.length;_<y;_++){var i=n[_];if(i.startTime>=h&&i.endTime<=f)c.push(i);else if(i.startTime>f)return c}return c}},"./src/utils/time-ranges.ts":function(P,d,T){"use strict";T.r(d);var D={toString:function(p){for(var C="",E=p.length,l=0;l<E;l++)C+="["+p.start(l).toFixed(3)+","+p.end(l).toFixed(3)+"]";return C}};d.default=D},"./src/utils/timescale-conversion.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"toTimescaleFromBase",function(){return u}),T.d(d,"toTimescaleFromScale",function(){return p}),T.d(d,"toMsFromMpegTsClock",function(){return C}),T.d(d,"toMpegTsClockFromTimescale",function(){return E});var D=9e4;function u(l,s,n,h){n===void 0&&(n=1),h===void 0&&(h=!1);var f=l*s*n;return h?Math.round(f):f}function p(l,s,n,h){return n===void 0&&(n=1),h===void 0&&(h=!1),u(l,s,1/n,h)}function C(l,s){return s===void 0&&(s=!1),u(l,1e3,1/D,s)}function E(l,s){return s===void 0&&(s=1),u(l,D,1/s)}},"./src/utils/typed-array.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"sliceUint8",function(){return D});function D(u,p,C){return Uint8Array.prototype.slice?u.slice(p,C):new Uint8Array(Array.prototype.slice.call(u,p,C))}},"./src/utils/vttcue.ts":function(P,d,T){"use strict";T.r(d),d.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var D=["","lr","rl"],u=["start","middle","end","left","right"];function p(n,h){if(typeof h!="string")return!1;if(!Array.isArray(n))return!1;var f=h.toLowerCase();return~n.indexOf(f)?f:!1}function C(n){return p(D,n)}function E(n){return p(u,n)}function l(n){for(var h=arguments.length,f=new Array(h>1?h-1:0),c=1;c<h;c++)f[c-1]=arguments[c];for(var m=1;m<arguments.length;m++){var _=arguments[m];for(var y in _)n[y]=_[y]}return n}function s(n,h,f){var c=this,m={enumerable:!0};c.hasBeenReset=!1;var _="",y=!1,i=n,a=h,t=f,S=null,x="",o=!0,k="auto",O="start",b=50,v="middle",g=50,w="middle";Object.defineProperty(c,"id",l({},m,{get:function(){return _},set:function(N){_=""+N}})),Object.defineProperty(c,"pauseOnExit",l({},m,{get:function(){return y},set:function(N){y=!!N}})),Object.defineProperty(c,"startTime",l({},m,{get:function(){return i},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");i=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",l({},m,{get:function(){return a},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");a=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",l({},m,{get:function(){return t},set:function(N){t=""+N,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",l({},m,{get:function(){return S},set:function(N){S=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",l({},m,{get:function(){return x},set:function(N){var I=C(N);if(I===!1)throw new SyntaxError("An invalid or illegal string was specified.");x=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",l({},m,{get:function(){return o},set:function(N){o=!!N,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",l({},m,{get:function(){return k},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",l({},m,{get:function(){return O},set:function(N){var I=E(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");O=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",l({},m,{get:function(){return b},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");b=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",l({},m,{get:function(){return v},set:function(N){var I=E(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");v=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",l({},m,{get:function(){return g},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");g=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",l({},m,{get:function(){return w},set:function(N){var I=E(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");w=I,this.hasBeenReset=!0}})),c.displayState=void 0}return s.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"parseTimeStamp",function(){return p}),T.d(d,"fixLineBreaks",function(){return h}),T.d(d,"VTTParser",function(){return f});var D=T("./src/utils/vttcue.ts"),u=function(){function c(){}var m=c.prototype;return m.decode=function(y,i){if(!y)return"";if(typeof y!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(y))},c}();function p(c){function m(y,i,a,t){return(y|0)*3600+(i|0)*60+(a|0)+parseFloat(t||0)}var _=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return _?parseFloat(_[2])>59?m(_[2],_[3],0,_[4]):m(_[1],_[2],_[3],_[4]):null}var C=function(){function c(){this.values=Object.create(null)}var m=c.prototype;return m.set=function(y,i){!this.get(y)&&i!==""&&(this.values[y]=i)},m.get=function(y,i,a){return a?this.has(y)?this.values[y]:i[a]:this.has(y)?this.values[y]:i},m.has=function(y){return y in this.values},m.alt=function(y,i,a){for(var t=0;t<a.length;++t)if(i===a[t]){this.set(y,i);break}},m.integer=function(y,i){/^-?\d+$/.test(i)&&this.set(y,parseInt(i,10))},m.percent=function(y,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var a=parseFloat(i);if(a>=0&&a<=100)return this.set(y,a),!0}return!1},c}();function E(c,m,_,y){var i=y?c.split(y):[c];for(var a in i){if(typeof i[a]!="string")continue;var t=i[a].split(_);if(t.length!==2)continue;var S=t[0],x=t[1];m(S,x)}}var l=new D.default(0,0,""),s=l.align==="middle"?"middle":"center";function n(c,m,_){var y=c;function i(){var S=p(c);if(S===null)throw new Error("Malformed timestamp: "+y);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function a(S,x){var o=new C;E(S,function(b,v){var g;switch(b){case"region":for(var w=_.length-1;w>=0;w--)if(_[w].id===v){o.set(b,_[w].region);break}break;case"vertical":o.alt(b,v,["rl","lr"]);break;case"line":g=v.split(","),o.integer(b,g[0]),o.percent(b,g[0])&&o.set("snapToLines",!1),o.alt(b,g[0],["auto"]),g.length===2&&o.alt("lineAlign",g[1],["start",s,"end"]);break;case"position":g=v.split(","),o.percent(b,g[0]),g.length===2&&o.alt("positionAlign",g[1],["start",s,"end","line-left","line-right","auto"]);break;case"size":o.percent(b,v);break;case"align":o.alt(b,v,["start",s,"end","left","right"]);break}},/:/,/\s/),x.region=o.get("region",null),x.vertical=o.get("vertical","");var k=o.get("line","auto");k==="auto"&&l.line===-1&&(k=-1),x.line=k,x.lineAlign=o.get("lineAlign","start"),x.snapToLines=o.get("snapToLines",!0),x.size=o.get("size",100),x.align=o.get("align",s);var O=o.get("position","auto");O==="auto"&&l.position===50&&(O=x.align==="start"||x.align==="left"?0:x.align==="end"||x.align==="right"?100:50),x.position=O}function t(){c=c.replace(/^\s+/,"")}if(t(),m.startTime=i(),t(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+y);c=c.substr(3),t(),m.endTime=i(),t(),a(c,m)}function h(c){return c.replace(/<br(?: \/)?>/gi,`
`)}var f=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new u,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var m=c.prototype;return m.parse=function(y){var i=this;y&&(i.buffer+=i.decoder.decode(y,{stream:!0}));function a(){var O=i.buffer,b=0;for(O=h(O);b<O.length&&O[b]!=="\r"&&O[b]!==`
`;)++b;var v=O.substr(0,b);return O[b]==="\r"&&++b,O[b]===`
`&&++b,i.buffer=O.substr(b),v}function t(O){E(O,function(b,v){},/:/)}try{var S="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;S=a();var x=S.match(/^()?WEBVTT([ \t].*)?$/);if(!x||!x[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var o=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;o?o=!1:S=a();switch(i.state){case"HEADER":/:/.test(S)?t(S):S||(i.state="ID");continue;case"NOTE":S||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(S)){i.state="NOTE";break}if(!S)continue;if(i.cue=new D.default(0,0,""),i.state="CUE",S.indexOf("-->")===-1){i.cue.id=S;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{n(S,i.cue,i.regionList)}catch(O){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var k=S.indexOf("-->")!==-1;if(!S||k&&(o=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
`),i.cue.text+=S}continue;case"BADCUE":S||(i.state="ID")}}}catch(O){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},m.flush=function(){var y=this;try{if((y.cue||y.state==="HEADER")&&(y.buffer+=`
`,y.parse()),y.state==="INITIAL"||y.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){y.onparsingerror&&y.onparsingerror(i)}return y.onflush&&y.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(P,d,T){"use strict";T.r(d),T.d(d,"generateCueId",function(){return f}),T.d(d,"parseWebVTT",function(){return m});var D=T("./src/polyfills/number.ts"),u=T("./src/utils/vttparser.ts"),p=T("./src/demux/id3.ts"),C=T("./src/utils/timescale-conversion.ts"),E=T("./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,s=function(y,i,a){return a===void 0&&(a=0),y.substr(a,i.length)===i},n=function(y){var i=parseInt(y.substr(-3)),a=parseInt(y.substr(-6,2)),t=parseInt(y.substr(-9,2)),S=y.length>9?parseInt(y.substr(0,y.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(i)||!Object(D.isFiniteNumber)(a)||!Object(D.isFiniteNumber)(t)||!Object(D.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+y);return i+=1e3*a,i+=60*1e3*t,i+=60*60*1e3*S,i},h=function(y){for(var i=5381,a=y.length;a;)i=i*33^y.charCodeAt(--a);return(i>>>0).toString()};function f(_,y,i){return h(_.toString())+h(y.toString())+h(i)}var c=function(y,i,a){var t=y[i],S=y[t.prevCC];if(!S||!S.new&&t.new){y.ccOffset=y.presentationOffset=t.start,t.new=!1;return}for(;(x=S)!==null&&x!==void 0&&x.new;){var x;y.ccOffset+=t.start-S.start,t.new=!1,t=S,S=y[t.prevCC]}y.presentationOffset=a};function m(_,y,i,a,t,S,x,o){var k=new u.VTTParser,O=Object(p.utf8ArrayToStr)(new Uint8Array(_)).trim().replace(l,`
`).split(`
`),b=[],v=Object(C.toMpegTsClockFromTimescale)(y,i),g="00:00.000",w=0,M=0,N,I=!0,G=!1;k.oncue=function(z){var H=a[t],K=a.ccOffset,U=(w-v)/9e4;if(H!=null&&H.new&&(M!==void 0?K=a.ccOffset=H.start:c(a,t,U)),U&&(K=U-a.presentationOffset),G){var B=z.endTime-z.startTime,V=Object(E.normalizePts)((z.startTime+K-M)*9e4,S*9e4)/9e4;z.startTime=V,z.endTime=V+B}var ae=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ae)),z.id||(z.id=f(z.startTime,z.endTime,ae)),z.endTime>0&&b.push(z)},k.onparsingerror=function(z){N=z},k.onflush=function(){if(N){o(N);return}x(b)},O.forEach(function(z){if(I)if(s(z,"X-TIMESTAMP-MAP=")){I=!1,G=!0,z.substr(16).split(",").forEach(function(H){s(H,"LOCAL:")?g=H.substr(6):s(H,"MPEGTS:")&&(w=parseInt(H.substr(7)))});try{M=n(g)/1e3}catch(H){G=!1,N=H}return}else z===""&&(I=!1);k.parse(z+`
`)}),k.flush()}},"./src/utils/xhr-loader.ts":function(P,d,T){"use strict";T.r(d);var D=T("./src/utils/logger.ts"),u=T("./src/loader/load-stats.ts"),p=/^age:\s*[\d.]+\s*$/m,C=function(){function E(s){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=s?s.xhrSetup:null,this.stats=new u.LoadStats,this.retryDelay=0}var l=E.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.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()))},l.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(n,h,f){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=h,this.callbacks=f,this.retryDelay=h.retryDelay,this.loadInternal()},l.loadInternal=function(){var n=this.config,h=this.context;if(!n)return;var f=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var m=this.xhrSetup;try{if(m)try{m(f,h.url)}catch(i){f.open("GET",h.url,!0),m(f,h.url)}f.readyState||f.open("GET",h.url,!0);var _=this.context.headers;if(_)for(var y in _)f.setRequestHeader(y,_[y])}catch(i){this.callbacks.onError({code:f.status,text:i.message},h,f);return}h.rangeEnd&&f.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),f.send()},l.readystatechange=function(){var n=this.context,h=this.loader,f=this.stats;if(!n||!h)return;var c=h.readyState,m=this.config;if(f.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),c===4){h.onreadystatechange=null,h.onprogress=null;var _=h.status;if(_>=200&&_<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var y,i;if(n.responseType==="arraybuffer"?(y=h.response,i=y.byteLength):(y=h.responseText,i=y.length),f.loaded=f.total=i,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(f,n,y,h),!this.callbacks)return;var t={url:h.responseURL,data:y};this.callbacks.onSuccess(t,f,n,h)}else f.retry>=m.maxRetry||_>=400&&_<499?(D.logger.error(_+" while loading "+n.url),this.callbacks.onError({code:_,text:h.statusText},n,h)):(D.logger.warn(_+" 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,m.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout)},l.loadtimeout=function(){D.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(n){var h=this.stats;h.loaded=n.loaded,n.lengthComputable&&(h.total=n.total)},l.getCacheAge=function(){var n=null;if(this.loader&&p.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");n=h?parseFloat(h):null}return n},E}();d.default=C}}).default})},vHTk:function(j,Z,L){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=u.RC4=D.extend({_doReset:function(){for(var l=this._key,s=l.words,n=l.sigBytes,h=this._S=[],f=0;f<256;f++)h[f]=f;for(var f=0,c=0;f<256;f++){var m=f%n,_=s[m>>>2]>>>24-m%4*8&255;c=(c+h[f]+_)%256;var y=h[f];h[f]=h[c],h[c]=y}this._i=this._j=0},_doProcessBlock:function(l,s){l[s]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var l=this._S,s=this._i,n=this._j,h=0,f=0;f<4;f++){s=(s+1)%256,n=(n+l[s])%256;var c=l[s];l[s]=l[n],l[n]=c,h|=l[(l[s]+l[n])%256]<<24-f*8}return this._i=s,this._j=n,h}d.RC4=D._createHelper(p);var E=u.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)C.call(this)}});d.RC4Drop=D._createHelper(E)}(),P.RC4})},wCXF:function(j,Z,L){"use strict";L.d(Z,"a",function(){return nt});var P=L("rePB"),d=L("VTBJ"),T=L("KQm4"),D=L("U8pU"),u=L("ODXe"),p=L("q1tI"),C=L("TSYQ"),E=L.n(C),l=L("Gytx"),s=L.n(l),n=L("Kwbf"),h=L("t23M"),f=L("qx4F"),c=L("6eGT"),m=L("IBYe"),_=L("Ff2n"),y=L("c+Xe"),i=L("fyJ8"),a=L("biw7");function t(He,De,at,ht,Ze){var st=at[He]||{},Ue=at[De]||{},Me,Ne;st.fixed==="left"?Me=ht.left[He]:Ue.fixed==="right"&&(Ne=ht.right[De]);var xe=!1,Se=!1,Ae=!1,Le=!1,Je=at[De+1],Ve=at[He-1];if(Ze==="rtl"){if(Me!==void 0){var gt=Ve&&Ve.fixed==="left";Le=!gt}else if(Ne!==void 0){var yt=Je&&Je.fixed==="right";Ae=!yt}}else if(Me!==void 0){var Bt=Je&&Je.fixed==="left";xe=!Bt}else if(Ne!==void 0){var Nt=Ve&&Ve.fixed==="right";Se=!Nt}return{fixLeft:Me,fixRight:Ne,lastFixLeft:xe,firstFixRight:Se,lastFixRight:Ae,firstFixLeft:Le,isSticky:ht.isSticky}}var S=L("sR1s");function x(He){var De=He.cells,at=He.stickyOffsets,ht=He.flattenColumns,Ze=He.rowComponent,st=He.cellComponent,Ue=He.onHeaderRow,Me=He.index,Ne=p.useContext(a.a),xe=Ne.prefixCls,Se=Ne.direction,Ae;Ue&&(Ae=Ue(De.map(function(Je){return Je.column}),Me));var Le=Object(S.a)(De.map(function(Je){return Je.column}));return p.createElement(Ze,Object.assign({},Ae),De.map(function(Je,Ve){var gt=Je.column,yt=t(Je.colStart,Je.colEnd,ht,at,Se),Bt;return gt&&gt.onHeaderCell&&(Bt=Je.column.onHeaderCell(gt)),p.createElement(i.a,Object.assign({},Je,{ellipsis:gt.ellipsis,align:gt.align,component:st,prefixCls:xe,key:Le[Ve]},yt,{additionalProps:Bt,rowType:"header"}))}))}x.displayName="HeaderRow";var o=x;function k(He){var De=[];function at(Ue,Me){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;De[Ne]=De[Ne]||[];var xe=Me,Se=Ue.filter(Boolean).map(function(Ae){var Le={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:xe},Je=1,Ve=Ae.children;return Ve&&Ve.length>0&&(Je=at(Ve,xe,Ne+1).reduce(function(gt,yt){return gt+yt},0),Le.hasSubColumns=!0),"colSpan"in Ae&&(Je=Ae.colSpan),"rowSpan"in Ae&&(Le.rowSpan=Ae.rowSpan),Le.colSpan=Je,Le.colEnd=Le.colStart+Je-1,De[Ne].push(Le),xe+=Je,Je});return Se}at(He,0);for(var ht=De.length,Ze=function(Me){De[Me].forEach(function(Ne){!("rowSpan"in Ne)&&!Ne.hasSubColumns&&(Ne.rowSpan=ht-Me)})},st=0;st<ht;st+=1)Ze(st);return De}function O(He){var De=He.stickyOffsets,at=He.columns,ht=He.flattenColumns,Ze=He.onHeaderRow,st=p.useContext(a.a),Ue=st.prefixCls,Me=st.getComponent,Ne=p.useMemo(function(){return k(at)},[at]),xe=Me(["header","wrapper"],"thead"),Se=Me(["header","row"],"tr"),Ae=Me(["header","cell"],"th");return p.createElement(xe,{className:"".concat(Ue,"-thead")},Ne.map(function(Le,Je){var Ve=p.createElement(o,{key:Je,flattenColumns:ht,cells:Le,stickyOffsets:De,rowComponent:Se,cellComponent:Ae,onHeaderRow:Ze,index:Je});return Ve}))}var b=O,v=L("hW8S");function g(He){for(var De=He.colWidths,at=He.columns,ht=He.columCount,Ze=[],st=ht||at.length,Ue=!1,Me=st-1;Me>=0;Me-=1){var Ne=De[Me],xe=at&&at[Me],Se=xe&&xe[v.a];(Ne||Se||Ue)&&(Ze.unshift(p.createElement("col",Object.assign({key:Me,style:{width:Ne,minWidth:Ne}},Se))),Ue=!0)}return p.createElement("colgroup",null,Ze)}var w=g;function M(He,De){return Object(p.useMemo)(function(){for(var at=[],ht=0;ht<De;ht+=1){var Ze=He[ht];if(Ze!==void 0)at[ht]=Ze;else return null}return at},[He.join("_"),De])}var N=p.forwardRef(function(He,De){var at=He.noData,ht=He.columns,Ze=He.flattenColumns,st=He.colWidths,Ue=He.columCount,Me=He.stickyOffsets,Ne=He.direction,xe=He.fixHeader,Se=He.offsetHeader,Ae=He.stickyClassName,Le=He.onScroll,Je=Object(_.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ve=p.useContext(a.a),gt=Ve.prefixCls,yt=Ve.scrollbarSize,Bt=Ve.isSticky,Nt=Bt&&!xe?0:yt,mr=p.useRef(null),hr=p.useCallback(function(mn){Object(y.b)(De,mn),Object(y.b)(mr,mn)},[]);p.useEffect(function(){var mn;function vn(Gt){var Cn=Gt.currentTarget,yn=Gt.deltaX;yn&&(Le({currentTarget:Cn,scrollLeft:Cn.scrollLeft+yn}),Gt.preventDefault())}return(mn=mr.current)===null||mn===void 0||mn.addEventListener("wheel",vn),function(){var Gt;(Gt=mr.current)===null||Gt===void 0||Gt.removeEventListener("wheel",vn)}},[]);var St=Ze[Ze.length-1],$r={fixed:St?St.fixed:null,onHeaderCell:function(){return{className:"".concat(gt,"-cell-scrollbar")}}},Xr=Object(p.useMemo)(function(){return Nt?[].concat(Object(T.a)(ht),[$r]):ht},[Nt,ht]),Ur=Object(p.useMemo)(function(){return Nt?[].concat(Object(T.a)(Ze),[$r]):Ze},[Nt,Ze]),sn=Object(p.useMemo)(function(){var mn=Me.right,vn=Me.left;return Object(d.a)(Object(d.a)({},Me),{},{left:Ne==="rtl"?[].concat(Object(T.a)(vn.map(function(Gt){return Gt+Nt})),[0]):vn,right:Ne==="rtl"?mn:[].concat(Object(T.a)(mn.map(function(Gt){return Gt+Nt})),[0]),isSticky:Bt})},[Nt,Me,Bt]),Rr=M(st,Ue);return p.createElement("div",{style:Object(d.a)({overflow:"hidden"},Bt?{top:Se}:{}),ref:hr,className:E()("".concat(gt,"-header"),Object(P.a)({},Ae,!!Ae))},p.createElement("table",{style:{tableLayout:"fixed",visibility:at||Rr?null:"hidden"}},p.createElement(w,{colWidths:Rr?[].concat(Object(T.a)(Rr),[Nt]):[],columCount:Ue+1,columns:Ur}),p.createElement(b,Object.assign({},Je,{stickyOffsets:sn,columns:Xr,flattenColumns:Ur}))))});N.displayName="FixedHeader";var I=N,G=p.createContext(null),z=G;function H(He){var De=He.prefixCls,at=He.children,ht=He.component,Ze=He.cellComponent,st=He.fixHeader,Ue=He.fixColumn,Me=He.horizonScroll,Ne=He.className,xe=He.expanded,Se=He.componentWidth,Ae=He.colSpan,Le=p.useContext(a.a),Je=Le.scrollbarSize;return p.useMemo(function(){var Ve=at;return Ue&&(Ve=p.createElement("div",{style:{width:Se-(st?Je:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(De,"-expanded-row-fixed")},Ve)),p.createElement(ht,{className:Ne,style:{display:xe?null:"none"}},p.createElement(i.a,{component:Ze,prefixCls:De,colSpan:Ae},Ve))},[at,ht,st,Me,Ne,xe,Se,Ae,Je])}var K=H;function U(He){var De=He.className,at=He.style,ht=He.record,Ze=He.index,st=He.rowKey,Ue=He.getRowKey,Me=He.rowExpandable,Ne=He.expandedKeys,xe=He.onRow,Se=He.indent,Ae=Se===void 0?0:Se,Le=He.rowComponent,Je=He.cellComponent,Ve=He.childrenColumnName,gt=p.useContext(a.a),yt=gt.prefixCls,Bt=gt.fixedInfoList,Nt=p.useContext(z),mr=Nt.fixHeader,hr=Nt.fixColumn,St=Nt.horizonScroll,$r=Nt.componentWidth,Xr=Nt.flattenColumns,Ur=Nt.expandableType,sn=Nt.expandRowByClick,Rr=Nt.onTriggerExpand,mn=Nt.rowClassName,vn=Nt.expandedRowClassName,Gt=Nt.indentSize,Cn=Nt.expandIcon,yn=Nt.expandedRowRender,Sn=Nt.expandIconColumnIndex,xn=p.useState(!1),xi=Object(u.a)(xn,2),Ti=xi[0],hn=xi[1],cr=Ne&&Ne.has(He.recordKey);p.useEffect(function(){cr&&hn(!0)},[cr]);var Gn=Ur==="row"&&(!Me||Me(ht)),pi=Ur==="nest",Vn=Ve&&ht&&ht[Ve],Yr=Gn||pi,Un;xe&&(Un=xe(ht,Ze));var ui=function(W){if(sn&&Yr&&Rr(ht,W),Un&&Un.onClick){for(var $,ne=arguments.length,ce=new Array(ne>1?ne-1:0),oe=1;oe<ne;oe++)ce[oe-1]=arguments[oe];($=Un).onClick.apply($,[W].concat(ce))}},ci;typeof mn=="string"?ci=mn:typeof mn=="function"&&(ci=mn(ht,Ze,Ae));var jt=Object(S.a)(Xr),_r=p.createElement(Le,Object.assign({},Un,{"data-row-key":st,className:E()(De,"".concat(yt,"-row"),"".concat(yt,"-row-level-").concat(Ae),ci,Un&&Un.className),style:Object(d.a)(Object(d.a)({},at),Un?Un.style:null),onClick:ui}),Xr.map(function(se,W){var $=se.render,ne=se.dataIndex,ce=se.className,oe=jt[W],Ke=Bt[W],At;W===(Sn||0)&&pi&&(At=p.createElement(p.Fragment,null,p.createElement("span",{style:{paddingLeft:"".concat(Gt*Ae,"px")},className:"".concat(yt,"-row-indent indent-level-").concat(Ae)}),Cn({prefixCls:yt,expanded:cr,expandable:Vn,record:ht,onExpand:Rr})));var Vt;return se.onCell&&(Vt=se.onCell(ht,Ze)),p.createElement(i.a,Object.assign({className:ce,ellipsis:se.ellipsis,align:se.align,component:Je,prefixCls:yt,key:oe,record:ht,index:Ze,dataIndex:ne,render:$,shouldCellUpdate:se.shouldCellUpdate},Ke,{appendNode:At,additionalProps:Vt}))})),ai;if(Gn&&(Ti||cr)){var Oi=yn(ht,Ze,Ae+1,cr),Ai=vn&&vn(ht,Ze,Ae);ai=p.createElement(K,{expanded:cr,className:E()("".concat(yt,"-expanded-row"),"".concat(yt,"-expanded-row-level-").concat(Ae+1),Ai),prefixCls:yt,fixHeader:mr,fixColumn:hr,horizonScroll:St,component:Le,componentWidth:$r,cellComponent:Je,colSpan:Xr.length},Oi)}var Ri;return Vn&&cr&&(Ri=(ht[Ve]||[]).map(function(se,W){var $=Ue(se,W);return p.createElement(U,Object.assign({},He,{key:$,rowKey:$,record:se,recordKey:$,index:W,indent:Ae+1}))})),p.createElement(p.Fragment,null,_r,ai,Ri)}U.displayName="BodyRow";var B=U,V=p.createContext(null),ae=V;function he(He){var De=He.columnKey,at=He.onColumnResize,ht=p.useRef();return p.useEffect(function(){ht.current&&at(De,ht.current.offsetWidth)},[]),p.createElement(h.a,{onResize:function(st){var Ue=st.offsetWidth;at(De,Ue)}},p.createElement("td",{ref:ht,style:{padding:0,border:0,height:0}},p.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function pe(He){var De=He.data,at=He.getRowKey,ht=He.measureColumnWidth,Ze=He.expandedKeys,st=He.onRow,Ue=He.rowExpandable,Me=He.emptyNode,Ne=He.childrenColumnName,xe=p.useContext(ae),Se=xe.onColumnResize,Ae=p.useContext(a.a),Le=Ae.prefixCls,Je=Ae.getComponent,Ve=p.useContext(z),gt=Ve.fixHeader,yt=Ve.horizonScroll,Bt=Ve.flattenColumns,Nt=Ve.componentWidth;return p.useMemo(function(){var mr=Je(["body","wrapper"],"tbody"),hr=Je(["body","row"],"tr"),St=Je(["body","cell"],"td"),$r;De.length?$r=De.map(function(Ur,sn){var Rr=at(Ur,sn);return p.createElement(B,{key:Rr,rowKey:Rr,record:Ur,recordKey:Rr,index:sn,rowComponent:hr,cellComponent:St,expandedKeys:Ze,onRow:st,getRowKey:at,rowExpandable:Ue,childrenColumnName:Ne})}):$r=p.createElement(K,{expanded:!0,className:"".concat(Le,"-placeholder"),prefixCls:Le,fixHeader:gt,fixColumn:yt,horizonScroll:yt,component:hr,componentWidth:Nt,cellComponent:St,colSpan:Bt.length},Me);var Xr=Object(S.a)(Bt);return p.createElement(mr,{className:"".concat(Le,"-tbody")},ht&&p.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0}},Xr.map(function(Ur){return p.createElement(he,{key:Ur,columnKey:Ur,onColumnResize:Se})})),$r)},[De,Le,st,ht,Ze,at,Je,Nt,Me,Bt])}var Re=p.memo(pe);Re.displayName="Body";var ke=Re,ve=L("wRmb"),Te=L("xEkU"),be=L.n(Te);function ue(He){var De=Object(p.useRef)(He),at=Object(p.useState)({}),ht=Object(u.a)(at,2),Ze=ht[1],st=Object(p.useRef)(null),Ue=Object(p.useRef)([]);function Me(Ne){st.current===null&&(Ue.current=[],st.current=be()(function(){Ue.current.forEach(function(xe){De.current=xe(De.current)}),st.current=null,Ze({})})),Ue.current.push(Ne)}return Object(p.useEffect)(function(){return function(){be.a.cancel(st.current)}},[]),[De.current,Me]}function le(He){var De=Object(p.useRef)(He),at=Object(p.useRef)(null);function ht(){window.clearTimeout(at.current)}function Ze(Ue){De.current=Ue,ht(),at.current=window.setTimeout(function(){De.current=null,at.current=null},100)}function st(){return De.current}return Object(p.useEffect)(function(){return ht},[]),[Ze,st]}function re(He,De,at){var ht=Object(p.useMemo)(function(){for(var Ze=[],st=[],Ue=0,Me=0,Ne=0;Ne<De;Ne+=1)if(at==="rtl"){st[Ne]=Me,Me+=He[Ne]||0;var xe=De-Ne-1;Ze[xe]=Ue,Ue+=He[xe]||0}else{Ze[Ne]=Ue,Ue+=He[Ne]||0;var Se=De-Ne-1;st[Se]=Me,Me+=He[Se]||0}return{left:Ze,right:st}},[He,De,at]);return ht}var fe=re;function q(He){var De=He.className,at=He.children;return p.createElement("div",{className:De},at)}var ee=q,Ce=L("n6Qo");function te(He){var De,at=He.prefixCls,ht=He.record,Ze=He.onExpand,st=He.expanded,Ue=He.expandable,Me="".concat(at,"-row-expand-icon");if(!Ue)return p.createElement("span",{className:E()(Me,"".concat(at,"-row-spaced"))});var Ne=function(Se){Ze(ht,Se),Se.stopPropagation()};return p.createElement("span",{className:E()(Me,(De={},Object(P.a)(De,"".concat(at,"-row-expanded"),st),Object(P.a)(De,"".concat(at,"-row-collapsed"),!st),De)),onClick:Ne})}function J(He,De,at){var ht=[];function Ze(st){(st||[]).forEach(function(Ue,Me){ht.push(De(Ue,Me)),Ze(Ue[at])})}return Ze(He),ht}var X=L("zT1h"),Q=L("y0+3"),Ee=function(De,at){var ht,Ze,st=De.scrollBodyRef,Ue=De.onScroll,Me=De.offsetScroll,Ne=p.useContext(a.a),xe=Ne.prefixCls,Se=((ht=st.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,Ae=((Ze=st.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,Le=Se&&Ae*(Ae/Se),Je=p.useRef(),Ve=ue({scrollLeft:0,isHiddenScrollBar:!1}),gt=Object(u.a)(Ve,2),yt=gt[0],Bt=gt[1],Nt=p.useRef({delta:0,x:0}),mr=p.useState(!1),hr=Object(u.a)(mr,2),St=hr[0],$r=hr[1],Xr=function(){$r(!1)},Ur=function(Gt){Gt.persist(),Nt.current.delta=Gt.pageX-yt.scrollLeft,Nt.current.x=0,$r(!0),Gt.preventDefault()},sn=function(Gt){var Cn,yn=Gt||((Cn=window)===null||Cn===void 0?void 0:Cn.event),Sn=yn.buttons;if(!St||Sn===0){St&&$r(!1);return}var xn=Nt.current.x+Gt.pageX-Nt.current.x-Nt.current.delta;xn<=0&&(xn=0),xn+Le>=Ae&&(xn=Ae-Le),Ue({scrollLeft:xn/Ae*(Se+2)}),Nt.current.x=Gt.pageX},Rr=function(){var Gt=Object(Q.b)(st.current).top,Cn=Gt+st.current.offsetHeight,yn=document.documentElement.scrollTop+window.innerHeight;Cn-Object(f.a)()<=yn||Gt>=yn-Me?Bt(function(Sn){return Object(d.a)(Object(d.a)({},Sn),{},{isHiddenScrollBar:!0})}):Bt(function(Sn){return Object(d.a)(Object(d.a)({},Sn),{},{isHiddenScrollBar:!1})})},mn=function(Gt){Bt(function(Cn){return Object(d.a)(Object(d.a)({},Cn),{},{scrollLeft:Gt/Se*Ae||0})})};return p.useImperativeHandle(at,function(){return{setScrollLeft:mn}}),p.useEffect(function(){var vn=Object(X.a)(document.body,"mouseup",Xr,!1),Gt=Object(X.a)(document.body,"mousemove",sn,!1);return Rr(),function(){vn.remove(),Gt.remove()}},[Le,St]),p.useEffect(function(){var vn=Object(X.a)(window,"scroll",Rr,!1),Gt=Object(X.a)(window,"resize",Rr,!1);return function(){vn.remove(),Gt.remove()}},[]),p.useEffect(function(){yt.isHiddenScrollBar||Bt(function(vn){var Gt,Cn;return Object(d.a)(Object(d.a)({},vn),{},{scrollLeft:st.current.scrollLeft/((Gt=st.current)===null||Gt===void 0?void 0:Gt.scrollWidth)*((Cn=st.current)===null||Cn===void 0?void 0:Cn.clientWidth)})})},[yt.isHiddenScrollBar]),Se<=Ae||!Le||yt.isHiddenScrollBar?null:p.createElement("div",{style:{height:Object(f.a)(),width:Ae,bottom:Me},className:"".concat(xe,"-sticky-scroll")},p.createElement("div",{onMouseDown:Ur,ref:Je,className:E()("".concat(xe,"-sticky-scroll-bar"),Object(P.a)({},"".concat(xe,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},ge=p.forwardRef(Ee);function Oe(He,De){return p.useMemo(function(){var at=!!He;return{isSticky:at,stickyClassName:at?"".concat(De,"-sticky-header"):"",offsetHeader:Object(D.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(D.a)(He)==="object"&&He.offsetScroll||0}},[He,De])}var Qe=[],rt={},nt="rc-table-internal-hook",ut=p.memo(function(He){var De=He.children;return De},function(He,De){return s()(He.props,De.props)?He.pingLeft!==De.pingLeft||He.pingRight!==De.pingRight:!1});function dt(He){var De,at=He.prefixCls,ht=He.className,Ze=He.rowClassName,st=He.style,Ue=He.data,Me=He.rowKey,Ne=He.scroll,xe=He.tableLayout,Se=He.direction,Ae=He.title,Le=He.footer,Je=He.summary,Ve=He.id,gt=He.showHeader,yt=He.components,Bt=He.emptyText,Nt=He.onRow,mr=He.onHeaderRow,hr=He.internalHooks,St=He.transformColumns,$r=He.internalRefs,Xr=He.sticky,Ur=Ue||Qe,sn=!!Ur.length,Rr=p.useState(0),mn=Object(u.a)(Rr,2),vn=mn[0],Gt=mn[1];p.useEffect(function(){Gt(Object(f.a)())});var Cn=p.useMemo(function(){return Object(S.c)(yt,{})},[yt]),yn=p.useCallback(function(Or,Ft){return Object(S.b)(Cn,Or)||Ft},[Cn]),Sn=p.useMemo(function(){return typeof Me=="function"?Me:function(Or){var Ft=Or&&Or[Me];return Ft}},[Me]),xn=Object(v.c)(He),xi=xn.expandIcon,Ti=xn.expandedRowKeys,hn=xn.defaultExpandedRowKeys,cr=xn.defaultExpandAllRows,Gn=xn.expandedRowRender,pi=xn.onExpand,Vn=xn.onExpandedRowsChange,Yr=xn.expandRowByClick,Un=xn.rowExpandable,ui=xn.expandIconColumnIndex,ci=xn.expandedRowClassName,jt=xn.childrenColumnName,_r=xn.indentSize,ai=xi||te,Oi=jt||"children",Ai=p.useMemo(function(){return Gn?"row":He.expandable&&hr===nt&&He.expandable.__PARENT_RENDER_ICON__||Ur.some(function(Or){return Or&&Object(D.a)(Or)==="object"&&Or[Oi]})?"nest":!1},[!!Gn,Ur]),Ri=p.useState(function(){return hn||(cr?J(Ur,Sn,Oi):[])}),se=Object(u.a)(Ri,2),W=se[0],$=se[1],ne=p.useMemo(function(){return new Set(Ti||W||[])},[Ti,W]),ce=p.useCallback(function(Or){var Ft=Sn(Or,Ur.indexOf(Or)),Jt,br=ne.has(Ft);br?(ne.delete(Ft),Jt=Object(T.a)(ne)):Jt=[].concat(Object(T.a)(ne),[Ft]),$(Jt),pi&&pi(!br,Or),Vn&&Vn(Jt)},[Sn,ne,Ur,pi,Vn]),oe=p.useState(0),Ke=Object(u.a)(oe,2),At=Ke[0],Vt=Ke[1],vr=Object(ve.b)(Object(d.a)(Object(d.a)(Object(d.a)({},He),xn),{},{expandable:!!Gn,expandedKeys:ne,getRowKey:Sn,onTriggerExpand:ce,expandIcon:ai,expandIconColumnIndex:ui,direction:Se}),hr===nt?St:null),Pt=Object(u.a)(vr,2),Br=Pt[0],jr=Pt[1],fn=p.useMemo(function(){return{columns:Br,flattenColumns:jr}},[Br,jr]),ti=p.useRef(),mi=p.useRef(),Rn=p.useRef(),Li=p.useState(!1),qi=Object(u.a)(Li,2),Qn=qi[0],_i=qi[1],vi=p.useState(!1),Fi=Object(u.a)(vi,2),gi=Fi[0],Gi=Fi[1],Mi=ue(new Map),oa=Object(u.a)(Mi,2),sa=oa[0],Ii=oa[1],Xn=Object(S.a)(jr),Vi=Xn.map(function(Or){return sa.get(Or)}),ta=p.useMemo(function(){return Vi},[Vi.join("_")]),Ct=fe(ta,jr.length,Se),tt=Ne&&Object(S.d)(Ne.y),pt=Ne&&Object(S.d)(Ne.x),_t=pt&&jr.some(function(Or){var Ft=Or.fixed;return Ft}),Mt=p.useRef(),Dt=Oe(Xr,at),Ht=Dt.isSticky,Wt=Dt.offsetHeader,ct=Dt.offsetScroll,Ot=Dt.stickyClassName,Rt,fr,qt;tt&&(fr={overflowY:"scroll",maxHeight:Ne.y}),pt&&(Rt={overflowX:"auto"},tt||(fr={overflowY:"hidden"}),qt={width:Ne.x===!0?"auto":Ne.x,minWidth:"100%"});var Qt=p.useCallback(function(Or,Ft){Ii(function(Jt){var br=new Map(Jt);return br.set(Or,Ft),br})},[]),Kt=le(null),tr=Object(u.a)(Kt,2),or=tr[0],ot=tr[1];function Dr(Or,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Or):Ft.scrollLeft!==Or&&(Ft.scrollLeft=Or)}var Ir=function(Ft){var Jt=Ft.currentTarget,br=Ft.scrollLeft,Zt=typeof br=="number"?br:Jt.scrollLeft,vt=Jt||rt;if(!ot()||ot()===vt){var bt;or(vt),Dr(Zt,mi.current),Dr(Zt,Rn.current),Dr(Zt,(bt=Mt.current)===null||bt===void 0?void 0:bt.setScrollLeft)}if(Jt){var zt=Jt.scrollWidth,Lt=Jt.clientWidth;_i(Zt>0),Gi(Zt<zt-Lt)}},yr=function(){Rn.current&&Ir({currentTarget:Rn.current})},er=function(Ft){var Jt=Ft.width;yr(),Vt(ti.current?ti.current.offsetWidth:Jt)};p.useEffect(function(){return yr},[]),p.useEffect(function(){pt&&yr()},[pt]),p.useEffect(function(){hr===nt&&$r&&($r.body.current=Rn.current)});var Et=yn(["table"],"table"),wt=p.useMemo(function(){return xe||(_t?Ne.x==="max-content"?"auto":"fixed":tt||jr.some(function(Or){var Ft=Or.ellipsis;return Ft})?"fixed":"auto")},[tt,_t,jr,xe]),xt,$t={colWidths:ta,columCount:jr.length,stickyOffsets:Ct,onHeaderRow:mr,fixHeader:tt},ur=p.useMemo(function(){return sn?null:typeof Bt=="function"?Bt():Bt},[sn,Bt]),sr=p.createElement(ke,{data:Ur,measureColumnWidth:tt||pt||Ht,expandedKeys:ne,rowExpandable:Un,getRowKey:Sn,onRow:Nt,emptyNode:ur,childrenColumnName:Oi}),lr=p.createElement(w,{colWidths:jr.map(function(Or){var Ft=Or.width;return Ft}),columns:jr}),Tr=Je&&p.createElement(Ce.b,null,Je(Ur)),Zr=yn(["body"]);if(tt||Ht){var et;typeof Zr=="function"?(et=Zr(Ur,{scrollbarSize:vn,ref:Rn,onScroll:Ir}),$t.colWidths=jr.map(function(Or,Ft){var Jt=Or.width,br=Ft===Br.length-1?Jt-vn:Jt;return typeof br=="number"&&!Number.isNaN(br)?br:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):et=p.createElement("div",{style:Object(d.a)(Object(d.a)({},Rt),fr),onScroll:Ir,ref:Rn,className:E()("".concat(at,"-body"))},p.createElement(Et,{style:Object(d.a)(Object(d.a)({},qt),{},{tableLayout:wt})},lr,sr,Tr),Ht&&p.createElement(ge,{ref:Mt,offsetScroll:ct,scrollBodyRef:Rn,onScroll:Ir})),xt=p.createElement(p.Fragment,null,gt!==!1&&p.createElement(I,Object.assign({noData:!Ur.length},$t,fn,{direction:Se,offsetHeader:Wt,stickyClassName:Ot,ref:mi,onScroll:Ir})),et)}else xt=p.createElement("div",{style:Object(d.a)(Object(d.a)({},Rt),fr),className:E()("".concat(at,"-content")),onScroll:Ir,ref:Rn},p.createElement(Et,{style:Object(d.a)(Object(d.a)({},qt),{},{tableLayout:wt})},lr,gt!==!1&&p.createElement(b,Object.assign({},$t,fn)),sr,Tr));var ir=Object(v.b)(He),Lr=p.createElement("div",Object.assign({className:E()(at,ht,(De={},Object(P.a)(De,"".concat(at,"-rtl"),Se==="rtl"),Object(P.a)(De,"".concat(at,"-ping-left"),Qn),Object(P.a)(De,"".concat(at,"-ping-right"),gi),Object(P.a)(De,"".concat(at,"-layout-fixed"),xe==="fixed"),Object(P.a)(De,"".concat(at,"-fixed-header"),tt),Object(P.a)(De,"".concat(at,"-fixed-column"),_t),Object(P.a)(De,"".concat(at,"-scroll-horizontal"),pt),Object(P.a)(De,"".concat(at,"-has-fix-left"),jr[0]&&jr[0].fixed),Object(P.a)(De,"".concat(at,"-has-fix-right"),jr[jr.length-1]&&jr[jr.length-1].fixed==="right"),De)),style:st,id:Ve,ref:ti},ir),p.createElement(ut,{pingLeft:Qn,pingRight:gi,props:Object(d.a)(Object(d.a)({},He),{},{stickyOffsets:Ct,mergedExpandedKeys:ne})},Ae&&p.createElement(ee,{className:"".concat(at,"-title")},Ae(Ur)),p.createElement("div",{className:"".concat(at,"-container")},xt),Le&&p.createElement(ee,{className:"".concat(at,"-footer")},Le(Ur))));pt&&(Lr=p.createElement(h.a,{onResize:er},Lr));var Jr=p.useMemo(function(){return{prefixCls:at,getComponent:yn,scrollbarSize:vn,direction:Se,fixedInfoList:jr.map(function(Or,Ft){return t(Ft,Ft,jr,Ct,Se)}),isSticky:Ht}},[at,yn,vn,Se,jr,Ct,Se,Ht]),gr=p.useMemo(function(){return Object(d.a)(Object(d.a)({},fn),{},{tableLayout:wt,rowClassName:Ze,expandedRowClassName:ci,componentWidth:At,fixHeader:tt,fixColumn:_t,horizonScroll:pt,expandIcon:ai,expandableType:Ai,expandRowByClick:Yr,expandedRowRender:Gn,onTriggerExpand:ce,expandIconColumnIndex:ui,indentSize:_r})},[fn,wt,Ze,ci,At,tt,_t,pt,ai,Ai,Yr,Gn,ce,ui,_r]),pr=p.useMemo(function(){return{onColumnResize:Qt}},[Qt]);return p.createElement(a.a.Provider,{value:Jr},p.createElement(z.Provider,{value:gr},p.createElement(ae.Provider,{value:pr},Lr)))}dt.Column=m.a,dt.ColumnGroup=c.a,dt.Summary=Ce.a,dt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var mt=Z.b=dt},wRmb:function(j,Z,L){"use strict";L.d(Z,"a",function(){return s});var P=L("rePB"),d=L("KQm4"),T=L("VTBJ"),D=L("Ff2n"),u=L("q1tI"),p=L.n(u),C=L("Kwbf"),E=L("Zm9Q"),l=L("hW8S");function s(m){return Object(E.a)(m).filter(function(_){return u.isValidElement(_)}).map(function(_){var y=_.key,i=_.props,a=i.children,t=Object(D.a)(i,["children"]),S=Object(T.a)({key:y},t);return a&&(S.children=s(a)),S})}function n(m){return m.reduce(function(_,y){var i=y.fixed,a=i===!0?"left":i,t=y.children;return t&&t.length>0?[].concat(Object(d.a)(_),Object(d.a)(n(t).map(function(S){return Object(T.a)({fixed:a},S)}))):[].concat(Object(d.a)(_),[Object(T.a)(Object(T.a)({},y),{},{fixed:a})])},[])}function h(m){for(var _=!0,y=0;y<m.length;y+=1){var i=m[y];if(_&&i.fixed!=="left")_=!1;else if(!_&&i.fixed==="left"){Object(C.a)(!1,"Index ".concat(y-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,t=m.length-1;t>=0;t-=1){var S=m[t];if(a&&S.fixed!=="right")a=!1;else if(!a&&S.fixed==="right"){Object(C.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function f(m){return m.map(function(_){var y=_.fixed,i=Object(D.a)(_,["fixed"]),a=y;return y==="left"?a="right":y==="right"&&(a="left"),Object(T.a)({fixed:a},i)})}function c(m,_){var y=m.prefixCls,i=m.columns,a=m.children,t=m.expandable,S=m.expandedKeys,x=m.getRowKey,o=m.onTriggerExpand,k=m.expandIcon,O=m.rowExpandable,b=m.expandIconColumnIndex,v=m.direction,g=m.expandRowByClick,w=u.useMemo(function(){return i||s(a)},[i,a]),M=u.useMemo(function(){if(t){var G,z=b||0,H=w[z],K=(G={},Object(P.a)(G,l.a,{className:"".concat(y,"-expand-icon-col")}),Object(P.a)(G,"title",""),Object(P.a)(G,"fixed",H?H.fixed:null),Object(P.a)(G,"className","".concat(y,"-row-expand-icon-cell")),Object(P.a)(G,"render",function(V,ae,he){var pe=x(ae,he),Re=S.has(pe),ke=O?O(ae):!0,ve=k({prefixCls:y,expanded:Re,expandable:ke,record:ae,onExpand:o});return g?u.createElement("span",{onClick:function(be){return be.stopPropagation()}},ve):ve}),G),U=w.slice();return z>=0&&U.splice(z,0,K),U}return w},[t,w,x,S,k,v]),N=u.useMemo(function(){var G=M;return _&&(G=_(G)),G.length||(G=[{render:function(){return null}}]),G},[_,M,v]),I=u.useMemo(function(){return v==="rtl"?f(n(N)):n(N)},[N,v]);return[N,I]}Z.b=c},wZgz:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.BlockCipher,u=d.algo,p=[],C=[],E=[],l=[],s=[],n=[],h=[],f=[],c=[],m=[];(function(){for(var i=[],a=0;a<256;a++)a<128?i[a]=a<<1:i[a]=a<<1^283;for(var t=0,S=0,a=0;a<256;a++){var x=S^S<<1^S<<2^S<<3^S<<4;x=x>>>8^x&255^99,p[t]=x,C[x]=t;var o=i[t],k=i[o],O=i[k],b=i[x]*257^x*16843008;E[t]=b<<24|b>>>8,l[t]=b<<16|b>>>16,s[t]=b<<8|b>>>24,n[t]=b;var b=O*16843009^k*65537^o*257^t*16843008;h[x]=b<<24|b>>>8,f[x]=b<<16|b>>>16,c[x]=b<<8|b>>>24,m[x]=b,t?(t=o^i[i[i[O^o]]],S^=i[i[S]]):t=S=1}})();var _=[0,1,2,4,8,16,32,64,128,27,54],y=u.AES=D.extend({_doReset:function(){var i;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var a=this._keyPriorReset=this._key,t=a.words,S=a.sigBytes/4,x=this._nRounds=S+6,o=(x+1)*4,k=this._keySchedule=[],O=0;O<o;O++)O<S?k[O]=t[O]:(i=k[O-1],O%S?S>6&&O%S==4&&(i=p[i>>>24]<<24|p[i>>>16&255]<<16|p[i>>>8&255]<<8|p[i&255]):(i=i<<8|i>>>24,i=p[i>>>24]<<24|p[i>>>16&255]<<16|p[i>>>8&255]<<8|p[i&255],i^=_[O/S|0]<<24),k[O]=k[O-S]^i);for(var b=this._invKeySchedule=[],v=0;v<o;v++){var O=o-v;if(v%4)var i=k[O];else var i=k[O-4];v<4||O<=4?b[v]=i:b[v]=h[p[i>>>24]]^f[p[i>>>16&255]]^c[p[i>>>8&255]]^m[p[i&255]]}},encryptBlock:function(i,a){this._doCryptBlock(i,a,this._keySchedule,E,l,s,n,p)},decryptBlock:function(i,a){var t=i[a+1];i[a+1]=i[a+3],i[a+3]=t,this._doCryptBlock(i,a,this._invKeySchedule,h,f,c,m,C);var t=i[a+1];i[a+1]=i[a+3],i[a+3]=t},_doCryptBlock:function(i,a,t,S,x,o,k,O){for(var b=this._nRounds,v=i[a]^t[0],g=i[a+1]^t[1],w=i[a+2]^t[2],M=i[a+3]^t[3],N=4,I=1;I<b;I++){var G=S[v>>>24]^x[g>>>16&255]^o[w>>>8&255]^k[M&255]^t[N++],z=S[g>>>24]^x[w>>>16&255]^o[M>>>8&255]^k[v&255]^t[N++],H=S[w>>>24]^x[M>>>16&255]^o[v>>>8&255]^k[g&255]^t[N++],K=S[M>>>24]^x[v>>>16&255]^o[g>>>8&255]^k[w&255]^t[N++];v=G,g=z,w=H,M=K}var G=(O[v>>>24]<<24|O[g>>>16&255]<<16|O[w>>>8&255]<<8|O[M&255])^t[N++],z=(O[g>>>24]<<24|O[w>>>16&255]<<16|O[M>>>8&255]<<8|O[v&255])^t[N++],H=(O[w>>>24]<<24|O[M>>>16&255]<<16|O[v>>>8&255]<<8|O[g&255])^t[N++],K=(O[M>>>24]<<24|O[v>>>16&255]<<16|O[g>>>8&255]<<8|O[w&255])^t[N++];i[a]=G,i[a+1]=z,i[a+2]=H,i[a+3]=K},keySize:256/32});d.AES=D._createHelper(y)}(),P.AES})},wbyO:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Base64url={stringify:function(E,l=!0){var s=E.words,n=E.sigBytes,h=l?this._safe_map:this._map;E.clamp();for(var f=[],c=0;c<n;c+=3)for(var m=s[c>>>2]>>>24-c%4*8&255,_=s[c+1>>>2]>>>24-(c+1)%4*8&255,y=s[c+2>>>2]>>>24-(c+2)%4*8&255,i=m<<16|_<<8|y,a=0;a<4&&c+a*.75<n;a++)f.push(h.charAt(i>>>6*(3-a)&63));var t=h.charAt(64);if(t)for(;f.length%4;)f.push(t);return f.join("")},parse:function(E,l=!0){var s=E.length,n=l?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var f=0;f<n.length;f++)h[n.charCodeAt(f)]=f}var c=n.charAt(64);if(c){var m=E.indexOf(c);m!==-1&&(s=m)}return C(E,s,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function C(E,l,s){for(var n=[],h=0,f=0;f<l;f++)if(f%4){var c=s[E.charCodeAt(f-1)]<<f%4*2,m=s[E.charCodeAt(f)]>>>6-f%4*2,_=c|m;n[h>>>2]|=_<<24-h%4*8,h++}return D.create(n,h)}}(),P.enc.Base64url})},"y0+3":function(j,Z,L){"use strict";L.d(Z,"a",function(){return n}),L.d(Z,"b",function(){return f});var P=/margin|padding|width|height|max|min|offset/,d={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function D(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function u(c,m,_){if(m=m.toLowerCase(),_==="auto"){if(m==="height")return c.offsetHeight;if(m==="width")return c.offsetWidth}return m in d||(d[m]=P.test(m)),d[m]?parseFloat(_)||0:_}function p(c,m){var _=arguments.length,y=D(c);return m=T[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,_===1?y:u(c,m,y[m]||c.style[m])}function C(c,m,_){var y=arguments.length;if(m=T[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,y===3)return typeof _=="number"&&P.test(m)&&(_="".concat(_,"px")),c.style[m]=_,_;for(var i in m)m.hasOwnProperty(i)&&C(c,i,m[i]);return D(c)}function E(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function l(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function s(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),m=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:m}}function n(){var c=document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:m}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function f(c){var m=c.getBoundingClientRect(),_=document.documentElement;return{left:m.left+(window.pageXOffset||_.scrollLeft)-(_.clientLeft||document.body.clientLeft||0),top:m.top+(window.pageYOffset||_.scrollTop)-(_.clientTop||document.body.clientTop||0)}}},zrhs:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("PpiC"),D=L("q1tI"),u=L.n(D),p=L("9kvl"),C=function(l){var s=l.shixunsDetail,n=l.globalSetting,h=l.loading,f=l.dispatch,c=Object(T.a)(l,["shixunsDetail","globalSetting","loading","dispatch"]);return u.a.createElement(d.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:s.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){f({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){f({type:"shixunsDetail/setActionTabs",payload:{}})}},u.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",u.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Z.a=Object(p.a)(function(E){var l=E.shixunsDetail,s=E.loading,n=E.globalSetting;return{shixunsDetail:l,globalSetting:n,loading:s.models.index}})(C)}}]);