(window.webpackJsonp=window.webpackJsonp||[]).push([[211,5,6,7,8,13],{"+NIl":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(v,O){"use strict";function M(i,o){i.cmdState.push(o)}function y(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function m(i){var o=i.cmdState.pop();o&&o.closeBracket()}function S(i){for(var o=i.cmdState,s=o.length-1;s>=0;s--){var u=o[s];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function b(i,o,s){return function(){this.name=i,this.bracketNo=0,this.style=o,this.styles=s,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var p={};p.importmodule=b("importmodule","tag",["string","builtin"]),p.documentclass=b("documentclass","tag",["","atom"]),p.usepackage=b("usepackage","tag",["atom"]),p.begin=b("begin","tag",["atom"]),p.end=b("end","tag",["atom"]),p.label=b("label","tag",["atom"]),p.ref=b("ref","tag",["atom"]),p.eqref=b("eqref","tag",["atom"]),p.cite=b("cite","tag",["atom"]),p.bibitem=b("bibitem","tag",["atom"]),p.Bibitem=b("Bibitem","tag",["atom"]),p.RBibitem=b("RBibitem","tag",["atom"]),p.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(i,o){i.f=o}function t(i,o){var s;if(i.match(/^\\[a-zA-Z@]+/)){var u=i.current().slice(1);return s=p.hasOwnProperty(u)?p[u]:p.DEFAULT,s=new s,M(o,s),d(o,r),s.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return d(o,function(c,f){return l(c,f,"\\]")}),"keyword";if(i.match("\\("))return d(o,function(c,f){return l(c,f,"\\)")}),"keyword";if(i.match("$$"))return d(o,function(c,f){return l(c,f,"$$")}),"keyword";if(i.match("$"))return d(o,function(c,f){return l(c,f,"$")}),"keyword";var a=i.next();if(a=="%")return i.skipToEnd(),"comment";if(a=="}"||a=="]"){if(s=y(o),s)s.closeBracket(a),d(o,r);else return"error";return"bracket"}else return a=="{"||a=="["?(s=p.DEFAULT,s=new s,M(o,s),"bracket"):/\d/.test(a)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),s=S(o),s.name=="begin"&&(s.argument=i.current()),s.styleIdentifier())}function l(i,o,s){if(i.eatSpace())return null;if(s&&i.match(s))return d(o,t),"keyword";if(i.match(/^\\[a-zA-Z@]+/))return"tag";if(i.match(/^[a-zA-Z]+/))return"variable-2";if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/]/))return"tag";if(i.match(/^[\^_&]/))return"tag";if(i.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(i.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=i.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(i.skipToEnd(),"comment"):"error"}function r(i,o){var s=i.peek(),u;return s=="{"||s=="["?(u=y(o),u.openBracket(s),i.eat(s),d(o,t),"bracket"):/[ \t\r]/.test(s)?(i.eat(s),null):(d(o,t),m(o),t(i,o))}return{startState:function(){var i=O.inMathMode?function(o,s){return l(o,s)}:t;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,o){return o.f(i,o)},blankLine:function(i){i.f=t,i.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(F,$,j){},"19Vz":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){N.defineOption("placeholder","",function(b,p,d){var t=d&&d!=N.Init;if(p&&!t)b.on("blur",y),b.on("change",m),b.on("swapDoc",m),N.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){M(b)}),m(b);else if(!p&&t){b.off("blur",y),b.off("change",m),b.off("swapDoc",m),N.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),v(b);var l=b.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}p&&!b.hasFocus()&&y(b)});function v(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){v(b);var p=b.state.placeholder=document.createElement("pre");p.style.cssText="height: 0; overflow: visible",p.style.direction=b.getOption("direction"),p.className="CodeMirror-placeholder CodeMirror-line-like";var d=b.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),p.appendChild(d),b.display.lineSpace.insertBefore(p,b.display.lineSpace.firstChild)}function M(b){setTimeout(function(){var p=!1,d=b.getInputField();d.nodeName=="TEXTAREA"?p=!d.value:b.lineCount()==1&&(p=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),p?O(b):v(b)},20)}function y(b){S(b)&&O(b)}function m(b){var p=b.getWrapperElement(),d=S(b);p.className=p.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?O(b):v(b)}function S(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1T2W":function(F,$,j){F.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(M,y){var m=M.indentUnit,S={},b=y.htmlMode?v:O;for(var p in b)S[p]=b[p];for(var p in y)S[p]=y[p];var d,t;function l(T,k){function L(K){return k.tokenize=K,K(T,k)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?L(o("atom","]]>")):null:T.match("--")?L(o("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),L(s(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),k.tokenize=o("meta","?>"),"meta"):(d=T.eat("/")?"closeTag":"openTag",k.tokenize=r,"tag bracket");if(A=="&"){var G;return T.eat("#")?T.eat("x")?G=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):G=T.eatWhile(/[\d]/)&&T.eat(";"):G=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),G?"atom":"error"}else return T.eatWhile(/[^&<]/),null}l.isInText=!0;function r(T,k){var L=T.next();if(L==">"||L=="/"&&T.eat(">"))return k.tokenize=l,d=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return d="equals",null;if(L=="<"){k.tokenize=l,k.state=f,k.tagName=k.tagStart=null;var A=k.tokenize(T,k);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(L)?(k.tokenize=i(L),k.stringStartCol=T.column(),k.tokenize(T,k)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(T){var k=function(L,A){for(;!L.eol();)if(L.next()==T){A.tokenize=r;break}return"string"};return k.isInAttribute=!0,k}function o(T,k){return function(L,A){for(;!L.eol();){if(L.match(k)){A.tokenize=l;break}L.next()}return T}}function s(T){return function(k,L){for(var A;(A=k.next())!=null;){if(A=="<")return L.tokenize=s(T+1),L.tokenize(k,L);if(A==">")if(T==1){L.tokenize=l;break}else return L.tokenize=s(T-1),L.tokenize(k,L)}return"meta"}}function u(T,k,L){this.prev=T.context,this.tagName=k,this.indent=T.indented,this.startOfLine=L,(S.doNotIndent.hasOwnProperty(k)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function a(T){T.context&&(T.context=T.context.prev)}function c(T,k){for(var L;;){if(!T.context)return;if(L=T.context.tagName,!S.contextGrabbers.hasOwnProperty(L)||!S.contextGrabbers[L].hasOwnProperty(k))return;a(T)}}function f(T,k,L){return T=="openTag"?(L.tagStart=k.column(),w):T=="closeTag"?_:f}function w(T,k,L){return T=="word"?(L.tagName=k.current(),t="tag",C):S.allowMissingTagName&&T=="endTag"?(t="tag bracket",C(T,k,L)):(t="error",w)}function _(T,k,L){if(T=="word"){var A=k.current();return L.context&&L.context.tagName!=A&&S.implicitlyClosed.hasOwnProperty(L.context.tagName)&&a(L),L.context&&L.context.tagName==A||S.matchClosing===!1?(t="tag",h):(t="tag error",R)}else return S.allowMissingTagName&&T=="endTag"?(t="tag bracket",h(T,k,L)):(t="error",R)}function h(T,k,L){return T!="endTag"?(t="error",h):(a(L),f)}function R(T,k,L){return t="error",h(T,k,L)}function C(T,k,L){if(T=="word")return t="attribute",g;if(T=="endTag"||T=="selfcloseTag"){var A=L.tagName,G=L.tagStart;return L.tagName=L.tagStart=null,T=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(A)?c(L,A):(c(L,A),L.context=new u(L,A,G==L.indented)),f}return t="error",C}function g(T,k,L){return T=="equals"?x:(S.allowMissing||(t="error"),C(T,k,L))}function x(T,k,L){return T=="string"?E:T=="word"&&S.allowUnquoted?(t="string",C):(t="error",C(T,k,L))}function E(T,k,L){return T=="string"?E:C(T,k,L)}return{startState:function(T){var k={tokenize:l,state:f,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(k.baseIndent=T),k},token:function(T,k){if(!k.tagName&&T.sol()&&(k.indented=T.indentation()),T.eatSpace())return null;d=null;var L=k.tokenize(T,k);return(L||d)&&L!="comment"&&(t=null,k.state=k.state(d||L,T,k),t&&(L=t=="error"?L+" error":t)),L},indent:function(T,k,L){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=r&&T.tokenize!=l)return L?L.match(/^(\s*)/)[0].length:0;if(T.tagName)return S.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=C)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var k=[],L=T.context;L;L=L.prev)L.tagName&&k.push(L.tagName);return k.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Hasher,y=v.x64,m=y.Word,S=y.WordArray,b=v.algo;function p(){return m.create.apply(m,arguments)}var d=[p(1116352408,3609767458),p(1899447441,602891725),p(3049323471,3964484399),p(3921009573,2173295548),p(961987163,4081628472),p(1508970993,3053834265),p(2453635748,2937671579),p(2870763221,3664609560),p(3624381080,2734883394),p(310598401,1164996542),p(607225278,1323610764),p(1426881987,3590304994),p(1925078388,4068182383),p(2162078206,991336113),p(2614888103,633803317),p(3248222580,3479774868),p(3835390401,2666613458),p(4022224774,944711139),p(264347078,2341262773),p(604807628,2007800933),p(770255983,1495990901),p(1249150122,1856431235),p(1555081692,3175218132),p(1996064986,2198950837),p(2554220882,3999719339),p(2821834349,766784016),p(2952996808,2566594879),p(3210313671,3203337956),p(3336571891,1034457026),p(3584528711,2466948901),p(113926993,3758326383),p(338241895,168717936),p(666307205,1188179964),p(773529912,1546045734),p(1294757372,1522805485),p(1396182291,2643833823),p(1695183700,2343527390),p(1986661051,1014477480),p(2177026350,1206759142),p(2456956037,344077627),p(2730485921,1290863460),p(2820302411,3158454273),p(3259730800,3505952657),p(3345764771,106217008),p(3516065817,3606008344),p(3600352804,1432725776),p(4094571909,1467031594),p(275423344,851169720),p(430227734,3100823752),p(506948616,1363258195),p(659060556,3750685593),p(883997877,3785050280),p(958139571,3318307427),p(1322822218,3812723403),p(1537002063,2003034995),p(1747873779,3602036899),p(1955562222,1575990012),p(2024104815,1125592928),p(2227730452,2716904306),p(2361852424,442776044),p(2428436474,593698344),p(2756734187,3733110249),p(3204031479,2999351573),p(3329325298,3815920427),p(3391569614,3928383900),p(3515267271,566280711),p(3940187606,3454069534),p(4118630271,4000239992),p(116418474,1914138554),p(174292421,2731055270),p(289380356,3203993006),p(460393269,320620315),p(685471733,587496836),p(852142971,1086792851),p(1017036298,365543100),p(1126000580,2618297676),p(1288033470,3409855158),p(1501505948,4234509866),p(1607167915,987167468),p(1816402316,1246189591)],t=[];(function(){for(var r=0;r<80;r++)t[r]=p()})();var l=b.SHA512=M.extend({_doReset:function(){this._hash=new S.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var o=this._hash.words,s=o[0],u=o[1],a=o[2],c=o[3],f=o[4],w=o[5],_=o[6],h=o[7],R=s.high,C=s.low,g=u.high,x=u.low,E=a.high,T=a.low,k=c.high,L=c.low,A=f.high,G=f.low,K=w.high,W=w.low,z=_.high,U=_.low,P=h.high,H=h.low,V=R,q=C,Z=g,ce=x,he=E,ae=T,xe=k,ge=L,oe=A,se=G,te=K,be=W,ee=z,ie=U,Ee=P,ne=H,J=0;J<80;J++){var X,Q,me=t[J];if(J<16)Q=me.high=r[i+J*2]|0,X=me.low=r[i+J*2+1]|0;else{var fe=t[J-15],Te=fe.high,ze=fe.low,Je=(Te>>>1|ze<<31)^(Te>>>8|ze<<24)^Te>>>7,qe=(ze>>>1|Te<<31)^(ze>>>8|Te<<24)^(ze>>>7|Te<<25),Xe=t[J-2],et=Xe.high,rt=Xe.low,Le=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,Oe=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),Ve=t[J-7],Ze=Ve.high,Ne=Ve.low,Ge=t[J-16],De=Ge.high,we=Ge.low;X=qe+Ne,Q=Je+Ze+(X>>>0>>0?1:0),X=X+Oe,Q=Q+Le+(X>>>0>>0?1:0),X=X+we,Q=Q+De+(X>>>0>>0?1:0),me.high=Q,me.low=X}var Ae=oe&te^~oe&ee,de=se&be^~se&ie,_e=V&Z^V&he^Z&he,Se=q&ce^q&ae^ce&ae,Ie=(V>>>28|q<<4)^(V<<30|q>>>2)^(V<<25|q>>>7),ke=(q>>>28|V<<4)^(q<<30|V>>>2)^(q<<25|V>>>7),Ye=(oe>>>14|se<<18)^(oe>>>18|se<<14)^(oe<<23|se>>>9),nt=(se>>>14|oe<<18)^(se>>>18|oe<<14)^(se<<23|oe>>>9),lt=d[J],at=lt.high,ot=lt.low,Ct=ne+nt,bt=Ee+Ye+(Ct>>>0>>0?1:0),Ct=Ct+de,bt=bt+Ae+(Ct>>>0>>0?1:0),Ct=Ct+ot,bt=bt+at+(Ct>>>0>>0?1:0),Ct=Ct+X,bt=bt+Q+(Ct>>>0>>0?1:0),ft=ke+Se,jt=Ie+_e+(ft>>>0>>0?1:0);Ee=ee,ne=ie,ee=te,ie=be,te=oe,be=se,se=ge+Ct|0,oe=xe+bt+(se>>>0>>0?1:0)|0,xe=he,ge=ae,he=Z,ae=ce,Z=V,ce=q,q=Ct+ft|0,V=bt+jt+(q>>>0>>0?1:0)|0}C=s.low=C+q,s.high=R+V+(C>>>0>>0?1:0),x=u.low=x+ce,u.high=g+Z+(x>>>0>>0?1:0),T=a.low=T+ae,a.high=E+he+(T>>>0>>0?1:0),L=c.low=L+ge,c.high=k+xe+(L>>>0>>0?1:0),G=f.low=G+se,f.high=A+oe+(G>>>0>>0?1:0),W=w.low=W+be,w.high=K+te+(W>>>0>>0?1:0),U=_.low=U+ie,_.high=z+ee+(U>>>0>>0?1:0),H=h.low=H+ne,h.high=P+Ee+(H>>>0>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,o=this._nDataBytes*8,s=r.sigBytes*8;i[s>>>5]|=128<<24-s%32,i[(s+128>>>10<<5)+30]=Math.floor(o/4294967296),i[(s+128>>>10<<5)+31]=o,r.sigBytes=i.length*4,this._process();var u=this._hash.toX32();return u},clone:function(){var r=M.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=M._createHelper(l),v.HmacSHA512=M._createHmacHelper(l)}(),N.SHA512})},"3y9D":function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=O.Hasher,m=v.algo,S=[],b=m.SHA1=y.extend({_doReset:function(){this._hash=new M.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,d){for(var t=this._hash.words,l=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=0;u<80;u++){if(u<16)S[u]=p[d+u]|0;else{var a=S[u-3]^S[u-8]^S[u-14]^S[u-16];S[u]=a<<1|a>>>31}var c=(l<<5|l>>>27)+s+S[u];u<20?c+=(r&i|~r&o)+1518500249:u<40?c+=(r^i^o)+1859775393:u<60?c+=(r&i|r&o|i&o)-1894007588:c+=(r^i^o)-899497514,s=o,o=i,i=r<<30|r>>>2,r=l,l=c}t[0]=t[0]+l|0,t[1]=t[1]+r|0,t[2]=t[2]+i|0,t[3]=t[3]+o|0,t[4]=t[4]+s|0},_doFinalize:function(){var p=this._data,d=p.words,t=this._nDataBytes*8,l=p.sigBytes*8;return d[l>>>5]|=128<<24-l%32,d[(l+64>>>9<<4)+14]=Math.floor(t/4294967296),d[(l+64>>>9<<4)+15]=t,p.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var p=y.clone.call(this);return p._hash=this._hash.clone(),p}});v.SHA1=y._createHelper(b),v.HmacSHA1=y._createHmacHelper(b)}(),N.SHA1})},4:function(F,$){},"5VLF":function(F,$,j){"use strict";var N,v;function O(M,y,m){var S=function(b,p){return M.js_beautify(b,p)};return S.js=M.js_beautify,S.css=y.css_beautify,S.html=m.html_beautify,S.js_beautify=M.js_beautify,S.css_beautify=y.css_beautify,S.html_beautify=m.html_beautify,S}!(N=[j("6UM0"),j("TXwP"),j("psGv")],v=function(M,y,m){return O(M,y,m)}.apply($,N),v!==void 0&&(F.exports=v))},"5hvy":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.x64,b=S.Word,p=O.algo,d=[],t=[],l=[];(function(){for(var o=1,s=0,u=0;u<24;u++){d[o+5*s]=(u+1)*(u+2)/2%64;var a=s%5,c=(2*o+3*s)%5;o=a,s=c}for(var o=0;o<5;o++)for(var s=0;s<5;s++)t[o+5*s]=s+(2*o+3*s)%5*5;for(var f=1,w=0;w<24;w++){for(var _=0,h=0,R=0;R<7;R++){if(f&1){var C=(1<>>24)&16711935|(f<<24|f>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var _=u[c];_.high^=w,_.low^=f}for(var h=0;h<24;h++){for(var R=0;R<5;R++){for(var C=0,g=0,x=0;x<5;x++){var _=u[R+5*x];C^=_.high,g^=_.low}var E=r[R];E.high=C,E.low=g}for(var R=0;R<5;R++)for(var T=r[(R+4)%5],k=r[(R+1)%5],L=k.high,A=k.low,C=T.high^(L<<1|A>>>31),g=T.low^(A<<1|L>>>31),x=0;x<5;x++){var _=u[R+5*x];_.high^=C,_.low^=g}for(var G=1;G<25;G++){var C,g,_=u[G],K=_.high,W=_.low,z=d[G];z<32?(C=K<>>32-z,g=W<>>32-z):(C=W<>>64-z,g=K<>>64-z);var U=r[t[G]];U.high=C,U.low=g}var P=r[0],H=u[0];P.high=H.high,P.low=H.low;for(var R=0;R<5;R++)for(var x=0;x<5;x++){var G=R+5*x,_=u[G],V=r[G],q=r[(R+1)%5+5*x],Z=r[(R+2)%5+5*x];_.high=V.high^~q.high&Z.high,_.low=V.low^~q.low&Z.low}var _=u[0],ce=l[h];_.high^=ce.high,_.low^=ce.low}},_doFinalize:function(){var o=this._data,s=o.words,u=this._nDataBytes*8,a=o.sigBytes*8,c=this.blockSize*32;s[a>>>5]|=1<<24-a%32,s[(v.ceil((a+1)/c)*c>>>5)-1]|=128,o.sigBytes=s.length*4,this._process();for(var f=this._state,w=this.cfg.outputLength/8,_=w/8,h=[],R=0;R<_;R++){var C=f[R],g=C.high,x=C.low;g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,h.push(x),h.push(g)}return new y.init(h,w)},clone:function(){for(var o=m.clone.call(this),s=o._state=this._state.slice(0),u=0;u<25;u++)s[u]=s[u].clone();return o}});O.SHA3=m._createHelper(i),O.HmacSHA3=m._createHmacHelper(i)}(Math),N.SHA3})},"5nXd":function(F,$,j){var N=j("MFOe"),v=N.slice,O=N.pluck,M=N.each,y=N.bind,m=N.create,S=N.isList,b=N.isFunction,p=N.isObject;F.exports={createStore:l};var d={version:"2.0.12",enabled:!1,get:function(r,i){var o=this.storage.read(this._namespacePrefix+r);return this._deserialize(o,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(o,s){r.call(i,i._deserialize(o),(s||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function t(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,o){o||(o=""),r&&!S(r)&&(r=[r]),i&&!S(i)&&(i=[i]);var s=o?"__storejs_"+o+"_":"",u=o?new RegExp("^"+s):null,a=/^[a-zA-Z0-9_\-]*$/;if(!a.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var c={_namespacePrefix:s,_namespaceRegexp:u,_testStorage:function(w){try{var _="__storejs__test__";w.write(_,_);var h=w.read(_)===_;return w.remove(_),h}catch(R){return!1}},_assignPluginFnProp:function(w,_){var h=this[_];this[_]=function(){var C=v(arguments,0),g=this;function x(){return h?(M(arguments,function(T,k){C[k]=T}),h.apply(g,C)):void 0}var E=[x].concat(C);return w.apply(g,E)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,_){if(!w)return _;var h="";try{h=JSON.parse(w)}catch(R){h=w}return h!==void 0?h:_},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var _=this;if(S(w)){M(w,function(C){_._addPlugin(C)});return}var h=O(this.plugins,function(C){return w===C});if(h)return;if(this.plugins.push(w),!b(w))throw new Error("Plugins must be function values that return objects");var R=w.call(this);if(!p(R))throw new Error("Plugins must return an object of function properties");M(R,function(C,g){if(!b(C))throw new Error("Bad plugin property: "+g+" from plugin "+w.name+". Plugins should only return functions.");_._assignPluginFnProp(C,g)})},addStorage:function(w){t("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},f=m(c,d,{plugins:[]});return f.raw={},M(f,function(w,_){b(w)&&(f.raw[_]=y(f,w))}),M(r,function(w){f._addStorage(w)}),M(i,function(w){f._addPlugin(w)}),f}},"6+eU":function(F,$,j){"use strict";j.d($,"a",function(){return h});var N=j("wx14"),v=j("rePB"),O=j("VTBJ"),M=j("1OyB"),y=j("vuIU"),m=j("Ji7U"),S=j("LK+K"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=function(C){var g,x="".concat(C.rootPrefixCls,"-item"),E=t()(x,"".concat(x,"-").concat(C.page),(g={},Object(v.a)(g,"".concat(x,"-active"),C.active),Object(v.a)(g,C.className,!!C.className),Object(v.a)(g,"".concat(x,"-disabled"),!C.page),g)),T=function(){C.onClick(C.page)},k=function(A){C.onKeyPress(A,C.onClick,C.page)};return p.a.createElement("li",{title:C.showTitle?C.page:null,className:E,onClick:T,onKeyPress:k,tabIndex:"0"},C.itemRender(C.page,"page",p.a.createElement("a",{rel:"nofollow"},C.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(R){Object(m.a)(g,R);var C=Object(S.a)(g);function g(){var x;Object(M.a)(this,g);for(var E=arguments.length,T=new Array(E),k=0;k=0||L.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;x.setState({goInputText:""}),K(x.getValidValue())},x.go=function(L){var A=x.state.goInputText;if(A==="")return;(L.keyCode===i.ENTER||L.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(y.a)(g,[{key:"getValidValue",value:function(){var E=this.state,T=E.goInputText,k=E.current;return!T||isNaN(T)?k:Number(T)}},{key:"getPageSizeOptions",value:function(){var E=this.props,T=E.pageSize,k=E.pageSizeOptions;return k.some(function(L){return L.toString()===T.toString()})?k:k.concat([T.toString()]).sort(function(L,A){var G=isNaN(Number(L))?0:Number(L),K=isNaN(Number(A))?0:Number(A);return G-K})}},{key:"render",value:function(){var E=this,T=this.props,k=T.pageSize,L=T.locale,A=T.rootPrefixCls,G=T.changeSize,K=T.quickGo,W=T.goButton,z=T.selectComponentClass,U=T.buildOptionText,P=T.selectPrefixCls,H=T.disabled,V=this.state.goInputText,q="".concat(A,"-options"),Z=z,ce=null,he=null,ae=null;if(!G&&!K)return null;var xe=this.getPageSizeOptions();if(G&&Z){var ge=xe.map(function(oe,se){return p.a.createElement(Z.Option,{key:se,value:oe.toString()},(U||E.buildOptionText)(oe))});ce=p.a.createElement(Z,{disabled:H,prefixCls:P,showSearch:!1,className:"".concat(q,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},ge)}return K&&(W&&(ae=typeof W=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:H,className:"".concat(q,"-quick-jumper-button")},L.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),he=p.a.createElement("div",{className:"".concat(q,"-quick-jumper")},L.jump_to,p.a.createElement("input",{disabled:H,type:"text",value:V,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),L.page,ae)),p.a.createElement("li",{className:"".concat(q)},ce,he)}}]),g}(p.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var s=o,u=j("N2Kk");function a(){}function c(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function f(R,C,g){return g}function w(R,C,g){var x=typeof R=="undefined"?C.pageSize:R;return Math.floor((g.total-1)/x)+1}var _=function(R){Object(m.a)(g,R);var C=Object(S.a)(g);function g(x){var E;Object(M.a)(this,g),E=C.call(this,x),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(w(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(G,K){var W=E.props.prefixCls,z=G||p.a.createElement("button",{type:"button","aria-label":K,className:"".concat(W,"-item-link")});return typeof G=="function"&&(z=p.a.createElement(G,Object(O.a)({},E.props))),z},E.savePaginationNode=function(G){E.paginationNode=G},E.isValid=function(G){return c(G)&&G!==E.state.current},E.shouldDisplayQuickJumper=function(){var G=E.props,K=G.showQuickJumper,W=G.pageSize,z=G.total;return z<=W?!1:K},E.handleKeyDown=function(G){(G.keyCode===i.ARROW_UP||G.keyCode===i.ARROW_DOWN)&&G.preventDefault()},E.handleKeyUp=function(G){var K=E.getValidValue(G),W=E.state.currentInputValue;K!==W&&E.setState({currentInputValue:K}),G.keyCode===i.ENTER?E.handleChange(K):G.keyCode===i.ARROW_UP?E.handleChange(K-1):G.keyCode===i.ARROW_DOWN&&E.handleChange(K+1)},E.changePageSize=function(G){var K=E.state.current,W=w(G,E.state,E.props);K=K>W?W:K,W===0&&(K=E.state.current),typeof G=="number"&&("pageSize"in E.props||E.setState({pageSize:G}),"current"in E.props||E.setState({current:K,currentInputValue:K})),E.props.onShowSizeChange(K,G),"onChange"in E.props&&E.props.onChange&&E.props.onChange(K,G)},E.handleChange=function(G){var K=E.props.disabled,W=G;if(E.isValid(W)&&!K){var z=w(void 0,E.state,E.props);W>z?W=z:W<1&&(W=1),"current"in E.props||E.setState({current:W,currentInputValue:W});var U=E.state.pageSize;return E.props.onChange(W,U),W}return E.state.current},E.prev=function(){E.hasPrev()&&E.handleChange(E.state.current-1)},E.next=function(){E.hasNext()&&E.handleChange(E.state.current+1)},E.jumpPrev=function(){E.handleChange(E.getJumpPrevPage())},E.jumpNext=function(){E.handleChange(E.getJumpNextPage())},E.hasPrev=function(){return E.state.current>1},E.hasNext=function(){return E.state.current2?W-2:0),U=2;U=k?A=k:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var E=this.props,T=E.showSizeChanger,k=E.total,L=E.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:k>L}},{key:"renderPrev",value:function(E){var T=this.props,k=T.prevIcon,L=T.itemRender,A=L(E,"prev",this.getItemIcon(k,"prev page")),G=!this.hasPrev();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:G}):A}},{key:"renderNext",value:function(E){var T=this.props,k=T.nextIcon,L=T.itemRender,A=L(E,"next",this.getItemIcon(k,"next page")),G=!this.hasNext();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:G}):A}},{key:"render",value:function(){var E=this,T=this.props,k=T.prefixCls,L=T.className,A=T.style,G=T.disabled,K=T.hideOnSinglePage,W=T.total,z=T.locale,U=T.showQuickJumper,P=T.showLessItems,H=T.showTitle,V=T.showTotal,q=T.simple,Z=T.itemRender,ce=T.showPrevNextJumpers,he=T.jumpPrevIcon,ae=T.jumpNextIcon,xe=T.selectComponentClass,ge=T.selectPrefixCls,oe=T.pageSizeOptions,se=this.state,te=se.current,be=se.pageSize,ee=se.currentInputValue;if(K===!0&&W<=be)return null;var ie=w(void 0,this.state,this.props),Ee=[],ne=null,J=null,X=null,Q=null,me=null,fe=U&&U.goButton,Te=P?1:2,ze=te-1>0?te-1:0,Je=te+1=Te*2&&te!==1+2&&(Ee[0]=Object(b.cloneElement)(Ee[0],{className:"".concat(k,"-item-after-jump-prev")}),Ee.unshift(ne)),ie-te>=Te*2&&te!==ie-2&&(Ee[Ee.length-1]=Object(b.cloneElement)(Ee[Ee.length-1],{className:"".concat(k,"-item-before-jump-next")}),Ee.push(J)),Ve!==1&&Ee.unshift(X),Ze!==ie&&Ee.push(Q)}var De=null;V&&(De=p.a.createElement("li",{className:"".concat(k,"-total-text")},V(W,[W===0?0:(te-1)*be+1,te*be>W?W:te*be])));var we=!this.hasPrev()||!ie,Ae=!this.hasNext()||!ie;return p.a.createElement("ul",Object(N.a)({className:t()(k,L,Object(v.a)({},"".concat(k,"-disabled"),G)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},qe),De,p.a.createElement("li",{title:H?z.prev_page:null,onClick:this.prev,tabIndex:we?null:0,onKeyPress:this.runIfEnterPrev,className:t()("".concat(k,"-prev"),Object(v.a)({},"".concat(k,"-disabled"),we)),"aria-disabled":we},this.renderPrev(ze)),Ee,p.a.createElement("li",{title:H?z.next_page:null,onClick:this.next,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterNext,className:t()("".concat(k,"-next"),Object(v.a)({},"".concat(k,"-disabled"),Ae)),"aria-disabled":Ae},this.renderNext(Je)),p.a.createElement(s,{disabled:G,locale:z,rootPrefixCls:k,selectComponentClass:xe,selectPrefixCls:ge,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:be,pageSizeOptions:oe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{key:"getDerivedStateFromProps",value:function(E,T){var k={};if("current"in E&&(k.current=E.current,E.current!==T.current&&(k.currentInputValue=k.current)),"pageSize"in E&&E.pageSize!==T.pageSize){var L=T.current,A=w(E.pageSize,T,E);L=L>A?A:L,"current"in E||(k.current=L,k.currentInputValue=L),k.pageSize=E.pageSize}return k}}]),g}(p.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:u.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var h=_},"6RRn":function(F,$,j){"use strict";var N=j("wCXF"),v=j("n6Qo");j.d($,"b",function(){return v.a});var O=j("IBYe"),M=j("6eGT"),y=j("hW8S");j.d($,"a",function(){return y.a}),$.c=N.b},"6UM0":function(F,$,j){var N,v;(function(){var O;(function(){"use strict";var y=[function(p,d,t){var l=t(1).Beautifier,r=t(5).Options;function i(o,s){var u=new l(o,s);return u.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(2).Output,r=t(3).Token,i=t(4),o=t(5).Options,s=t(7).Tokenizer,u=t(7).line_starters,a=t(7).positionable_operators,c=t(7).TOKEN;function f(P,H){return H.indexOf(P)!==-1}function w(P){return P.replace(/^\s+/g,"")}function _(P){for(var H={},V=0;VV&&(V=P.line_indent_level));var q={mode:H,parent:P,last_token:P?P.last_token:new r(c.START_BLOCK,""),last_word:P?P.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:V,alignment:0,line_indent_level:P?P.line_indent_level:V,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},z.prototype._reset=function(P){var H=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new l(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var V=new s(P,this._options);return this._tokens=V.tokenize(),P},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,H=this._reset(this._source_text),V=this._options.eol;this._options.eol==="auto"&&(V=` `,H&&i.lineBreak.test(H||"")&&(V=H.match(i.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return P=this._output.get_code(V),P},z.prototype.handle_token=function(P,H){P.type===c.START_EXPR?this.handle_start_expr(P):P.type===c.END_EXPR?this.handle_end_expr(P):P.type===c.START_BLOCK?this.handle_start_block(P):P.type===c.END_BLOCK?this.handle_end_block(P):P.type===c.WORD?this.handle_word(P):P.type===c.RESERVED?this.handle_word(P):P.type===c.SEMICOLON?this.handle_semicolon(P):P.type===c.STRING?this.handle_string(P):P.type===c.EQUALS?this.handle_equals(P):P.type===c.OPERATOR?this.handle_operator(P):P.type===c.COMMA?this.handle_comma(P):P.type===c.BLOCK_COMMENT?this.handle_block_comment(P,H):P.type===c.COMMENT?this.handle_comment(P,H):P.type===c.DOT?this.handle_dot(P):P.type===c.EOF?this.handle_eof(P):P.type===c.UNKNOWN?this.handle_unknown(P,H):this.handle_unknown(P,H)},z.prototype.handle_whitespace_and_comments=function(P,H){var V=P.newlines,q=this._options.keep_array_indentation&&A(this._flags.mode);if(P.comments_before)for(var Z=P.comments_before.next();Z;)this.handle_whitespace_and_comments(Z,H),this.handle_token(Z,H),Z=P.comments_before.next();if(q)for(var ce=0;ce0,H);else if(this._options.max_preserve_newlines&&V>this._options.max_preserve_newlines&&(V=this._options.max_preserve_newlines),this._options.preserve_newlines&&V>1){this.print_newline(!1,H);for(var he=1;he0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},z.prototype.start_of_statement=function(P){var H=!1;return H=H||R(this._flags.last_token,["var","let","const"])&&P.type===c.WORD,H=H||h(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&R(this._flags.last_token,U)&&!P.newlines,H=H||h(this._flags.last_token,"else")&&!(h(P,"if")&&!P.comments_before),H=H||this._flags.last_token.type===c.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),H=H||this._flags.last_token.type===c.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==c.WORD&&P.type!==c.RESERVED,H=H||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),H?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,R(P,["do","for","if","while"])),!0):!1},z.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var H=T.Expression;if(P.text==="["){if(this._flags.last_token.type===c.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=T.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),f(this._flags.last_token.type,[c.START_EXPR,c.END_EXPR,c.WORD,c.OPERATOR,c.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===c.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=T.ForInitializer):f(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=T.Conditional):f(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(f(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===c.WORD){this._output.space_before_token=!1;var V=this._tokens.peek(-3);if(this._options.space_after_named_function&&V){var q=this._tokens.peek(-4);R(V,["async","function"])||V.text==="*"&&R(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(V.text==="{"||V.text===","||V.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(P);(this._flags.last_token.type===c.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===c.START_BLOCK?this.print_newline():(this._flags.last_token.type===c.END_EXPR||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===c.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},z.prototype.handle_end_expr=function(P){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===c.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(P),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},z.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var H=this._tokens.peek(),V=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===c.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):V&&(f(V.text,[":",","])&&f(H.type,[c.STRING,c.WORD,c.RESERVED])||f(H.text,["get","set","..."])&&f(V.type,[c.WORD,c.RESERVED]))?f(this._last_last_text,["class","interface"])&&!f(V.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===c.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):f(this._flags.last_token.type,[c.EQUALS,c.START_EXPR,c.COMMA,c.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!H.comments_before&&H.text==="}",Z=q&&this._flags.last_word==="function"&&this._flags.last_token.type===c.END_EXPR;if(this._options.brace_preserve_inline){var ce=0,he=null;this._flags.inline_frame=!0;do if(ce+=1,he=this._tokens.peek(ce-1),he.newlines){this._flags.inline_frame=!1;break}while(he.type!==c.EOF&&!(he.type===c.END_BLOCK&&he.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==c.OPERATOR&&(Z||this._flags.last_token.type===c.EQUALS||R(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.COMMA)&&((this._flags.last_token.type===c.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==c.OPERATOR&&this._flags.last_token.type!==c.START_EXPR&&(this._flags.last_token.type===c.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},z.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===T.Statement;)this.restore_mode();var H=this._flags.last_token.type===c.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(P)},z.prototype.handle_word=function(P){if(P.type===c.RESERVED){if(f(P.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)P.type=c.WORD;else if(P.text==="import"&&f(this._tokens.peek().text,["(","."]))P.type=c.WORD;else if(f(P.text,["as","from"])&&!this._flags.import_block)P.type=c.WORD;else if(this._flags.mode===T.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(P.type=c.WORD)}}if(this.start_of_statement(P)?R(this._flags.last_token,["var","let","const"])&&P.type===c.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==c.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(h(P,"while")){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&h(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(P,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),h(P,"function")){(f(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(f(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===c.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:h(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===c.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var V="NONE";if(this._flags.last_token.type===c.END_BLOCK?this._previous_flags.inline_frame?V="SPACE":R(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?V="NEWLINE":(V="SPACE",this._output.space_before_token=!0):V="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&this._flags.mode===T.BlockStatement?V="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&G(this._flags.mode)?V="SPACE":this._flags.last_token.type===c.STRING?V="NEWLINE":this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","]))?V="SPACE":this._flags.last_token.type===c.START_BLOCK?this._flags.inline_frame?V="SPACE":V="NEWLINE":this._flags.last_token.type===c.END_EXPR&&(this._output.space_before_token=!0,V="NEWLINE"),R(P,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?V="SPACE":V="NEWLINE"),R(P,["else","catch","finally"]))if((!(this._flags.last_token.type===c.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else V==="NEWLINE"?R(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==c.END_EXPR?(this._flags.last_token.type!==c.START_EXPR||!R(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(h(P,"if")&&h(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(P,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():V==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===c.WORD||P.previous.type===c.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===c.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&h(P,"from")&&(this._flags.import_block=!1))},z.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var H=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&h(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},z.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===c.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===c.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},z.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},z.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},z.prototype.handle_operator=function(P){var H=P.text==="*"&&(R(this._flags.last_token,["function","yield"])||f(this._flags.last_token.type,[c.START_BLOCK,c.COMMA,c.END_BLOCK,c.SEMICOLON])),V=f(P.text,["-","+"])&&(f(this._flags.last_token.type,[c.START_BLOCK,c.START_EXPR,c.EQUALS,c.OPERATOR])||f(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var q=!H;this.handle_whitespace_and_comments(P,q)}if(P.text==="*"&&this._flags.last_token.type===c.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===c.OPERATOR&&f(this._options.operator_position,E)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==c.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Z=!0,ce=!0,he=!1;if(P.text===":"?this._flags.ternary_depth===0?Z=!1:(this._flags.ternary_depth-=1,he=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!V&&!H&&this._options.preserve_newlines&&f(P.text,a)){var ae=P.text===":",xe=ae&&he,ge=ae&&!he;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!ge,this.print_token(P),(!ae||xe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!ae||xe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case x.preserve_newline:ge||this.allow_wrap_or_preserved_newline(P),Z=!(this._output.just_added_newline()||ge),this._output.space_before_token=Z,this.print_token(P),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(P),Z=!1;var oe=this._tokens.peek();ce=oe&&f(oe.type,[c.WORD,c.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),Z=this._flags.last_token.type===c.START_BLOCK,ce=!1;else if(f(P.text,["--","++","!","~"])||V){if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),Z=!1,ce=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var se=R(this._flags.last_token,C)&&P.newlines;se&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(se,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(Z=!0),this._flags.last_token.type===c.RESERVED?Z=!0:this._flags.last_token.type===c.END_EXPR?Z=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===c.OPERATOR&&(Z=f(P.text,["--","-","++","+"])&&f(this._flags.last_token.text,["--","-","++","+"]),f(P.text,["+","-"])&&f(this._flags.last_token.text,["--","++"])&&(ce=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Z,this.print_token(P),this._output.space_before_token=ce},z.prototype.handle_block_comment=function(P,H){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,H),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,H)},z.prototype.print_block_commment=function(P,H){var V=L(P.text),q,Z=!1,ce=!1,he=P.whitespace_before,ae=he.length;if(this.print_newline(!1,H),this.print_token_line_indentation(P),this._output.add_token(V[0]),this.print_newline(!1,H),V.length>1){for(V=V.slice(1),Z=K(V,"*"),ce=W(V,he),Z&&(this._flags.alignment=1),q=0;q=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` `);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===` `&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},function(p){function d(t,l,r,i){this.type=t,this.text=l,this.comments_before=null,this.newlines=r||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}p.exports.Token=d},function(p,d){var t="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+t+r+"])",s="(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])*";d.identifier=new RegExp(o+s,"g"),d.identifierStart=new RegExp(o),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r |`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(p,d,t){var l=t(6).Options,r=["before-newline","after-newline","preserve-newline"];function i(o){l.call(this,o,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var x=new RegExp(g),E="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=E.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),k=new RegExp("^(?:"+T.join("|")+")$"),L,A=function(K,W){r.call(this,K,W),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var z=new u(this._input),U=new a(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(s.identifier).matching(s.identifierMatch),number:z.matching(_),punct:z.matching(x),comment:z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:z.matching(//),include:z.starting_with(/#include/).until_after(s.lineBreak),shebang:z.starting_with(/#!/).until_after(s.lineBreak),xml:z.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new r,A.prototype._is_comment=function(K){return K.type===f.COMMENT||K.type===f.BLOCK_COMMENT||K.type===f.UNKNOWN},A.prototype._is_opening=function(K){return K.type===f.START_BLOCK||K.type===f.START_EXPR},A.prototype._is_closing=function(K,W){return(K.type===f.END_BLOCK||K.type===f.END_EXPR)&&W&&(K.text==="]"&&W.text==="["||K.text===")"&&W.text==="("||K.text==="}"&&W.text==="{")},A.prototype._reset=function(){L=!1},A.prototype._get_next_token=function(K,W){var z=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(f.EOF,""):(z=z||this._read_non_javascript(U),z=z||this._read_string(U),z=z||this._read_word(K),z=z||this._read_singles(U),z=z||this._read_comment(U),z=z||this._read_regexp(U,K),z=z||this._read_xml(U,K),z=z||this._read_punctuation(),z=z||this._create_token(f.UNKNOWN,this._input.next()),z)},A.prototype._read_word=function(K){var W;if(W=this.__patterns.identifier.read(),W!=="")return W=W.replace(s.allLineBreaks,` `),!(K.type===f.DOT||K.type===f.RESERVED&&(K.text==="set"||K.text==="get"))&&k.test(W)?(W==="in"||W==="of")&&(K.type===f.WORD||K.type===f.STRING)?this._create_token(f.OPERATOR,W):this._create_token(f.RESERVED,W):this._create_token(f.WORD,W);if(W=this.__patterns.number.read(),W!=="")return this._create_token(f.WORD,W)},A.prototype._read_singles=function(K){var W=null;return K==="("||K==="["?W=this._create_token(f.START_EXPR,K):K===")"||K==="]"?W=this._create_token(f.END_EXPR,K):K==="{"?W=this._create_token(f.START_BLOCK,K):K==="}"?W=this._create_token(f.END_BLOCK,K):K===";"?W=this._create_token(f.SEMICOLON,K):K==="."&&R.test(this._input.peek(1))?W=this._create_token(f.DOT,K):K===","&&(W=this._create_token(f.COMMA,K)),W&&this._input.next(),W},A.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(f.EQUALS,K):K==="?."?this._create_token(f.DOT,K):this._create_token(f.OPERATOR,K)},A.prototype._read_non_javascript=function(K){var W="";if(K==="#"){if(this._is_first_token()&&(W=this.__patterns.shebang.read(),W))return this._create_token(f.UNKNOWN,W.trim()+` `);if(W=this.__patterns.include.read(),W)return this._create_token(f.UNKNOWN,W.trim()+` `);K=this._input.next();var z="#";if(this._input.hasNext()&&this._input.testChar(h)){do K=this._input.next(),z+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(z+="{}",this._input.next(),this._input.next())),this._create_token(f.WORD,z)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(W=this.__patterns.html_comment_start.read(),W){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)W+=this._input.next();return L=!0,this._create_token(f.COMMENT,W)}}else if(L&&K==="-"&&(W=this.__patterns.html_comment_end.read(),W))return L=!1,this._create_token(f.COMMENT,W);return null},A.prototype._read_comment=function(K){var W=null;if(K==="/"){var z="";if(this._input.peek(1)==="*"){z=this.__patterns.block_comment.read();var U=w.get_directives(z);U&&U.ignore==="start"&&(z+=w.readIgnored(this._input)),z=z.replace(s.allLineBreaks,` `),W=this._create_token(f.BLOCK_COMMENT,z),W.directives=U}else this._input.peek(1)==="/"&&(z=this.__patterns.comment.read(),W=this._create_token(f.COMMENT,z))}return W},A.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var W=this._input.next();return this.has_char_escapes=!1,K==="`"?W+=this._read_string_recursive("`",!0,"${"):W+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(W=G(W)),this._input.peek()===K&&(W+=this._input.next()),W=W.replace(s.allLineBreaks,` `),this._create_token(f.STRING,W)}return null},A.prototype._allow_regexp_or_xml=function(K){return K.type===f.RESERVED&&c(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===f.END_EXPR&&K.text===")"&&K.opened.previous.type===f.RESERVED&&c(K.opened.previous.text,["if","while","for"])||c(K.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},A.prototype._read_regexp=function(K,W){if(K==="/"&&this._allow_regexp_or_xml(W)){for(var z=this._input.next(),U=!1,P=!1;this._input.hasNext()&&(U||P||this._input.peek()!==K)&&!this._input.testChar(s.newline);)z+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===K&&(z+=this._input.next(),z+=this._input.read(s.identifier)),this._create_token(f.STRING,z)}return null},A.prototype._read_xml=function(K,W){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(W)){var z="",U=this.__patterns.xml.read_match();if(U){for(var P=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=P.indexOf("{")===0,V=0;U;){var q=!!U[1],Z=U[2],ce=!!U[U.length-1]||Z.slice(0,8)==="![CDATA[";if(!ce&&(Z===P||H&&Z.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--V:++V),z+=U[0],V<=0)break;U=this.__patterns.xml.read_match()}return U||(z+=this._input.match(/[\s\S]*/g)[0]),z=z.replace(s.allLineBreaks,` `),this._create_token(f.STRING,z)}}return null};function G(K){for(var W="",z=0,U=new l(K),P=null;U.hasNext();)if(P=U.match(/([\s]|[^\\]|\\\\)+/g),P&&(W+=P[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")P=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")P=U.match(/u([0-9A-Fa-f]{4})/g);else{W+="\\",U.hasNext()&&(W+=U.next());continue}if(!P)return K;if(z=parseInt(P[1],16),z>126&&z<=255&&P[0].indexOf("x")===0)return K;if(z>=0&&z<32){W+="\\"+P[0];continue}else z===34||z===39||z===92?W+="\\"+String.fromCharCode(z):W+=String.fromCharCode(z)}return W}A.prototype._read_string_recursive=function(K,W,z){var U,P;K==="'"?P=this.__patterns.single_quote:K==='"'?P=this.__patterns.double_quote:K==="`"?P=this.__patterns.template_text:K==="}"&&(P=this.__patterns.template_expression);for(var H=P.read(),V="";this._input.hasNext();){if(V=this._input.next(),V===K||!W&&s.newline.test(V)){this._input.back();break}else V==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===` `&&this._input.next(),V+=this._input.next()):z&&(z==="${"&&V==="$"&&this._input.peek()==="{"&&(V+=this._input.next()),z===V&&(K==="`"?V+=this._read_string_recursive("}",W,"`"):V+=this._read_string_recursive("`",W,"${"),this._input.hasNext()&&(V+=this._input.next())));V+=P.read(),H+=V}return H},p.exports.Tokenizer=A,p.exports.TOKEN=f,p.exports.positionable_operators=C.slice(),p.exports.line_starters=E.slice()},function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position=0&&l=0&&r=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},function(p,d,t){var l=t(8).InputScanner,r=t(3).Token,i=t(10).TokenStream,o=t(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(a,c){this._input=new l(a),this._options=c||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var a,c=new r(s.START,""),f=null,w=[],_=new i;c.type!==s.EOF;){for(a=this._get_next_token(c,f);this._is_comment(a);)_.add(a),a=this._get_next_token(c,f);_.isEmpty()||(a.comments_before=_,_=new i),a.parent=f,this._is_opening(a)?(w.push(f),f=a):f&&this._is_closing(a,f)&&(a.opened=f,f.closed=a,f=w.pop(),a.parent=f),a.previous=c,c.next=a,this.__tokens.add(a),c=a}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(a,c){this._readWhitespace();var f=this._input.read(/.+/g);return f?this._create_token(s.RAW,f):this._create_token(s.EOF,"")},u.prototype._is_comment=function(a){return!1},u.prototype._is_opening=function(a){return!1},u.prototype._is_closing=function(a,c){return!1},u.prototype._create_token=function(a,c){var f=new r(a,c,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return f},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},p.exports.Tokenizer=u,p.exports.TOKEN=s},function(p){function d(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position=0&&t/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new l,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(o){var s=this._create();return s._disabled[o]=!0,s._update(),s},i.prototype.read_options=function(o){var s=this._create();for(var u in r)s._disabled[u]=o.templating.indexOf(u)===-1;return s._update(),s},i.prototype.exclude=function(o){var s=this._create();return s._excluded[o]=!0,s._update(),s},i.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),o+=s,s=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},i.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},i.prototype._read_template=function(){var o="",s=this._input.peek();if(s==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(o=o||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},p.exports.TemplatablePattern=i}],m={};function S(p){var d=m[p];if(d!==void 0)return d.exports;var t=m[p]={exports:{}};return y[p](t,t.exports,S),t.exports}var b=S(0);O=b})();var M=O;!(N=[],v=function(){return{js_beautify:M}}.apply($,N),v!==void 0&&(F.exports=v))})()},"6eGT":function(F,$,j){"use strict";function N(v){return null}$.a=N},"7Cbv":function(F,$,j){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function O(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(v)}var M=/^(?:[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 y(r){return typeof r=="string"&&M.test(r)}for(var m=y,S=[],b=0;b<256;++b)S.push((b+256).toString(16).substr(1));function p(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(S[r[i+0]]+S[r[i+1]]+S[r[i+2]]+S[r[i+3]]+"-"+S[r[i+4]]+S[r[i+5]]+"-"+S[r[i+6]]+S[r[i+7]]+"-"+S[r[i+8]]+S[r[i+9]]+"-"+S[r[i+10]]+S[r[i+11]]+S[r[i+12]]+S[r[i+13]]+S[r[i+14]]+S[r[i+15]]).toLowerCase();if(!m(o))throw TypeError("Stringified UUID is invalid");return o}var d=p;function t(r,i,o){r=r||{};var s=r.random||(r.rng||O)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){o=o||0;for(var u=0;u<16;++u)i[o+u]=s[u];return i}return d(s)}var l=$.a=t},"7ahc":function(F,$,j){"use strict";j.d($,"a",function(){return w});var N=j("k1fw"),v=j("0Owb"),O=j("+L6B"),M=j("2/Rp"),y=j("y8nQ"),m=j("Vl3Y"),S=j("tJVT"),b=j("OaEy"),p=j("2fM7"),d=j("cDcd"),t=j.n(d),l=j("VrN/"),r=j.n(l),i=j("p77/"),o=j.n(i),s=j("c5Ni"),u=j.n(s),a=p.a.Option,c={labelCol:{span:4},wrapperCol:{span:20}},f={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"]};$.b=function(_){var h=_.callback,R=_.onCancel,C=Object(d.useState)("python"),g=Object(S.a)(C,2),x=g[0],E=g[1];function T(L){E(f[L][1])}function k(L){h(L)}return t.a.createElement(m.a,Object(v.a)({},c,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},t.a.createElement(p.a,{onChange:T},Object.keys(f).map(function(L){return t.a.createElement(a,{key:L,value:L},f[L][0])}))),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},t.a.createElement(w,{mode:x})),t.a.createElement("div",{className:"flex-container flex-end"},t.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(M.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function w(_){var h=_.value,R=_.onChange,C=_.mode,g=_.options,x=g===void 0?{}:g,E=Object(d.useRef)(),T=Object(d.useState)(),k=Object(S.a)(T,2),L=k[0],A=k[1];return Object(d.useEffect)(function(){if(L){function G(K){var W=K.getValue();R&&R(W)}return L.on("change",G),function(){L.off("change",G)}}},[L,R]),Object(d.useEffect)(function(){L&&L.setOption("mode",C)},[L,C]),Object(d.useEffect)(function(){L&&((h!==L.getValue()||h==="")&&setTimeout(function(){L.setValue(h||" ")},300))},[L,h]),Object(d.useEffect)(function(){if(E.current&&!L){var G=r.a.fromTextArea(E.current,Object(N.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(G)}},[E.current,L]),t.a.createElement("div",{className:"my-codemirror-container"},t.a.createElement("textarea",{ref:E}))}},"815F":function(F,$,j){"use strict";j.d($,"e",function(){return S}),j.d($,"c",function(){return p}),j.d($,"d",function(){return d}),j.d($,"a",function(){return l}),j.d($,"f",function(){return r}),j.d($,"b",function(){return i});var N=j("KQm4"),v=j("VTBJ"),O=j("Ff2n"),M=j("Zm9Q"),y=j("Kwbf"),m=j("OZM5");function S(o,s){return o!=null?o:s}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=new Map;function u(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(f){var w=f.key,_=f.children;Object(y.a)(w!=null,"Tree node must have a certain key: [".concat(c).concat(w,"]"));var h=String(w);Object(y.a)(!s.has(h)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(h)),s.set(h,!0),u(_,"".concat(c).concat(h," > "))})}u(o)}function p(o){function s(u){var a=Object(M.a)(u);return a.map(function(c){if(!Object(m.i)(c))return Object(y.a)(!c,"Tree/TreeNode can only accept TreeNode as children."),null;var f=c.key,w=c.props,_=w.children,h=Object(O.a)(w,["children"]),R=Object(v.a)({key:f},h),C=s(_);return C.length&&(R.children=C),R}).filter(function(c){return c})}return s(o)}function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(s===!0?[]:s),a=[];function c(f){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return f.map(function(_,h){var R=Object(m.h)(w?w.pos:"0",h),C=S(_.key,R),g=Object(v.a)(Object(v.a)({},_),{},{parent:w,pos:R,children:null,data:_,isStart:[].concat(Object(N.a)(w?w.isStart:[]),[h===0]),isEnd:[].concat(Object(N.a)(w?w.isEnd:[]),[h===f.length-1])});return a.push(g),s===!0||u.has(C)?g.children=c(_.children||[],g):g.children=[],g})}return c(o),a}function t(o,s,u){var a;u?typeof u=="string"?a=function(w){return w[u]}:typeof u=="function"&&(a=function(w){return u(w)}):a=function(w,_){return S(w.key,_)};function c(f,w,_){var h=f?f.children:o,R=f?Object(m.h)(_.pos,w):"0";if(f){var C=a(f,R),g={node:f,index:w,pos:R,key:C,parentPos:_.node?_.pos:null,level:_.level+1};s(g)}h&&h.forEach(function(x,E){c(x,E,{node:f,pos:R,level:_?_.level+1:-1})})}c(null)}function l(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=s.initWrapper,a=s.processEntity,c=s.onProcessFinished,f=arguments.length>2?arguments[2]:void 0,w={},_={},h={posEntities:w,keyEntities:_};return u&&(h=u(h)||h),t(o,function(R){var C=R.node,g=R.index,x=R.pos,E=R.key,T=R.parentPos,k=R.level,L={node:C,index:g,key:E,pos:x,level:k},A=S(E,x);w[x]=L,_[A]=L,L.parent=w[T],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),a&&a(L,h)},f),c&&c(h),h}function r(o,s){var u=s.expandedKeys,a=s.selectedKeys,c=s.loadedKeys,f=s.loadingKeys,w=s.checkedKeys,_=s.halfCheckedKeys,h=s.dragOverNodeKey,R=s.dropPosition,C=s.keyEntities,g=C[o],x={eventKey:o,expanded:u.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:c.indexOf(o)!==-1,loading:f.indexOf(o)!==-1,checked:w.indexOf(o)!==-1,halfChecked:_.indexOf(o)!==-1,pos:String(g?g.pos:""),dragOver:h===o&&R===0,dragOverGapTop:h===o&&R===-1,dragOverGapBottom:h===o&&R===1};return x}function i(o){var s=o.data,u=o.expanded,a=o.selected,c=o.checked,f=o.loaded,w=o.loading,_=o.halfChecked,h=o.dragOver,R=o.dragOverGapTop,C=o.dragOverGapBottom,g=o.pos,x=o.active,E=Object(v.a)(Object(v.a)({},s),{},{expanded:u,selected:a,checked:c,loaded:f,loading:w,halfChecked:_,dragOver:h,dragOverGapTop:R,dragOverGapBottom:C,pos:g,active:x});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),E}},"8EBN":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.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 v=0;v-1&&M.substring(S+1,M.length);if(b)return N.findModeByExtension(b)},N.findModeByName=function(M){M=M.toLowerCase();for(var y=0;y=oe.length?se.slice(oe.length):se}).join(` `)}var i=[],o=["
    "],s=new t.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function a(){i.length=0,o=["
      "]}var c={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(ae,xe,ge,oe){if(xe>=ae.length||ae[xe].level<=ge)return xe;var se=ae[xe];oe.push("
    • "+se.text+""),xe++;var te=[];return xe=f(ae,xe,se.level,te),te.length>0&&(oe.push("
        "),te.forEach(function(be){oe.push(be)}),oe.push("
      ")),oe.push("
    • "),xe=f(ae,xe,ge,oe),xe}function w(){return f(i,0,0,o),o.push("
    "),o.join("")}var _={heading:function(xe){var ge=u.exec(xe);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},fences:function(xe){var ge=this.rules.block.fences.exec(xe);if(ge){var oe=ge[0],se=r(oe,ge[3]||""),te=ge[2]?ge[2].trim():ge[2];if(["latex","katex","math"].indexOf(te)>=0){var be=C(),ee=se;se=be,g[be]={type:"block",expression:ee}}return{type:"code",raw:oe,lang:te,text:se}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,R=0,C=function(){return"__special_katext_id_".concat(R++,"__")},g={};function x(){return g}function E(){R=0,g={}}function T(ae){return ae=ae.replace(h,function(xe,ge){var oe=C();return g[oe]={type:"inline",expression:ge},oe}),ae}var k=s.listitem;s.listitem=function(ae){return k(T(ae))};var L=s.paragraph;s.paragraph=function(ae){return L(T(ae))};var A=s.tablecell;s.tablecell=function(ae,xe){return A(T(ae),xe)},s.code=function(ae,xe,ge){var oe=(xe||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"

    ".concat(ae,"

    "):'
    ').concat(ge?ae:Object(l.escape)(ae,!0),`
    `):'
    '+(ge?ae:Object(l.escape)(ae,!0))+"
    "},s.heading=function(ae,xe,ge){var oe=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return i.push({anchor:oe,level:xe,text:ae}),"'+ae+""},t.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),t.a.use({tokenizer:_,renderer:s});var G=t.a,K=j("SJMd"),W=j("ulZh"),z=j.n(W),U=j("m3rI"),P=j("Oy/b"),H=j("p5ED"),V=j("8hTe"),q=j.n(V),Z=/]*>/g;function ce(ae){var xe=document.createElement("div");return xe.innerHTML=ae,xe.childNodes.length===0?"":xe.childNodes[0].nodeValue}var he=$.a=function(ae){var xe=ae.value,ge=xe===void 0?"":xe,oe=ae.edit,se=oe===void 0?!1:oe,te=ae.className,be=ae.showTextOnly,ee=ae.showLines,ie=ae.replaces,Ee=ae.zoomImg,ne=ae.hasMask,J=ae.style,X=J===void 0?{}:J,Q=ae.stylesPrev,me=Q===void 0?{}:Q,fe=String(ge),Te=Object(S.useRef)(),ze=Object(S.useRef)(),Je=Object(S.useState)(""),qe=Object(m.a)(Je,2),Xe=qe[0],et=qe[1],rt=Object(S.useState)("office"),Le=Object(m.a)(rt,2),Oe=Le[0],Ve=Le[1],Ze=Object(S.useMemo)(function(){try{var Ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,de=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;fe=fe.replace(Ae,"("+U.a.API_SERVER+"/api/attachments/").replace(de,'"'+U.a.API_SERVER+"/api/attachments/").replace(_e,'"'+U.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Ye){}var Se=G(fe),Ie=x();if(fe.match(/\[TOC\]/)&&(Se=Se.replace("

    [TOC]

    ",w()),a()),Se=Se.replace(/(__special_katext_id_\d+__)/g,function(Ye,nt){var lt=Ie[nt],at=lt.type,ot=lt.expression;return Object(P.renderToString)(ce(ot)||"",{displayMode:at==="block",throwOnError:!1,output:"html"})}),Se=Se.replace(/▁/g,"\u2581\u2581\u2581"),E(),be){var ke=document.createElement("div");return ke.innerHTML=Se,ke.innerText}return setTimeout(function(){return De()},500),Se},[fe]),Ne=Object(S.useRef)();c.WebkitLineClamp=ee,ee&&(X=Object(y.a)(Object(y.a)({},X),c));function Ge(Ae){var de=Ae.target;if(de.tagName.toUpperCase()==="IMG"){if(Ee){var _e=de.getAttribute("src");et(_e),Ve("image")}}else if(de.tagName.toUpperCase()==="A"){var Se=de.getAttribute("href");if(Se.indexOf("office")>-1)Ae.preventDefault(),et(Se),Ve("office");else if(Se.indexOf("application/pdf")>-1)Ae.preventDefault(),et(Se),Ve("pdf");else if(Se.indexOf("text/html")>-1)Ae.preventDefault(),et(Se),Ve("html");else if(Se.startsWith("#")){Ae.preventDefault();var Ie=document.getElementById(Se.replace("#",""));Ie&&Ie.scrollIntoView(!0)}}}var De=function(){var de,_e=(de=Ne.current)===null||de===void 0?void 0:de.querySelectorAll("video");_e==null||_e.forEach(function(Se){if(Se.oncontextmenu=function(){return!1},Se.src.indexOf(".m3u8")>-1&&!Se.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Ie=new z.a;Ie.loadSource(Se.src),Ie.attachMedia(Se)}}})};Object(S.useEffect)(function(){if(Ne.current&&Ze&&(Ze.match(Z)&&window.PR.prettyPrint()),Ne.current)return Ne.current.addEventListener("click",Ge),function(){Ne.current.removeEventListener("click",Ge),E(),a()}},[Ze,Ne.current,Ge]);var we=function(de){if(!se)return;de.target.nodeName==="IMG"?(Te.current.style.display="flex",Te.current.style.width=de.target.clientWidth+"px",Te.current.style.height=de.target.clientHeight+"px",Te.current.style.top=de.target.offsetTop+"px",Te.current.style.left=de.target.offsetLeft+"px",ze.current.src=de.target.getAttribute("src")):Te.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:Ne,style:Object(y.a)({},X),className:"".concat(te||""," markdown-body ").concat(q.a.mdBody),onMouseOver:we,dangerouslySetInnerHTML:{__html:Ze}}),b.a.createElement("div",{ref:Te,className:q.a.button},b.a.createElement(v.a,null,b.a.createElement(M.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),b.a.createElement(M.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:ze,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),b.a.createElement(H.a,{close:!0,data:Xe,type:Xe!=null&&Xe.length?Oe:"",style:Object(y.a)({},me),onClose:function(){return et("")}}))}},"9OqN":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CTR=function(){var v=N.lib.BlockCipherMode.extend(),O=v.Encryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._counter;b&&(p=this._counter=b.slice(0),this._iv=void 0);var d=p.slice(0);m.encryptBlock(d,0),p[S-1]=p[S-1]+1|0;for(var t=0;t0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!1})}),ae(pt),he()}}else qe(!1),he()});return}if(Ze){var bt=new FormData;bt.append("file",at.file);var ft=Object(K.a)("/api/attachments.json",{method:"post",body:bt},!0);ft.then(function(Et){if(Et.filename){De.current=De.current+1;var Vt=Ge.current.map(function(dt){if(dt.name===(Et==null?void 0:Et.filename)){var At,Mt=Object(u.a)(Object(u.a)({},dt),{},{is_oss:!Ze});return Et!=null&&(At=Et.filename)!==null&&At!==void 0&&At.includes(".in")?(Mt.in_object_key=Et==null?void 0:Et.object,Mt.in_object_size=Et==null?void 0:Et.size,Mt.input=Et==null?void 0:Et.filename,Mt.in_file=at):(Mt.out_object_key=Et==null?void 0:Et.object,Mt.out_object_size=Et==null?void 0:Et.size,Mt.output=Et==null?void 0:Et.filename,Mt.out_file=at),Mt}return dt});if(Ge.current=Object(f.a)(Vt),J(Object(f.a)(Vt)),De.current>0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!0})}),ae(pt),he()}}else qe(!1),he()});return}var jt=new A.a({endpoint:me.end_point,region:me.region,accessKeyId:me.access_key_id,accessKeySecret:me.access_key_secret,bucket:me.bucket,stsToken:me.security_token}),Pt=at.name,Xt={container_type:"TestSet",file_name:Pt},Qt=Object(W.a)(),kt="testsets/".concat(oe,"/").concat(Qt).concat(Pt.indexOf(".")>-1?"."+Pt.split(".").pop():"");oe===null&&(kt="testsets/".concat(Qt).concat(Pt.indexOf(".")>-1?"."+Pt.split(".").pop():"")),jt.multipartUpload(kt,new Blob([at.file],{type:at.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Pt+""},url:me==null?void 0:me.callback_url,host:me==null?void 0:me.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(K.e)(Xt)}}).then(function(Et){if(Et.data.status===0){De.current=De.current+1;var Vt=Ge.current.map(function(dt){var At,Mt;if(dt.name===((At=Et.data)===null||At===void 0||((Mt=At.data)===null||Mt===void 0)?void 0:Mt.file_name)){var rr,Fn,yt,St=Object(u.a)(Object(u.a)({},dt),{},{is_oss:!Ze});if((rr=Et.data)!==null&&rr!==void 0&&(Fn=rr.data)!==null&&Fn!==void 0&&(yt=Fn.file_name)!==null&&yt!==void 0&&yt.includes(".in")){var vt,yr,Tr,Bt,Rt,br;St.in_object_key=(vt=Et.data)===null||vt===void 0||((yr=vt.data)===null||yr===void 0)?void 0:yr.object,St.in_object_size=(Tr=Et.data)===null||Tr===void 0||((Bt=Tr.data)===null||Bt===void 0)?void 0:Bt.size,St.input=(Rt=Et.data)===null||Rt===void 0||((br=Rt.data)===null||br===void 0)?void 0:br.file_name,St.in_file=at}else{var $r,Cr,ut,It,Br,Vr;St.out_object_key=($r=Et.data)===null||$r===void 0||((Cr=$r.data)===null||Cr===void 0)?void 0:Cr.object,St.out_object_size=(ut=Et.data)===null||ut===void 0||((It=ut.data)===null||It===void 0)?void 0:It.size,St.output=(Br=Et.data)===null||Br===void 0||((Vr=Br.data)===null||Vr===void 0)?void 0:Vr.file_name,St.out_file=at}return St}return dt});if(Ge.current=Object(f.a)(Vt),J(Object(f.a)(Vt)),De.current>0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!0})}),ae(pt),he()}}})},Ie=function(at){return new Promise(function(ot,Ct){for(var bt=0,ft=[],jt=function(Qt){at[Qt].file.slice(0,1).arrayBuffer().then(function(){bt++,bt===at.length&&(ft.length?(s.b.warn("".concat(ft.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):ot(at))}).catch(function(kt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",kt),bt++,ft.push(at[Qt].name),bt===at.length&&(ft.length?(s.b.warn("".concat(ft.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):ot(at))})},Pt=0;Pt100)return s.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(at.name))return s.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var ot={name:at.name,uid:at.uid,file:at,percent:0};return ne.push(ot),Ge.current=Object(f.a)(ne),J(Object(f.a)(ne)),!1}},nt=H(ne);return console.log(ne,nt,"fileList"),g.a.createElement(i.a,{visible:xe,wrapClassName:ge,onOk:ke,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Je},onCancel:we,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},g.a.createElement("div",{className:E.a.wrap},ne.length?g.a.createElement("div",null,g.a.createElement(b.a,{justify:"space-between",align:"middle",className:"mb20"},g.a.createElement("div",{style:{visibility:te?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",g.a.createElement(d.a.Group,{className:"ml10",value:rt,onChange:function(at){return Le(at.target.value)}},g.a.createElement(d.a,{value:!1},"\u6587\u672C"),g.a.createElement(d.a,{value:!0},"\u6587\u4EF6"))),g.a.createElement(_.a,Ye,g.a.createElement(l.a,{className:E.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement(q,{data:nt,onRemove:_e})):g.a.createElement("div",{className:E.a.noData},g.a.createElement("img",{src:k.a,alt:""}),g.a.createElement(_.a,Ye,g.a.createElement(l.a,{className:E.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement("div",{className:E.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",g.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",g.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",g.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",g.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",g.a.createElement("br",null))))},q=function(ce){var he=ce.data,ae=he===void 0?[]:he,xe=ce.onRemove,ge=ce.width,oe=ge===void 0?"auto":ge,se=ce.showScore,te=se===void 0?!1:se,be=ce.disabled,ee=be===void 0?!1:be,ie=ce.inputChange,Ee=ce.onEvaluatingChange,ne=ce.showEvaluatingSetting,J=ne===void 0?!1:ne,X={value:"",filename:"",dataUrl:""},Q=Object(C.useState)(Object(u.a)({},X)),me=Object(c.a)(Q,2),fe=me[0],Te=me[1],ze=function(et){var rt=document.createElement("a");document.body.appendChild(rt);var Le=URL.createObjectURL(et.file);rt.href=Le,rt.download=et.name,rt.click(),URL.revokeObjectURL(Le),document.body.removeChild(rt)},Je=function(et,rt){Object(z.y)(et,rt)},qe=function(et,rt){i.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:g.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){xe(et,rt)},onCancel:function(){}})};return ae.length?g.a.createElement("div",{style:{width:oe}},g.a.createElement("div",{className:E.a.head},J&&g.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",g.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),g.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),g.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),te&&g.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),J&&g.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",g.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),J&&g.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",g.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ae.map(function(Xe,et){var rt,Le,Oe,Ve;return g.a.createElement("div",{key:et,className:E.a.list},J&&g.a.createElement("div",{style:{width:"10%"}},g.a.createElement(M.a,{checked:!!Xe.hidden,onChange:function(Ne){Ee(Ne.target.checked?1:0,et,"hidden")}})),g.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",et+1),g.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},g.a.createElement("span",{title:Xe.input||((rt=Xe[0])===null||rt===void 0?void 0:rt.name),onClick:Object(a.a)(R.a.mark(function Ze(){var Ne,Ge;return R.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Xe.input?Xe.input_file_url?Ne=Xe.input_file_url:Ne=Xe.in_file:Ne=Xe[0],!(typeof Ne=="string")){we.next=14;break}return we.next=4,fetch(Ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ge=we.sent,we.t0=Te,we.next=8,Ge.text();case 8:we.t1=we.sent,we.t2=Ne,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(z.H)(Ne.file);case 16:Ge=we.sent,Te({value:Ge.text,filename:Ne.name,dataUrl:Ge.link});case 18:case"end":return we.stop()}},Ze)}))},Xe.input||((Le=Xe[0])===null||Le===void 0?void 0:Le.name))),g.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},g.a.createElement("span",{title:Xe.output||((Oe=Xe[1])===null||Oe===void 0?void 0:Oe.name),onClick:Object(a.a)(R.a.mark(function Ze(){var Ne,Ge;return R.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Xe.input?Xe.output_file_url?Ne=Xe.output_file_url:Ne=Xe.out_file:Ne=Xe[1],!(typeof Ne=="string")){we.next=14;break}return we.next=4,fetch(Ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ge=we.sent,we.t0=Te,we.next=8,Ge.text();case 8:we.t1=we.sent,we.t2=Ne,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(z.H)(Ne.file);case 16:Ge=we.sent,Te({value:Ge.text,filename:Ne.name,dataUrl:Ge.link});case 18:case"end":return we.stop()}},Ze)}))},Xe.output||((Ve=Xe[1])===null||Ve===void 0?void 0:Ve.name))),te&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(v.a,{disabled:ee,style:{width:"70%"},onChange:function(Ne){return ie(Ne,et)},value:Xe.score}),g.a.createElement("span",null,"\xA0%")),J&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(M.a,{checked:Xe.is_invisible||!1,onChange:function(Ne){Ee(Ne.target.checked,et,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),J&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(M.a,{checked:Xe.last_match_rule||!1,onChange:function(Ne){Ee(Ne.target.checked,et,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),g.a.createElement("div",{onClick:function(){return qe(Xe,et)},style:{width:"10%"}},g.a.createElement("span",{className:E.a.del},"\u5220\u9664")))}),g.a.createElement(U.a,{close:!0,data:fe.dataUrl,filename:fe.filename,type:fe.dataUrl.length?"txt":"",onClose:function(){return Te(Object(u.a)({},X))},monacoEditor:{value:fe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):g.a.createElement(g.a.Fragment,null)};$.b=V},BU3w:function(F,$,j){"use strict";j.d($,"a",function(){return m});var N=j("MNnm"),v="rc-util-key";function O(S){if(S.attachTo)return S.attachTo;var b=document.querySelector("head");return b||document.body}function M(S){var b,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var d=document.createElement("style");if((b=p.csp)===null||b===void 0?void 0:b.nonce){var t;d.nonce=(t=p.csp)===null||t===void 0?void 0:t.nonce}d.innerHTML=S;var l=O(p),r=l.firstChild;return p.prepend&&l.prepend?l.prepend(d):p.prepend&&r?l.insertBefore(d,r):l.appendChild(d),d}var y=new Map;function m(S,b){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=O(p);if(!y.has(d)){var t=M("",p),l=t.parentNode;y.set(d,l),l.removeChild(t)}var r=Array.from(y.get(d).children).find(function(a){return a.tagName==="STYLE"&&a[v]===b});if(r){var i,o;if(((i=p.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((o=p.csp)===null||o===void 0?void 0:o.nonce)){var s;r.nonce=(s=p.csp)===null||s===void 0?void 0:s.nonce}return r.innerHTML!==S&&(r.innerHTML=S),r}var u=M(S,p);return u[v]=b,u}},Bd2K:function(F,$,j){(function(N){N(j("VrN/"),j("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(p,d,t){if(t!=N.Init&&t&&p.removeKeyMap("autoCloseTags"),!d)return;var l={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(l["'/'"]=function(r){return m(r)}),(typeof d!="object"||d.whenOpening!==!1)&&(l["'>'"]=function(r){return M(r)}),p.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 M(p){if(p.getOption("disableInput"))return N.Pass;for(var d=p.listSelections(),t=[],l=p.getOption("autoCloseTags"),r=0;ri.ch&&(c=c.slice(0,c.length-o.end+i.ch));var h=c.toLowerCase();if(!c||o.type=="string"&&(o.end!=i.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==i.ch-o.start-1||w&&S(w,h)>-1||b(p,s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(u)||[],c,i,!0))return N.Pass;var R=typeof l=="object"&&l.emptyTags;if(R&&S(R,c)>-1){t[r]={text:"/>",newPos:N.Pos(i.line,i.ch+2)};continue}var C=_&&S(_,h)>-1;t[r]={indent:C,text:">"+(C?` `:"")+"",newPos:C?N.Pos(i.line+1,0):N.Pos(i.line,i.ch+1)}}for(var g=typeof l=="object"&&l.dontIndentOnAutoClose,r=d.length-1;r>=0;r--){var x=t[r];p.replaceRange(x.text,d[r].head,d[r].anchor,"+insert");var E=p.listSelections().slice(0);E[r]={head:x.newPos,anchor:x.newPos},p.setSelections(E),!g&&x.indent&&(p.indentLine(x.newPos.line,null,!0),p.indentLine(x.newPos.line+1,null,!0))}}function y(p,d){for(var t=p.listSelections(),l=[],r=d?"/":""&&(w+=">"),l[s]=w}if(p.replaceSelections(l),t=p.listSelections(),!o)for(var s=0;s=0&&d[u]==t;u--)++s;l=o.to;for(var u=1;u0){for(var d=0;d1&&arguments[1]!==void 0?arguments[1]:"",d=[],t=0;t=0;d--){var t=O().key(d);p(M(t),t)}}function S(p){return O().removeItem(p)}function b(){return O().clear()}},DlQD:function(F,$,j){(function(N,v){F.exports=v()})(this,function(){"use strict";function N(De,we){for(var Ae=0;AeDe.length)&&(we=De.length);for(var Ae=0,de=new Array(we);Ae=De.length?{done:!0}:{done:!1,value:De[de++]}}}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 Ae=De[Symbol.iterator](),Ae.next.bind(Ae)}function m(De,we){return we={exports:{}},De(we,we.exports),we.exports}var S=m(function(De){function we(){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 Ae(de){De.exports.defaults=de}De.exports={defaults:we(),getDefaults:we,changeDefaults:Ae}}),b=S.defaults,p=S.getDefaults,d=S.changeDefaults,t=/[&<>"']/,l=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=function(we){return o[we]};function u(De,we){if(we){if(t.test(De))return De.replace(l,s)}else if(r.test(De))return De.replace(i,s);return De}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(De){return De.replace(a,function(we,Ae){return Ae=Ae.toLowerCase(),Ae==="colon"?":":Ae.charAt(0)==="#"?Ae.charAt(1)==="x"?String.fromCharCode(parseInt(Ae.substring(2),16)):String.fromCharCode(+Ae.substring(1)):""})}var f=/(^|[^\[])\^/g;function w(De,we){De=De.source||De,we=we||"";var Ae={replace:function(_e,Se){return Se=Se.source||Se,Se=Se.replace(f,"$1"),De=De.replace(_e,Se),Ae},getRegex:function(){return new RegExp(De,we)}};return Ae}var _=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(De,we,Ae){if(De){var de;try{de=decodeURIComponent(c(Ae)).replace(_,"").toLowerCase()}catch(_e){return null}if(de.indexOf("javascript:")===0||de.indexOf("vbscript:")===0||de.indexOf("data:")===0)return null}we&&!h.test(Ae)&&(Ae=T(we,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(_e){return null}return Ae}var C={},g=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(De,we){C[" "+De]||(g.test(De)?C[" "+De]=De+"/":C[" "+De]=G(De,"/",!0)),De=C[" "+De];var Ae=De.indexOf(":")===-1;return we.substring(0,2)==="//"?Ae?we:De.replace(x,"$1")+we:we.charAt(0)==="/"?Ae?we:De.replace(E,"$1")+we:De+we}var k={exec:function(){}};function L(De){for(var we=1,Ae,de;we=0&&ke[nt]==="\\";)Ye=!Ye;return Ye?"|":" |"}),de=Ae.split(/ \|/),_e=0;if(de.length>we)de.splice(we);else for(;de.length=de.length?_e.slice(de.length):_e}).join(` `)}var he=function(){function De(Ae){this.options=Ae||U}var we=De.prototype;return we.space=function(de){var _e=this.rules.block.newline.exec(de);if(_e)return _e[0].length>1?{type:"space",raw:_e[0]}:{raw:` `}},we.code=function(de,_e){var Se=this.rules.block.code.exec(de);if(Se){var Ie=_e[_e.length-1];if(Ie&&Ie.type==="paragraph")return{raw:Se[0],text:Se[0].trimRight()};var ke=Se[0].replace(/^ {4}/gm,"");return{type:"code",raw:Se[0],codeBlockStyle:"indented",text:this.options.pedantic?ke:P(ke,` `)}}},we.fences=function(de){var _e=this.rules.block.fences.exec(de);if(_e){var Se=_e[0],Ie=ce(Se,_e[3]||"");return{type:"code",raw:Se,lang:_e[2]?_e[2].trim():_e[2],text:Ie}}},we.heading=function(de){var _e=this.rules.block.heading.exec(de);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},we.nptable=function(de){var _e=this.rules.block.nptable.exec(de);if(_e){var Se={type:"table",header:H(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(` `):[],raw:_e[0]};if(Se.header.length===Se.align.length){var Ie=Se.align.length,ke;for(ke=0;ke ?/gm,"");return{type:"blockquote",raw:_e[0],text:Se}}},we.list=function(de){var _e=this.rules.block.list.exec(de);if(_e){for(var Se=_e[0],Ie=_e[2],ke=Ie.length>1,Ye=Ie[Ie.length-1]===")",nt={type:"list",raw:Se,ordered:ke,start:ke?+Ie.slice(0,-1):"",loose:!1,items:[]},lt=_e[0].match(this.rules.block.item),at=!1,ot,Ct,bt,ft,jt,Pt,Xt,Qt=lt.length,kt=0;kt1||this.options.smartLists&&bt!==Ie)&&(ft=lt.slice(kt+1).join(` `),nt.raw=nt.raw.substring(0,nt.raw.length-ft.length),kt=Qt-1)),jt=at||/\n\n(?!\s*$)/.test(ot),kt!==Qt-1&&(at=ot.charAt(ot.length-1)===` `,jt||(jt=at)),jt&&(nt.loose=!0),Pt=/^\[[ xX]\] /.test(ot),Xt=void 0,Pt&&(Xt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Se,task:Pt,checked:Xt,loose:jt,text:ot});return nt}},we.html=function(de){var _e=this.rules.block.html.exec(de);if(_e)return{type:this.options.sanitize?"paragraph":"html",raw:_e[0],pre:!this.options.sanitizer&&(_e[1]==="pre"||_e[1]==="script"||_e[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):V(_e[0]):_e[0]}},we.def=function(de){var _e=this.rules.block.def.exec(de);if(_e){_e[3]&&(_e[3]=_e[3].substring(1,_e[3].length-1));var Se=_e[1].toLowerCase().replace(/\s+/g," ");return{tag:Se,raw:_e[0],href:_e[2],title:_e[3]}}},we.table=function(de){var _e=this.rules.block.table.exec(de);if(_e){var Se={type:"table",header:H(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(` `):[]};if(Se.header.length===Se.align.length){Se.raw=_e[0];var Ie=Se.align.length,ke;for(ke=0;ke/i.test(Ie[0])&&(_e=!1),!Se&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ie[0])?Se=!0:Se&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ie[0])&&(Se=!1),{type:this.options.sanitize?"text":"html",raw:Ie[0],inLink:_e,inRawBlock:Se,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):V(Ie[0]):Ie[0]}},we.link=function(de){var _e=this.rules.inline.link.exec(de);if(_e){var Se=q(_e[2],"()");if(Se>-1){var Ie=_e[0].indexOf("!")===0?5:4,ke=Ie+_e[1].length+Se;_e[2]=_e[2].substring(0,Se),_e[0]=_e[0].substring(0,ke).trim(),_e[3]=""}var Ye=_e[2],nt="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ye);lt?(Ye=lt[1],nt=lt[3]):nt=""}else nt=_e[3]?_e[3].slice(1,-1):"";Ye=Ye.trim().replace(/^<([\s\S]*)>$/,"$1");var at=Z(_e,{href:Ye&&Ye.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},_e[0]);return at}},we.reflink=function(de,_e){var Se;if((Se=this.rules.inline.reflink.exec(de))||(Se=this.rules.inline.nolink.exec(de))){var Ie=(Se[2]||Se[1]).replace(/\s+/g," ");if(Ie=_e[Ie.toLowerCase()],!Ie||!Ie.href){var ke=Se[0].charAt(0);return{type:"text",raw:ke,text:ke}}var Ye=Z(Se,Ie,Se[0]);return Ye}},we.strong=function(de,_e,Se){Se===void 0&&(Se="");var Ie=this.rules.inline.strong.start.exec(de);if(Ie&&(!Ie[1]||Ie[1]&&(Se===""||this.rules.inline.punctuation.exec(Se)))){_e=_e.slice(-1*de.length);var ke=Ie[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ke.lastIndex=0;for(var Ye;(Ie=ke.exec(_e))!=null;)if(Ye=this.rules.inline.strong.middle.exec(_e.slice(0,Ie.index+3)),Ye)return{type:"strong",raw:de.slice(0,Ye[0].length),text:de.slice(2,Ye[0].length-2)}}},we.em=function(de,_e,Se){Se===void 0&&(Se="");var Ie=this.rules.inline.em.start.exec(de);if(Ie&&(!Ie[1]||Ie[1]&&(Se===""||this.rules.inline.punctuation.exec(Se)))){_e=_e.slice(-1*de.length);var ke=Ie[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ke.lastIndex=0;for(var Ye;(Ie=ke.exec(_e))!=null;)if(Ye=this.rules.inline.em.middle.exec(_e.slice(0,Ie.index+2)),Ye)return{type:"em",raw:de.slice(0,Ye[0].length),text:de.slice(1,Ye[0].length-1)}}},we.codespan=function(de){var _e=this.rules.inline.code.exec(de);if(_e){var Se=_e[2].replace(/\n/g," "),Ie=/[^ ]/.test(Se),ke=Se.startsWith(" ")&&Se.endsWith(" ");return Ie&&ke&&(Se=Se.substring(1,Se.length-1)),Se=V(Se,!0),{type:"codespan",raw:_e[0],text:Se}}},we.br=function(de){var _e=this.rules.inline.br.exec(de);if(_e)return{type:"br",raw:_e[0]}},we.del=function(de){var _e=this.rules.inline.del.exec(de);if(_e)return{type:"del",raw:_e[0],text:_e[1]}},we.autolink=function(de,_e){var Se=this.rules.inline.autolink.exec(de);if(Se){var Ie,ke;return Se[2]==="@"?(Ie=V(this.options.mangle?_e(Se[1]):Se[1]),ke="mailto:"+Ie):(Ie=V(Se[1]),ke=Ie),{type:"link",raw:Se[0],text:Ie,href:ke,tokens:[{type:"text",raw:Ie,text:Ie}]}}},we.url=function(de,_e){var Se;if(Se=this.rules.inline.url.exec(de)){var Ie,ke;if(Se[2]==="@")Ie=V(this.options.mangle?_e(Se[0]):Se[0]),ke="mailto:"+Ie;else{var Ye;do Ye=Se[0],Se[0]=this.rules.inline._backpedal.exec(Se[0])[0];while(Ye!==Se[0]);Ie=V(Se[0]),Se[1]==="www."?ke="http://"+Ie:ke=Ie}return{type:"link",raw:Se[0],text:Ie,href:ke,tokens:[{type:"text",raw:Ie,text:Ie}]}}},we.inlineText=function(de,_e,Se){var Ie=this.rules.inline.text.exec(de);if(Ie){var ke;return _e?ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):V(Ie[0]):Ie[0]:ke=V(this.options.smartypants?Se(Ie[0]):Ie[0]),{type:"text",raw:Ie[0],text:ke}}},De}(),ae=z.noopTest,xe=z.edit,ge=z.merge,oe={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ae,table:ae,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=xe(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=xe(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=xe(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._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",oe._comment=//,oe.html=xe(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=xe(oe._paragraph).replace("hr",oe.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",")|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.blockquote=xe(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=ge({},oe),oe.gfm=ge({},oe.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*|$)"}),oe.gfm.nptable=xe(oe.gfm.nptable).replace("hr",oe.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",")|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.gfm.table=xe(oe.gfm.table).replace("hr",oe.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",")|<(?:script|pre|style|!--)").replace("tag",oe._tag).getRegex(),oe.pedantic=ge({},oe.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ae,paragraph:xe(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ae,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:ae,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",se.punctuation=xe(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=xe(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=xe(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=xe(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=xe(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=xe(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=xe(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=xe(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=xe(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=xe(se._blockSkip,"g").getRegex(),se.overlapSkip=xe(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._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])?)+(?![-_])/,se.autolink=xe(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=xe(se.tag).replace("comment",oe._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=xe(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=xe(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=xe(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=ge({},se),se.pedantic=ge({},se.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=ge({},se.normal,{escape:xe(se.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]*?(?:(?=[\\.5&&(de="x"+de.toString(16)),we+="&#"+de+";";return we}var J=function(){function De(Ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ae||be,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var de={block:ee.normal,inline:ie.normal};this.options.pedantic?(de.block=ee.pedantic,de.inline=ie.pedantic):this.options.gfm&&(de.block=ee.gfm,this.options.breaks?de.inline=ie.breaks:de.inline=ie.gfm),this.tokenizer.rules=de}De.lex=function(de,_e){var Se=new De(_e);return Se.lex(de)};var we=De.prototype;return we.lex=function(de){return de=de.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(de,this.tokens,!0),this.inline(this.tokens),this.tokens},we.blockTokens=function(de,_e,Se){_e===void 0&&(_e=[]),Se===void 0&&(Se=!0),de=de.replace(/^ +$/gm,"");for(var Ie,ke,Ye,nt;de;){if(Ie=this.tokenizer.space(de)){de=de.substring(Ie.raw.length),Ie.type&&_e.push(Ie);continue}if(Ie=this.tokenizer.code(de,_e)){de=de.substring(Ie.raw.length),Ie.type?_e.push(Ie):(nt=_e[_e.length-1],nt.raw+=` `+Ie.raw,nt.text+=` `+Ie.text);continue}if(Ie=this.tokenizer.fences(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.heading(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.nptable(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.hr(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.blockquote(de)){de=de.substring(Ie.raw.length),Ie.tokens=this.blockTokens(Ie.text,[],Se),_e.push(Ie);continue}if(Ie=this.tokenizer.list(de)){for(de=de.substring(Ie.raw.length),Ye=Ie.items.length,ke=0;ke0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)at.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;de;){if(Ye=this.tokenizer.escape(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.tag(de,Se,Ie)){de=de.substring(Ye.raw.length),Se=Ye.inLink,Ie=Ye.inRawBlock,_e.push(Ye);continue}if(Ye=this.tokenizer.link(de)){de=de.substring(Ye.raw.length),Ye.type==="link"&&(Ye.tokens=this.inlineTokens(Ye.text,[],!0,Ie)),_e.push(Ye);continue}if(Ye=this.tokenizer.reflink(de,this.tokens.links)){de=de.substring(Ye.raw.length),Ye.type==="link"&&(Ye.tokens=this.inlineTokens(Ye.text,[],!0,Ie)),_e.push(Ye);continue}if(Ye=this.tokenizer.strong(de,nt,ke)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.em(de,nt,ke)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.codespan(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.br(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.del(de)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.autolink(de,ne)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(!Se&&(Ye=this.tokenizer.url(de,ne))){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.inlineText(de,Ie,Ee)){de=de.substring(Ye.raw.length),ke=Ye.raw.slice(-1),_e.push(Ye);continue}if(de){var ot="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return _e},v(De,null,[{key:"rules",get:function(){return{block:ee,inline:ie}}}]),De}(),X=S.defaults,Q=z.cleanUrl,me=z.escape,fe=function(){function De(Ae){this.options=Ae||X}var we=De.prototype;return we.code=function(de,_e,Se){var Ie=(_e||"").match(/\S*/)[0];if(this.options.highlight){var ke=this.options.highlight(de,Ie);ke!=null&&ke!==de&&(Se=!0,de=ke)}return Ie?'
    '+(Se?de:me(de,!0))+`
    `:"
    "+(Se?de:me(de,!0))+`
    `},we.blockquote=function(de){return`
    `+de+`
    `},we.html=function(de){return de},we.heading=function(de,_e,Se,Ie){return this.options.headerIds?"'+de+" `:""+de+" `},we.hr=function(){return this.options.xhtml?`
    `:`
    `},we.list=function(de,_e,Se){var Ie=_e?"ol":"ul",ke=_e&&Se!==1?' start="'+Se+'"':"";return"<"+Ie+ke+`> `+de+" `},we.listitem=function(de){return"
  • "+de+`
  • `},we.checkbox=function(de){return" "},we.paragraph=function(de){return"

    "+de+`

    `},we.table=function(de,_e){return _e&&(_e=""+_e+""),` `+de+` `+_e+`
    `},we.tablerow=function(de){return` `+de+` `},we.tablecell=function(de,_e){var Se=_e.header?"th":"td",Ie=_e.align?"<"+Se+' align="'+_e.align+'">':"<"+Se+">";return Ie+de+" `},we.strong=function(de){return""+de+""},we.em=function(de){return""+de+""},we.codespan=function(de){return""+de+""},we.br=function(){return this.options.xhtml?"
    ":"
    "},we.del=function(de){return""+de+""},we.link=function(de,_e,Se){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Se;var Ie='",Ie},we.image=function(de,_e,Se){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Se;var Ie=''+Se+'":">",Ie},we.text=function(de){return de},De}(),Te=function(){function De(){}var we=De.prototype;return we.strong=function(de){return de},we.em=function(de){return de},we.codespan=function(de){return de},we.del=function(de){return de},we.html=function(de){return de},we.text=function(de){return de},we.link=function(de,_e,Se){return""+Se},we.image=function(de,_e,Se){return""+Se},we.br=function(){return""},De}(),ze=function(){function De(){this.seen={}}var we=De.prototype;return we.slug=function(de){var _e=de.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(_e)){var Se=_e;do this.seen[Se]++,_e=Se+"-"+this.seen[Se];while(this.seen.hasOwnProperty(_e))}return this.seen[_e]=0,_e},De}(),Je=S.defaults,qe=z.unescape,Xe=function(){function De(Ae){this.options=Ae||Je,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new ze}De.parse=function(de,_e){var Se=new De(_e);return Se.parse(de)};var we=De.prototype;return we.parse=function(de,_e){_e===void 0&&(_e=!0);var Se="",Ie,ke,Ye,nt,lt,at,ot,Ct,bt,ft,jt,Pt,Xt,Qt,kt,Et,Vt,pt,dt=de.length;for(Ie=0;Ie0&&kt.tokens[0].type==="text"?(kt.tokens[0].text=pt+" "+kt.tokens[0].text,kt.tokens[0].tokens&&kt.tokens[0].tokens.length>0&&kt.tokens[0].tokens[0].type==="text"&&(kt.tokens[0].tokens[0].text=pt+" "+kt.tokens[0].tokens[0].text)):kt.tokens.unshift({type:"text",text:pt}):Qt+=pt),Qt+=this.parse(kt.tokens,Xt),bt+=this.renderer.listitem(Qt,Vt,Et);Se+=this.renderer.list(bt,jt,Pt);continue}case"html":{Se+=this.renderer.html(ft.text);continue}case"paragraph":{Se+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(bt=ft.tokens?this.parseInline(ft.tokens):ft.text;Ie+1An error occurred:

    "+Le(Ye.message+"",!0)+"
    ";throw Ye}}Ne.options=Ne.setOptions=function(De){return et(Ne.defaults,De),Ve(Ne.defaults),Ne},Ne.getDefaults=Oe,Ne.defaults=Ze,Ne.use=function(De){var we=et({},De);if(De.renderer&&function(){var de=Ne.defaults.renderer||new fe,_e=function(ke){var Ye=de[ke];de[ke]=function(){for(var nt=arguments.length,lt=new Array(nt),at=0;at=0;r--){if(!O(l[r]))continue;var i=l[r].split("="),o=unescape(i[0]),s=unescape(i[1]);t(s,o)}}function S(t,l){if(!t)return;M.cookie=escape(t)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function b(t){if(!t||!d(t))return;M.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function p(){m(function(t,l){b(l)})}function d(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(M.cookie)}},E4JC:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.Rabbit=M.extend({_doReset:function(){for(var t=this._key.words,l=this.cfg.iv,r=0;r<4;r++)t[r]=(t[r]<<8|t[r]>>>24)&16711935|(t[r]<<24|t[r]>>>8)&4278255360;var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var r=0;r<4;r++)d.call(this);for(var r=0;r<8;r++)o[r]^=i[r+4&7];if(l){var s=l.words,u=s[0],a=s[1],c=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=c>>>16|f&4294901760,_=f<<16|c&65535;o[0]^=c,o[1]^=w,o[2]^=f,o[3]^=_,o[4]^=c,o[5]^=w,o[6]^=f,o[7]^=_;for(var r=0;r<4;r++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,u=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=u^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.Rabbit=M._createHelper(p)}(),N.Rabbit})},ELLl:function(F,$,j){(function(N){N(j("VrN/"))})(function(N){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,s,u){u&&u!=N.Init&&(o.removeKeyMap(y),o.state.closeBrackets=null),s&&(m(M(s,"pairs")),o.state.closeBrackets=s,o.addKeyMap(y))});function M(o,s){return s=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[s]!=null?o[s]:v[s]}var y={Backspace:p,Enter:d};function m(o){for(var s=0;s=0;c--){var w=a[c].head;o.replaceRange("",O(w.line,w.ch-1),O(w.line,w.ch+1),"+delete")}}function d(o){var s=b(o),u=s&&M(s,"explode");if(!u||o.getOption("disableInput"))return N.Pass;for(var a=o.listSelections(),c=0;c0;return{anchor:new O(o.anchor.line,o.anchor.ch+(s?-1:1)),head:new O(o.head.line,o.head.ch+(s?1:-1))}}function l(o,s){var u=b(o);if(!u||o.getOption("disableInput"))return N.Pass;var a=M(u,"pairs"),c=a.indexOf(s);if(c==-1)return N.Pass;for(var f=M(u,"closeBefore"),w=M(u,"triples"),_=a.charAt(c+1)==s,h=o.listSelections(),R=c%2==0,C,g=0;g=0&&o.getRange(E,O(E.line,E.ch+3))==s+s+s?T="skipThree":T="skip";else if(_&&E.ch>1&&w.indexOf(s)>=0&&o.getRange(O(E.line,E.ch-2),E)==s+s){if(E.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(E.line,E.ch-2))))return N.Pass;T="addFour"}else if(_){var L=E.ch==0?" ":o.getRange(O(E.line,E.ch-1),E);if(!N.isWordChar(k)&&L!=s&&!N.isWordChar(L))T="both";else return N.Pass}else if(R&&(k.length===0||/\s/.test(k)||f.indexOf(k)>-1))T="both";else return N.Pass;if(!C)C=T;else if(C!=T)return N.Pass}var A=c%2?a.charAt(c-1):s,G=c%2?s:a.charAt(c+1);o.operation(function(){if(C=="skip")o.execCommand("goCharRight");else if(C=="skipThree")for(var K=0;K<3;K++)o.execCommand("goCharRight");else if(C=="surround"){for(var W=o.getSelections(),K=0;K>>24)&16711935|(C<<24|C>>>8)&4278255360}var g=this._hash.words,x=l.words,E=r.words,T=b.words,k=p.words,L=d.words,A=t.words,G,K,W,z,U,P,H,V,q,Z;P=G=g[0],H=K=g[1],V=W=g[2],q=z=g[3],Z=U=g[4];for(var ce,h=0;h<80;h+=1)ce=G+w[_+T[h]]|0,h<16?ce+=o(K,W,z)+x[0]:h<32?ce+=s(K,W,z)+x[1]:h<48?ce+=u(K,W,z)+x[2]:h<64?ce+=a(K,W,z)+x[3]:ce+=c(K,W,z)+x[4],ce=ce|0,ce=f(ce,L[h]),ce=ce+U|0,G=U,U=z,z=f(W,10),W=K,K=ce,ce=P+w[_+k[h]]|0,h<16?ce+=c(H,V,q)+E[0]:h<32?ce+=a(H,V,q)+E[1]:h<48?ce+=u(H,V,q)+E[2]:h<64?ce+=s(H,V,q)+E[3]:ce+=o(H,V,q)+E[4],ce=ce|0,ce=f(ce,A[h]),ce=ce+Z|0,P=Z,Z=q,q=f(V,10),V=H,H=ce;ce=g[1]+W+q|0,g[1]=g[2]+z+Z|0,g[2]=g[3]+U+P|0,g[3]=g[4]+G+H|0,g[4]=g[0]+K+V|0,g[0]=ce},_doFinalize:function(){var w=this._data,_=w.words,h=this._nDataBytes*8,R=w.sigBytes*8;_[R>>>5]|=128<<24-R%32,_[(R+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,w.sigBytes=(_.length+1)*4,this._process();for(var C=this._hash,g=C.words,x=0;x<5;x++){var E=g[x];g[x]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return C},clone:function(){var w=m.clone.call(this);return w._hash=this._hash.clone(),w}});function o(w,_,h){return w^_^h}function s(w,_,h){return w&_|~w&h}function u(w,_,h){return(w|~_)^h}function a(w,_,h){return w&h|_&~h}function c(w,_,h){return w^(_|~h)}function f(w,_){return w<<_|w>>>32-_}O.RIPEMD160=m._createHelper(i),O.HmacRIPEMD160=m._createHmacHelper(i)}(Math),N.RIPEMD160})},ETIr:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Base64={stringify:function(b){var p=b.words,d=b.sigBytes,t=this._map;b.clamp();for(var l=[],r=0;r>>2]>>>24-r%4*8&255,o=p[r+1>>>2]>>>24-(r+1)%4*8&255,s=p[r+2>>>2]>>>24-(r+2)%4*8&255,u=i<<16|o<<8|s,a=0;a<4&&r+a*.75>>6*(3-a)&63));var c=t.charAt(64);if(c)for(;l.length%4;)l.push(c);return l.join("")},parse:function(b){var p=b.length,d=this._map,t=this._reverseMap;if(!t){t=this._reverseMap=[];for(var l=0;l>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return M.create(t,l)}}(),N.enc.Base64})},"F+F2":function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var v=N,O=v.lib,M=O.WordArray,y=M.init,m=M.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var b=S.byteLength,p=[],d=0;d>>2]|=S[d]<<24-d%4*8;y.call(this,p,b)}else y.apply(this,arguments)};m.prototype=M}(),N.lib.WordArray})},GRuw:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("lPiR"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.algo,m=y.SHA256,S=y.SHA224=m.extend({_doReset:function(){this._hash=new M.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=m._doFinalize.call(this);return b.sigBytes-=4,b}});v.SHA224=m._createHelper(S),v.HmacSHA224=m._createHmacHelper(S)}(),N.SHA224})},GfqC:function(F,$,j){"use strict";var N=j("cDcd"),v=j.n(N),O=j("TSYQ"),M=j.n(O);function y(z,U){var P="cannot "+z.method+" "+z.action+" "+U.status+"'",H=new Error(P);return H.status=U.status,H.method=z.method,H.url=z.action,H}function m(z){var U=z.responseText||z.response;if(!U)return U;try{return JSON.parse(U)}catch(P){return U}}function S(z){var U=new XMLHttpRequest;z.onProgress&&U.upload&&(U.upload.onprogress=function(q){q.total>0&&(q.percent=q.loaded/q.total*100),z.onProgress(q)});var P=new FormData;z.data&&Object.keys(z.data).forEach(function(V){var q=z.data[V];if(Array.isArray(q)){q.forEach(function(Z){P.append(V+"[]",Z)});return}P.append(V,z.data[V])}),z.file instanceof Blob?P.append(z.filename,z.file,z.file.name):P.append(z.filename,z.file),U.onerror=function(q){z.onError(q)},U.onload=function(){return U.status<200||U.status>=300?z.onError(y(z,U),m(U)):z.onSuccess(m(U),U)},U.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var H=z.headers||{};return H["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(V){H[V]!==null&&U.setRequestHeader(V,H[V])}),U.send(P),{abort:function(){U.abort()}}}var b=+new Date,p=0;function d(){return"rc-upload-"+b+"-"+ ++p}function t(z,U){return z.indexOf(U,z.length-U.length)!==-1}var l=function(z,U){if(z&&U){var P=Array.isArray(U)?U:U.split(","),H=z.name||"",V=z.type||"",q=V.replace(/\/.*$/,"");return P.some(function(Z){var ce=Z.trim();return ce.charAt(0)==="."?t(H.toLowerCase(),ce.toLowerCase()):/\/\*$/.test(ce)?q===ce.replace(/\/.*$/,""):V===ce})}return!0};function r(z,U){var P=z.createReader(),H=[];function V(){P.readEntries(function(q){var Z=Array.prototype.slice.apply(q);H=H.concat(Z);var ce=!Z.length;ce?U(H):V()})}V()}var i=function(U,P,H){var V=function q(Z,ce){ce=ce||"",Z.isFile?Z.file(function(he){H(he)&&(Z.fullPath&&!he.webkitRelativePath&&(Object.defineProperties(he,{webkitRelativePath:{writable:!0}}),he.webkitRelativePath=Z.fullPath.replace(/^\//,""),Object.defineProperties(he,{webkitRelativePath:{writable:!1}})),P([he]))}):Z.isDirectory&&r(Z,function(he){he.forEach(function(ae){q(ae,""+ce+Z.name+"/")})})};U.forEach(function(q){V(q.webkitGetAsEntry())})},o=i,s=Object.assign||function(z){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(z,H))continue;P[H]=z[H]}return P}function w(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function _(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function h(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}var R=function(U){return Object.keys(U).reduce(function(P,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(P[H]=U[H]),P},{})},C=function(z){h(U,z);function U(){var P,H,V,q;w(this,U);for(var Z=arguments.length,ce=Array(Z),he=0;he>>2]>>>24-R%4*8&255;f[_+R>>>2]|=C<<24-(_+R)%4*8}else for(var g=0;g>>2]=w[g>>>2];return this.sigBytes+=h,this},clamp:function(){var c=this.words,f=this.sigBytes;c[f>>>2]&=4294967295<<32-f%4*8,c.length=O.ceil(f/4)},clone:function(){var c=d.clone.call(this);return c.words=this.words.slice(0),c},random:function(c){for(var f=[],w=0;w>>2]>>>24-h%4*8&255;_.push((R>>>4).toString(16)),_.push((R&15).toString(16))}return _.join("")},parse:function(c){for(var f=c.length,w=[],_=0;_>>3]|=parseInt(c.substr(_,2),16)<<24-_%8*4;return new t.init(w,f/2)}},i=l.Latin1={stringify:function(c){for(var f=c.words,w=c.sigBytes,_=[],h=0;h>>2]>>>24-h%4*8&255;_.push(String.fromCharCode(R))}return _.join("")},parse:function(c){for(var f=c.length,w=[],_=0;_>>2]|=(c.charCodeAt(_)&255)<<24-_%4*8;return new t.init(w,f)}},o=l.Utf8={stringify:function(c){try{return decodeURIComponent(escape(i.stringify(c)))}catch(f){throw new Error("Malformed UTF-8 data")}},parse:function(c){return i.parse(unescape(encodeURIComponent(c)))}},s=p.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(c){typeof c=="string"&&(c=o.parse(c)),this._data.concat(c),this._nDataBytes+=c.sigBytes},_process:function(c){var f,w=this._data,_=w.words,h=w.sigBytes,R=this.blockSize,C=R*4,g=h/C;c?g=O.ceil(g):g=O.max((g|0)-this._minBufferSize,0);var x=g*R,E=O.min(x*4,h);if(x){for(var T=0;T>>6)+p(128|G&63):p(224|G>>>12&15)+p(128|G>>>6&63)+p(128|G&63)}else{var G=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return p(240|G>>>18&7)+p(128|G>>>12&63)+p(128|G>>>6&63)+p(128|G&63)}},t=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(A){return A.replace(t,d)},r=function(A){var G=[0,2,1][A.length%3],K=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),W=[S.charAt(K>>>18),S.charAt(K>>>12&63),G>=2?"=":S.charAt(K>>>6&63),G>=1?"=":S.charAt(K&63)];return W.join("")},i=M.btoa&&typeof M.btoa=="function"?function(A){return M.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,r)},o=function(A){return i(l(String(A)))},s=function(A){return A.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},u=function(A,G){return G?s(o(A)):o(A)},a=function(A){return u(A,!0)},c;M.Uint8Array&&(c=function(A,G){for(var K="",W=0,z=A.length;W>>18)+S.charAt(V>>>12&63)+(typeof P!="undefined"?S.charAt(V>>>6&63):"=")+(typeof H!="undefined"?S.charAt(V&63):"=")}return G?s(K):K});var f=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(A){switch(A.length){case 4:var G=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),K=G-65536;return p((K>>>10)+55296)+p((K&1023)+56320);case 3:return p((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return p((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},_=function(A){return A.replace(f,w)},h=function(A){var G=A.length,K=G%4,W=(G>0?b[A.charAt(0)]<<18:0)|(G>1?b[A.charAt(1)]<<12:0)|(G>2?b[A.charAt(2)]<<6:0)|(G>3?b[A.charAt(3)]:0),z=[p(W>>>16),p(W>>>8&255),p(W&255)];return z.length-=[0,0,2,1][K],z.join("")},R=M.atob&&typeof M.atob=="function"?function(A){return M.atob(A)}:function(A){return A.replace(/\S{1,4}/g,h)},C=function(A){return R(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(A){return _(R(A))},x=function(A){return String(A).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(A){return g(x(A))},T;M.Uint8Array&&(T=function(A){return Uint8Array.from(C(x(A)),function(G){return G.charCodeAt(0)})});var k=function(){var A=M.Base64;return M.Base64=y,A};if(M.Base64={VERSION:m,atob:C,btoa:i,fromBase64:E,toBase64:u,utob:l,encode:u,encodeURI:a,btou:_,decode:E,noConflict:k,fromUint8Array:c,toUint8Array:T},typeof Object.defineProperty=="function"){var L=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};M.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",L(function(A){return u(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",L(function(){return u(this,!0)}))}}return M.Meteor&&(Base64=M.Base64),F.exports?F.exports.Base64=M.Base64:!(v=[],O=function(){return M.Base64}.apply($,v),O!==void 0&&(F.exports=O)),{Base64:M.Base64}})}).call(this,j("IyRk"))},K3mO:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Base,y=O.WordArray,m=v.algo,S=m.MD5,b=m.EvpKDF=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,d){for(var t,l=this.cfg,r=l.hasher.create(),i=y.create(),o=i.words,s=l.keySize,u=l.iterations;o.lengthge)){se.next=7;break}return O.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ge/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),se.abrupt("return",!1);case 7:return W.push({name:xe.name,file:xe}),z(Object(M.a)(W)),A.onChange(W),se.abrupt("return",!1);case 11:case"end":return se.stop()}},ae)}));function he(ae){return ce.apply(this,arguments)}return he}()},Z=function(){var ce=Object(b.a)(l.a.mark(function he(ae,xe){var ge,oe,se,te,be,ee,ie,Ee,ne,J;return l.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return xe.file_name=ae.name,ie=ae.name,Q.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ee=Q.sent,Ee.data=JSON.parse(h(Ee.data)),!((Ee==null?void 0:Ee.status)!==0)){Q.next=12;break}return W[W.findIndex(function(me){return me.name===ie})].status="error",W[W.findIndex(function(me){return me.name===ie})].file.status="error",A.onChange(W),O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return H=new w.a({endpoint:Ee==null||((ge=Ee.data)===null||ge===void 0)?void 0:ge.end_point,region:Ee==null||((oe=Ee.data)===null||oe===void 0)?void 0:oe.region,accessKeyId:Ee==null||((se=Ee.data)===null||se===void 0)?void 0:se.access_key_id,accessKeySecret:Ee==null||((te=Ee.data)===null||te===void 0)?void 0:te.access_key_secret,bucket:Ee==null||((be=Ee.data)===null||be===void 0)?void 0:be.bucket,stsToken:Ee==null||((ee=Ee.data)===null||ee===void 0)?void 0:ee.security_token}),console.log(ae,"file"),V(H),ne=ae.name.split("."),ne.pop(),J=xe.realFileName?ne:Object(a.a)(),Q.abrupt("return",new Promise(function(me,fe){try{var Te;H.multipartUpload("".concat(A.identifier,"/").concat(J).concat(ie.indexOf(".")>-1?"."+ie.split(".").pop():""),new Blob([ae.file],{type:ae.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Je,qe,Xe){try{console.log("\u8FDB\u5EA6",Je,qe,Xe);var et=W.findIndex(function(rt){return rt.name===ie});W[et].file.percent=Je*100,W[et].tempCheckpoint=qe,z(Object(M.a)(W))}catch(rt){}},checkpoint:W[W.findIndex(function(ze){return ze.name===ie})].tempCheckpoint,callback:{customValue:{id:ie+""},url:Ee==null||((Te=Ee.data)===null||Te===void 0)?void 0:Te.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(o.e)(xe)}}).then(function(ze){var Je,qe=W.findIndex(function(Oe){return Oe.name===ie}),Xe="done";if(((Je=ze.data)===null||Je===void 0?void 0:Je.status)===0){var et;ae.response=(et=ze.data)===null||et===void 0?void 0:et.data;var rt=W.findIndex(function(Oe){return Oe.name===ie});W[rt].status="done",W[rt].file.status="done"}else{var Le;O.b.warn((Le=ze.data)===null||Le===void 0?void 0:Le.message),Xe="error"}W[qe].status=Xe,W[qe].file.status=Xe,A.onChange(W),me(ze==null?void 0:ze.data)}).catch(function(ze){W[W.findIndex(function(Je){return Je.name===ie})].status="error",W[W.findIndex(function(Je){return Je.name===ie})].file.status="error",O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),z(Object(M.a)(W)),A.onChange(W),fe(ze),console.log("err:",ze)})}catch(ze){}}));case 19:case"end":return Q.stop()}},he)}));return function(ae,xe){return ce.apply(this,arguments)}}();return Object(r.useEffect)(function(){W.every(function(ce){return ce==="done"||ce==="error"})&&A.onComplete(W)},[W]),Object(r.useEffect)(function(){if(L){var ce;(ce=H)===null||ce===void 0||ce.cancel()}},[L]),Object(r.useEffect)(function(){A.uploading&&W.map(function(){var ce=Object(b.a)(l.a.mark(function he(ae){var xe,ge;return l.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!((!ae.status||ae.status==="error")&&!L)){se.next=6;break}return ae.status="uploading",ae.file.status="uploading",se.next=5,Z(ae,{login:k==null||((xe=k.userInfo)===null||xe===void 0)?void 0:xe.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:ge=se.sent;case 6:case"end":return se.stop()}},he)}));return function(he){return ce.apply(this,arguments)}}())},[A.uploading]),i.a.createElement(_,Object(N.a)({},q,{height:A.height,className:A.className}),i.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};$.b=Object(c.a)(function(E){var T=E.loading,k=E.globalSetting,L=E.user;return{globalSetting:k,loading:T.models.competitions,user:L}})(x)},KmYQ:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(v,O){var M=O*4;v.clamp(),v.sigBytes+=M-(v.sigBytes%M||M)},unpad:function(v){for(var O=v.words,M=v.sigBytes-1,M=v.sigBytes-1;M>=0;M--)if(O[M>>>2]>>>24-M%4*8&255){v.sigBytes=M+1;break}}},N.pad.ZeroPadding})},L9qf:function(F,$,j){F.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(F,$,j){"use strict";j.d($,"b",function(){return f}),j.d($,"a",function(){return _});var N=j("1OyB"),v=j("vuIU"),O=j("Ji7U"),M=j("LK+K"),y=j("cDcd"),m=j("rePB"),S=j("Ff2n"),b=j("ODXe"),p=j("4IlW"),d=j("bX4T"),t=j("YrtM"),l=j("TSYQ"),r=j.n(l),i=j("+nKL"),o=j("8OUc"),s=function(H,V){var q=H.prefixCls,Z=H.id,ce=H.flattenOptions,he=H.childrenAsData,ae=H.values,xe=H.searchValue,ge=H.multiple,oe=H.defaultActiveFirstOption,se=H.height,te=H.itemHeight,be=H.notFoundContent,ee=H.open,ie=H.menuItemSelectedIcon,Ee=H.virtual,ne=H.onSelect,J=H.onToggleOpen,X=H.onActiveValue,Q=H.onScroll,me=H.onMouseEnter,fe="".concat(q,"-item"),Te=Object(t.a)(function(){return ce},[ee,ce],function(Ge,De){return De[0]&&Ge[1]!==De[1]}),ze=y.useRef(null),Je=function(De){De.preventDefault()},qe=function(De){ze.current&&ze.current.scrollTo({index:De})},Xe=function(De){for(var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ae=Te.length,de=0;de1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(P).map(function(V,q){if(!y.isValidElement(V)||!V.type)return null;var Z=V.type.isSelectOptGroup,ce=V.key,he=V.props,ae=he.children,xe=Object(S.a)(he,["children"]);return H||!Z?C(V):Object(h.a)(Object(h.a)({key:"__RC_SELECT_GRP__".concat(ce===null?q:ce,"__"),label:ce},xe),{},{options:g(ae)})}).filter(function(V){return V})}var x=j("2Qr1"),E=j("qNPg"),T=j("U8pU"),k=j("Kwbf"),L=j("WKfj");function A(P){var H=P.mode,V=P.options,q=P.children,Z=P.backfill,ce=P.allowClear,he=P.placeholder,ae=P.getInputElement,xe=P.showSearch,ge=P.onSearch,oe=P.defaultOpen,se=P.autoFocus,te=P.labelInValue,be=P.value,ee=P.inputValue,ie=P.optionLabelProp,Ee=H==="multiple"||H==="tags",ne=xe!==void 0?xe:Ee||H==="combobox",J=V||g(q);if(Object(k.a)(H!=="tags"||J.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var X=J.some(function(fe){return fe.options?fe.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(k.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(H!=="combobox"||!ie,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(H==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(k.a)(H==="combobox"||!ae,"`getInputElement` only work with `combobox` mode."),Object(k.b)(H!=="combobox"||!ae||!ce||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!ne&&H!=="combobox"&&H!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!oe||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Q=Object(L.d)(be);Object(k.a)(!te||Q.every(function(fe){return Object(T.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!Ee||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var me=null;Object(R.a)(q).some(function(fe){if(!y.isValidElement(fe)||!fe.type)return!1;var Te=fe.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var ze=Object(R.a)(fe.props.children).every(function(Je){return!y.isValidElement(Je)||!fe.type||Je.type.isSelectOption?!0:(me=Je.type,!1)});return!ze}return me=Te,!0}),me&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(k.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=A,K=Object(E.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:g,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:G,fillOptionsWithMissingValue:x.a}),W=function(P){Object(O.a)(V,P);var H=Object(M.a)(V);function V(){var q;return Object(N.a)(this,V),q=H.apply(this,arguments),q.selectRef=y.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(v.a)(V,[{key:"render",value:function(){return y.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),V}(y.Component);W.Option=f,W.OptGroup=_;var z=W,U=$.c=z},M8RZ:function(F,$,j){"use strict";j.d($,"a",function(){return p});var N=j("fWQN"),v=j("mtLc"),O=j("yKVA"),M=j("879j"),y=j("cDcd"),m=j.n(y),S=j("faye"),b=j.n(S),p=function(d){Object(O.a)(l,d);var t=Object(M.a)(l);function l(r){var i;Object(N.a)(this,l),i=t.call(this,r);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(S.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(m.a.Component)},MFOe:function(F,$,j){(function(N){var v=m(),O=S(),M=b(),y=typeof window!="undefined"?window:N;F.exports={assign:v,create:O,trim:M,bind:p,slice:d,each:t,map:l,pluck:r,isList:i,isFunction:o,isObject:s,Global:y};function m(){return Object.assign?Object.assign:function(a,c,f,w){for(var _=1;_=0;s-=1){var u=b.get(s)||new Set;u.forEach(function(a){var c=a.parent,f=a.node;if(d(f)||!a.parent||o.has(a.parent.key))return;if(d(a.parent.node)){o.add(c.key);return}var w=!0,_=!1;(c.children||[]).filter(function(h){return!d(h.node)}).forEach(function(h){var R=h.key,C=t.has(R);w&&!C&&(w=!1),!_&&(C||l.has(R))&&(_=!0)}),w&&t.add(c.key),_&&l.add(c.key),o.add(c.key)})}return{checkedKeys:Array.from(t),halfCheckedKeys:Array.from(v(l,t))}}function y(S,b,p,d,t){for(var l=new Set(S),r=new Set(b),i=0;i<=d;i+=1){var o=p.get(i)||new Set;o.forEach(function(c){var f=c.key,w=c.node,_=c.children,h=_===void 0?[]:_;!l.has(f)&&!r.has(f)&&!t(w)&&h.filter(function(R){return!t(R.node)}).forEach(function(R){l.delete(R.key)})})}r=new Set;for(var s=new Set,u=d;u>=0;u-=1){var a=p.get(u)||new Set;a.forEach(function(c){var f=c.parent,w=c.node;if(t(w)||!c.parent||s.has(c.parent.key))return;if(t(c.parent.node)){s.add(f.key);return}var _=!0,h=!1;(f.children||[]).filter(function(R){return!t(R.node)}).forEach(function(R){var C=R.key,g=l.has(C);_&&!g&&(_=!1),!h&&(g||r.has(C))&&(h=!0)}),_||l.delete(f.key),h&&r.add(f.key),s.add(f.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function m(S,b,p,d){var t=[],l;d?l=d:l=O;var r=new Set(S.filter(function(u){var a=!!p[u];return a||t.push(u),a})),i=new Map,o=0;Object.keys(p).forEach(function(u){var a=p[u],c=a.level,f=i.get(c);f||(f=new Set,i.set(c,f)),f.add(a),o=Math.max(o,c)}),Object(N.a)(!t.length,"Tree missing follow keys: ".concat(t.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var s;return b===!0?s=M(r,i,o,l):s=y(r,b.halfCheckedKeys,i,o,l),s}},OLod:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("K3mO"))})(this,function(N){N.lib.Cipher||function(v){var O=N,M=O.lib,y=M.Base,m=M.WordArray,S=M.BufferedBlockAlgorithm,b=O.enc,p=b.Utf8,d=b.Base64,t=O.algo,l=t.EvpKDF,r=M.Cipher=S.extend({cfg:y.extend(),createEncryptor:function(E,T){return this.create(this._ENC_XFORM_MODE,E,T)},createDecryptor:function(E,T){return this.create(this._DEC_XFORM_MODE,E,T)},init:function(E,T,k){this.cfg=this.cfg.extend(k),this._xformMode=E,this._key=T,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(T){return typeof T=="string"?x:R}return function(T){return{encrypt:function(k,L,A){return E(L).encrypt(T,k,L,A)},decrypt:function(k,L,A){return E(L).decrypt(T,k,L,A)}}}}()}),i=M.StreamCipher=r.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),o=O.mode={},s=M.BlockCipherMode=y.extend({createEncryptor:function(E,T){return this.Encryptor.create(E,T)},createDecryptor:function(E,T){return this.Decryptor.create(E,T)},init:function(E,T){this._cipher=E,this._iv=T}}),u=o.CBC=function(){var E=s.extend();E.Encryptor=E.extend({processBlock:function(k,L){var A=this._cipher,G=A.blockSize;T.call(this,k,L,G),A.encryptBlock(k,L),this._prevBlock=k.slice(L,L+G)}}),E.Decryptor=E.extend({processBlock:function(k,L){var A=this._cipher,G=A.blockSize,K=k.slice(L,L+G);A.decryptBlock(k,L),T.call(this,k,L,G),this._prevBlock=K}});function T(k,L,A){var G,K=this._iv;K?(G=K,this._iv=v):G=this._prevBlock;for(var W=0;W>>2]&255;E.sigBytes-=T}},f=M.BlockCipher=r.extend({cfg:r.cfg.extend({mode:u,padding:c}),reset:function(){var E;r.reset.call(this);var T=this.cfg,k=T.iv,L=T.mode;this._xformMode==this._ENC_XFORM_MODE?E=L.createEncryptor:(E=L.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,k&&k.words):(this._mode=E.call(L,this,k&&k.words),this._mode.__creator=E)},_doProcessBlock:function(E,T){this._mode.processBlock(E,T)},_doFinalize:function(){var E,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),T.unpad(E)),E},blockSize:128/32}),w=M.CipherParams=y.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),_=O.format={},h=_.OpenSSL={stringify:function(E){var T,k=E.ciphertext,L=E.salt;return L?T=m.create([1398893684,1701076831]).concat(L).concat(k):T=k,T.toString(d)},parse:function(E){var T,k=d.parse(E),L=k.words;return L[0]==1398893684&&L[1]==1701076831&&(T=m.create(L.slice(2,4)),L.splice(0,4),k.sigBytes-=16),w.create({ciphertext:k,salt:T})}},R=M.SerializableCipher=y.extend({cfg:y.extend({format:h}),encrypt:function(E,T,k,L){L=this.cfg.extend(L);var A=E.createEncryptor(k,L),G=A.finalize(T),K=A.cfg;return w.create({ciphertext:G,key:k,iv:K.iv,algorithm:E,mode:K.mode,padding:K.padding,blockSize:E.blockSize,formatter:L.format})},decrypt:function(E,T,k,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=E.createDecryptor(k,L).finalize(T.ciphertext);return A},_parse:function(E,T){return typeof E=="string"?T.parse(E,this):E}}),C=O.kdf={},g=C.OpenSSL={execute:function(E,T,k,L){L||(L=m.random(64/8));var A=l.create({keySize:T+k}).compute(E,L),G=m.create(A.words.slice(T),k*4);return A.sigBytes=T*4,w.create({key:A,iv:G,salt:L})}},x=M.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:g}),encrypt:function(E,T,k,L){L=this.cfg.extend(L);var A=L.kdf.execute(k,E.keySize,E.ivSize);L.iv=A.iv;var G=R.encrypt.call(this,E,T,A.key,L);return G.mixIn(A),G},decrypt:function(E,T,k,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=L.kdf.execute(k,E.keySize,E.ivSize,T.salt);L.iv=A.iv;var G=R.decrypt.call(this,E,T,A.key,L);return G}})}()})},OZM5:function(F,$,j){"use strict";j.d($,"b",function(){return d}),j.d($,"a",function(){return t}),j.d($,"k",function(){return l}),j.d($,"h",function(){return r}),j.d($,"i",function(){return i}),j.d($,"g",function(){return o}),j.d($,"c",function(){return s}),j.d($,"d",function(){return u}),j.d($,"j",function(){return f}),j.d($,"e",function(){return w}),j.d($,"f",function(){return _});var N=j("KQm4"),v=j("U8pU"),O=j("Ff2n"),M=j("cDcd"),y=j.n(M),m=j("Kwbf"),S=j("WaYH"),b=.25,p=2;function d(h,R){var C=h.slice(),g=C.indexOf(R);return g>=0&&C.splice(g,1),C}function t(h,R){var C=h.slice();return C.indexOf(R)===-1&&C.push(R),C}function l(h){return h.split("-")}function r(h,R){return"".concat(h,"-").concat(R)}function i(h){return h&&h.type&&h.type.isTreeNode}function o(h,R){var C=[h],g=R[h];function x(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(T){var k=T.key,L=T.children;C.push(k),x(L)})}return x(g.children),C}function s(h,R){var C=h.clientY,g=R.selectHandle.getBoundingClientRect(),x=g.top,E=g.bottom,T=g.height,k=Math.max(T*b,p);return C<=x+k?-1:C>=E-k?1:0}function u(h,R){if(!h)return;var C=R.multiple;return C?h.slice():h.length?[h[0]]:h}var a=function(R){return R};function c(h,R){if(!h)return[];var C=R||{},g=C.processProps,x=g===void 0?a:g,E=Array.isArray(h)?h:[h];return E.map(function(T){var k=T.children,L=Object(O.a)(T,["children"]),A=c(k,R);return y.a.createElement(S.a,Object.assign({},x(L)),A)})}function f(h){if(!h)return null;var R;if(Array.isArray(h))R={checkedKeys:h,halfCheckedKeys:void 0};else if(Object(v.a)(h)==="object")R={checkedKeys:h.checked||void 0,halfCheckedKeys:h.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function w(h,R){var C=new Set;function g(x){if(C.has(x))return;var E=R[x];if(!E)return;C.add(x);var T=E.parent,k=E.node;if(k.disabled)return;T&&g(T.key)}return(h||[]).forEach(function(x){g(x)}),Object(N.a)(C)}function _(h){var R={};return Object.keys(h).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(R[C]=h[C])}),R}},Ot1p:function(F,$,j){"use strict";var N=j("2qtc"),v=j("kLXV"),O=j("rAM+"),M=j("miYZ"),y=j("tsqr"),m=j("9og8"),S=j("tJVT"),b=j("jrin"),p=j("WmNS"),d=j.n(p),t=j("cDcd"),l=j.n(t),r=j("VrN/"),i=j.n(r),o=j("bdgK"),s=j("p77/"),u=j("Bd2K"),a=j("ELLl"),c=j("19Vz"),f=j("lZu9"),w=j("+NIl"),_=j("kSUc"),h=j("9Bee"),R=function(ke){var Ye=ke.value,nt=Ye===void 0?"":Ye,lt=ke.className,at=ke.showTextOnly,ot=ke.showLines,Ct=ke.style,bt=Ct===void 0?{}:Ct,ft=Object(t.useMemo)(function(){return""},[nt]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},C=j("0Owb"),g=j("dejd"),x=j("C+DQ"),E=j("1vsH"),T=j("m3rI"),k=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function L(ke){var Ye=ke.onActionCallback,nt=ke.title,lt=ke.icon,at=ke.actionName,ot=ke.className,Ct=ot===void 0?"":ot,bt=ke.children;function ft(){Ye(at)}return l.a.createElement("a",{title:nt,className:Ct,onClick:ft},l.a.createElement("i",{className:"md-iconfont ".concat(lt)}),bt)}var A=function(ke){var Ye=ke.watch,nt=ke.showNullButton,lt=ke.onActionCallback,at=ke.fullScreen,ot=ke.insertTemp,Ct=ke.hidetoolBar,bt=ke.uuid,ft=ke.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.G)("_educoder_session"),"&key=").concat(bt,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var jt=[].concat(k,[{title:"".concat(Ye?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ye?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&jt.map(function(Pt,Xt){return l.a.createElement("li",{key:Xt},Pt.actionName?l.a.createElement(L,Object(C.a)({},Pt,{onActionCallback:lt})):l.a.createElement("span",{className:"v-line"}))}),nt?l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ot&&l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ot),onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(L,{icon:"".concat(at?"icon-shrink":"icon-enlarge"),title:at?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},G=j("M8RZ"),K=j("+L6B"),W=j("2/Rp"),z=j("y8nQ"),U=j("Vl3Y"),P=j("5NDa"),H=j("5rEg"),V={labelCol:{span:4},wrapperCol:{span:20}},q=function(ke){var Ye=ke.callback,nt=ke.onCancel;function lt(at){Ye(at)}return l.a.createElement(U.a,Object(C.a)({},V,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(H.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(H.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},Z=j("7ahc"),ce=j("HmJG"),he=j("BjJ7"),ae=U.a.useForm,xe={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}},oe=function(ke){var Ye=ke.callback,nt=ke.onCancel,lt=ae(),at=Object(S.a)(lt,1),ot=at[0];function Ct(jt){Ye(jt)}function bt(jt,Pt){if(jt.status===-1){y.b.error(jt.message);return}ot.setFieldsValue({src:"/api/attachments/".concat(jt.id),type:Pt.type})}function ft(jt){var Pt=jt.target.files[0];te(Pt,bt)}return l.a.createElement(U.a,Object(C.a)({form:ot},ge,{className:"upload-image-panel",onFinish:Ct}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(H.a,{style:xe})),l.a.createElement(se,{onFileChange:ft}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(H.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))};function se(ke){var Ye=ke.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Ye}))}function te(ke,Ye){if(!ke)throw new String("\u6CA1\u6709\u6587\u4EF6");var nt=new FormData;nt.append("editormd-image-file",ke),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(at){Ye(JSON.parse(at.target.responseText),ke)},!1),lt.addEventListener("error",function(at){console.error(at)},!1),lt.open("POST","".concat(he.a,"/api/attachments.json")),lt.send(nt)}var be=j("giR+"),ee=j("fyUT"),ie=j("7Kak"),Ee=j("9yH6"),ne=Ee.a.Group,J={margin:"0 8px"},X=function(ke){var Ye=ke.callback,nt=ke.onCancel;function lt(at){Ye(at)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:J},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:J},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ee.a,null)),l.a.createElement("span",{style:J},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ee.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:J},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(ne,null,l.a.createElement(Ee.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Ee.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Ee.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Ee.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},Q=j("ErOA"),me=j("7Cbv"),fe="link",Te="upload-image",ze="code-block",Je="add-table",qe="------------",Xe={default:qe,left:":".concat(qe),center:":".concat(qe,":"),right:"".concat(qe,":")},et=j("9VGf"),rt,Le;function Oe(){}var Ve=0,Ze=1e4,Ne="\u2581",Ge=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function De(ke){return/^\d+$/.test(ke)?"".concat(ke,"px"):ke}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ae=we?"Cmd":"Ctrl",de=["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"],_e=(rt={},Object(b.a)(rt,Ae+"-B","bold"),Object(b.a)(rt,Ae+"-I","italic"),rt),Se=(Le={},Object(b.a)(Le,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Le,ze,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Le,Te,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Le,Je,"\u6DFB\u52A0\u8868\u683C"),Le),Ie=$.a=function(ke){var Ye=ke.defaultValue,nt=Ye===void 0?"":Ye,lt=ke.onChange,at=ke.width,ot=at===void 0?"100%":at,Ct=ke.height,bt=Ct===void 0?400:Ct,ft=ke.miniToolbar,jt=ft===void 0?!1:ft,Pt=ke.isFocus,Xt=Pt===void 0?!1:Pt,Qt=ke.watch,kt=ke.insertTemp,Et=ke.mode,Vt=Et===void 0?"markdown":Et,pt=ke.id,dt=pt===void 0?"markdown-editor-id":pt,At=ke.showResizeBar,Mt=At===void 0?!1:At,rr=ke.noStorage,Fn=rr===void 0?!1:rr,yt=ke.showNullButton,St=yt===void 0?!1:yt,vt=ke.hidetoolBar,yr=vt===void 0?!1:vt,Tr=ke.fullScreen,Bt=Tr===void 0?!1:Tr,Rt=ke.onBlur,br=ke.onCMBeforeChange,$r=ke.onFullScreen,Cr=ke.className,ut=Cr===void 0?"":Cr,It=ke.disablePaste,Br=It===void 0?!1:It,Vr=ke.placeholder,An=Vr===void 0?"":Vr,fn=ke.values,zr=fn===void 0?"":fn,Dt=Object(t.useState)(null),dn=Object(S.a)(Dt,2),ct=dn[0],kr=dn[1],mr=Object(t.useState)(nt),ei=Object(S.a)(mr,2),Tn=ei[0],bn=ei[1],di=Object(t.useState)(Qt),ti=Object(S.a)(di,2),sn=ti[0],Hr=ti[1],fi=Object(t.useState)(Bt),hn=Object(S.a)(fi,2),Wr=hn[0],lr=hn[1],nn=Object(t.useState)(""),qt=Object(S.a)(nn,2),Kt=qt[0],er=qt[1],Sr=Object(t.useState)(0),jr=Object(S.a)(Sr,2),Gr=jr[0],_n=jr[1],la=Object(t.useState)(bt),Yi=Object(S.a)(la,2),$i=Yi[0],Oi=Yi[1],pn=Object(t.useState)(!1),Ki=Object(S.a)(pn,2),Zr=Ki[0],ri=Ki[1],Mn=Object(t.useRef)(Object(me.a)()),ln=Object(t.useRef)(!1),Sn=Object(t.useRef)(),hi=Object(t.useRef)(),Kn=Object(t.useRef)(),zn=Object(t.useRef)(),Li=Object(t.useRef)(),Mi=function(){var Nt=Object(m.a)(d.a.mark(function Yt(){var Ut,nr;return d.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(Q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Mn.current}});case 2:nr=Rr.sent,nr!=null&&(Ut=nr.attachments)!==null&&Ut!==void 0&&Ut.length&&(console.log("cm:",ct,hi),nr.attachments.map(function(dr){dr.content_type.indexOf("image")>-1?ct.replaceSelection("![,](/api/attachments/".concat(dr.id,"?type=").concat(dr.content_type,")")):dr.content_type.indexOf("video")>-1?ct.replaceSelection('')):dr.content_type.indexOf("pdf")>-1?ct.replaceSelection('
    ').concat(dr.name,"")):ct.replaceSelection("[".concat(dr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}));case 4:case"end":return Rr.stop()}},Yt)}));return function(){return Nt.apply(this,arguments)}}();Object(t.useEffect)(function(){bn(zr),ct==null||ct.setValue(zr)},[zr]),Object(t.useEffect)(function(){$r==null||$r(Wr)},[Wr]),Object(t.useEffect)(function(){if(hi.current){var Nt=i.a.fromTextArea(hi.current,{mode:Vt,lineNumbers:!jt,lineWrapping:!0,value:nt,autoCloseTags:!0,autoCloseBrackets:!0});Xt&&Nt.focus();function Yt(Ut,nr){if(Br){nr.preventDefault();return}var gr=nr.clipboardData;if(gr){var Rr=gr.types.toString(),dr=gr.items;if(Rr==="Files"||gr.types.indexOf("Files")>-1){if(nr.preventDefault(),Vt=="stex")return;try{var qr,Un=dr[1];((qr=dr[0])===null||qr===void 0?void 0:qr.kind)==="file"&&(Un=dr[0]);var sr=Un.getAsFile(),vi=sr.name.split(".").pop();te(sr,function(Ir){if(Ir.id){var On,Rn,li;(sr==null||((On=sr.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Nt.replaceSelection("![,](/api/attachments/".concat(Ir.id,"?type=").concat(Ir.content_type,")")):(sr==null||((Rn=sr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Nt.replaceSelection('')):(sr==null||((li=sr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Nt.replaceSelection('').concat(sr.name,"")):de.includes(vi)?Nt.replaceSelection('').concat(sr.name,"")):Nt.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})}catch(Ir){y.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Nt.on("paste",Yt),Nt.on("dragleave",function(Ut,nr){Kn.current.classList.remove("mouse-hover-md")}),Nt.on("dragover",function(Ut,nr){Kn.current.classList.add("mouse-hover-md")}),Nt.on("drop",function(Ut,nr){Kn.current.classList.add("mouse-hover-md");var gr;if(gr=nr.dataTransfer.files,gr.length>0){nr.preventDefault(),nr.stopPropagation();for(var Rr=function(Un){var sr=gr[Un],vi=sr.name.split(".").pop();te(sr,function(Ir){if(Ir.id){var On,Rn,li;(sr==null||((On=sr.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Nt.replaceSelection("![,](/api/attachments/".concat(Ir.id,"?type=").concat(Ir.content_type,")")):(sr==null||((Rn=sr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Nt.replaceSelection('')):(sr==null||((li=sr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Nt.replaceSelection('').concat(sr.name,"")):de.includes(vi)?Nt.replaceSelection('').concat(sr.name,"")):Nt.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})},dr=0;dr0||dr.target.offsetWidth>0)&&(Gn(),ct.setSize("100%","100%"),ct.refresh())}}catch(qr){gr.e(qr)}finally{gr.f()}});return Ut.observe(hi.current.parentElement),Ut}if(ct){var Yt=Nt();return function(){Yt.unobserve(hi.current.parentElement)}}},[ct,Gn]),Object(t.useEffect)(function(){if(ct){for(var Nt=[],Yt=function(){var dr=nr[Ut];gr=Object(S.a)(dr,2);var qr=gr[0],Un=gr[1],sr=Object(b.a)({},qr,function(){Ni(Un)});Nt.push(sr),ct.addKeyMap(sr)},Ut=0,nr=Object.entries(_e);Ut0){var Nt=new Date().getTime(),Yt=window.sessionStorage.getItem(dt);Nt>=Gr+Ze&&(!Yt||Yt!==Tn)&&(window.sessionStorage.setItem(dt,Tn),ri(!0))}},Ze),Object(t.useEffect)(function(){Hr(Qt)},[ct,Qt]),Object(t.useEffect)(function(){ct&&(Xt&&ct.focus())},[ct,Xt]),Object(t.useEffect)(function(){if(sn&&ct){var Nt=ct.getScrollerElement();function Yt(Ut){var nr=Ut.target;if(Li.current){var gr=nr.scrollTop/nr.scrollHeight;Li.current.scrollTop=Li.current.scrollHeight*gr}}return Nt.addEventListener("scroll",Yt),function(){Nt.removeEventListener("scroll",Yt)}}},[ct,sn]),Object(t.useEffect)(function(){if(ct&&br){function Nt(Yt,Ut){br(Yt,Ut)}return ct.on("beforeChange",Nt),function(){ct.off("beforeChange",Nt)}}},[ct,br]),Object(t.useEffect)(function(){if(ct&&Rt){function Nt(){Rt(ct.getValue())}return ct.on("blur",Nt),function(){ct.off("blur",Nt)}}},[ct,Rt]),Object(t.useEffect)(function(){if(ct){function Nt(Yt){var Ut=Yt.getValue();bn(Ut),_n(new Date().getTime()),Yt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(Ut)}return ct.on("change",Nt),function(){ct.off("change",Nt)}}},[ct,lt]),Object(t.useEffect)(function(){ct&&(nt==null?(ct.setValue(""),bn("")):nt!==ct.getValue()&&(ct.setValue(nt),bn(nt),ct.setCursor(ct.lineCount(),0)))},[ct,nt]);var Ni=Object(t.useCallback)(function(Nt){var Yt=ct.getCursor(),Ut=ct.getSelection(),nr=Ut.split(` `);switch(Nt){case"bold":return ct.replaceSelection("**"+Ut+"**"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+Ut+"*"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+Ut+"`"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+Ut+"$$`"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+Ut+"\n```"),ct.setCursor(Yt.line+1,Ut.length+1),ct.focus();case"line-break":return ct.replaceSelection(`
    `),ct.focus();case"list-ul":return Ut===""?ct.replaceSelection("- "+Ut):ct.replaceSelection(nr.map(function(gr){return gr===""?"":"- ".concat(gr)}).join(` `)),ct.focus();case"list-ol":return Ut===""?ct.replaceSelection("1. "+Ut):ct.replaceSelection(nr.map(function(gr,Rr){return gr===""?"":"".concat(Rr+1,". ").concat(gr)}).join(` `)),ct.focus();case"add-null-ch":return Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.replaceSelection(Ne),ct.focus();case"inster-template-1":return Ut===""&&ct.setCursor(Yt.line,Yt.ch),ct.replaceSelection(Ge),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Hr(!sn),ct.focus();case"trigger-full-screen":return lr(!Wr),ct.focus();case fe:er(fe);return;case ze:er(ze);return;case Te:er(Te);return;case Je:er(Je);return;default:throw new Error}},[ct,sn,Wr]),pi=Object(t.useCallback)(function(Nt){er("");switch(Kt){case fe:var Yt=Nt.title,Ut=Nt.link;return ct.replaceSelection("[".concat(Yt,"](").concat(Ut,")")),ct.focus();case ze:var nr=Nt.language,gr=Nt.content;return ct.replaceSelection(["```"+nr,gr,"```"].join(` `)),ct.focus();case Te:var Rr=Nt.src,dr=Nt.alt;return dr?ct.replaceSelection("![ ".concat(dr," ]( ").concat(Rr,' "').concat(dr,'" )')):ct.replaceSelection("![,](".concat(Rr,")")),ct.focus();case Je:for(var qr=Nt.row,Un=Nt.col,sr=Nt.align,vi=` `,Ir=0;Ir300&&(qr=300);var Un=bt+qr+"px";Oi(Un)}}return Nt.addEventListener("mousedown",nr),document.addEventListener("mousemove",Rr),document.addEventListener("mouseup",gr),function(){Nt.removeEventListener("mousedown",nr),document.removeEventListener("mousemove",Rr),document.removeEventListener("mouseup",gr)}}},[ct,zn]),Object(t.useEffect)(function(){Oi(bt)},[bt]);var Vn=De(ot),ki=De($i),ni={width:Vn,height:ki},gi=Object(t.useMemo)(function(){if(Gr){var Nt=new Date(Gr),Yt=Nt.getHours(),Ut=Nt.getMinutes(),nr=Nt.getSeconds();return Yt=Yt<10?"0"+Yt:Yt,Ut=Ut<10?"0"+Ut:Ut,nr=nr<10?"0"+nr:nr,"".concat(Yt,":").concat(Ut,":").concat(nr)}return 0},[Gr]);function ji(){window.sessionStorage.removeItem(dt),ri(!1),_n(0)}function ii(){ri(!1),_n(0),ct.setValue(window.sessionStorage.getItem(dt))}function Pr(Nt,Yt){var Ut=ct.getValue();Ut=Ut.replace(Nt,Yt),bn(Ut),ct==null||ct.setValue(Ut)}return l.a.createElement(t.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:Kn},l.a.createElement("div",{className:"markdown-editor-container ".concat(ut," ").concat(sn?"on-preview":""," ").concat(jt?"mini":""," ").concat(Wr?"full-screen":""),style:ni},l.a.createElement(A,{insertTemp:kt,watch:sn,fullScreen:Wr,showNullButton:St,onActionCallback:Ni,hidetoolBar:yr,uuid:Mn.current,setOpenPhones:function(){ln.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:hi,placeholder:An})),sn?l.a.createElement("div",{ref:Li,className:"preview-container"},Vt==="stex"&&l.a.createElement(R,{value:Tn}),Vt!=="stex"&&l.a.createElement(h.a,{edit:!0,value:Tn,replaces:Pr})):null))),Mt?l.a.createElement("a",{ref:zn,className:"editor-resize"}):null,l.a.createElement(G.a,null,Se[Kt]?l.a.createElement(v.a,{centered:!0,title:Se[Kt],visible:!0,onCancel:Xn,footer:null,className:"markdown-popup-form"},mi):null))}},PD8m:function(F,$){F.exports={name:"memoryStorage",read:N,write:v,each:O,remove:M,clearAll:y};var j={};function N(m){return j[m]}function v(m,S){j[m]=S}function O(m){for(var S in j)j.hasOwnProperty(S)&&m(j[S],S)}function M(m){delete j[m]}function y(m){j={}}},PVpz:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.RabbitLegacy=M.extend({_doReset:function(){var t=this._key.words,l=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)i[o]^=r[o+4&7];if(l){var s=l.words,u=s[0],a=s[1],c=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=c>>>16|f&4294901760,_=f<<16|c&65535;i[0]^=c,i[1]^=w,i[2]^=f,i[3]^=_,i[4]^=c,i[5]^=w,i[6]^=f,i[7]^=_;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,u=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=u^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.RabbitLegacy=M._createHelper(p)}(),N.RabbitLegacy})},RELg:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldIE-userDataStorage",write:S,read:b,each:p,remove:d,clearAll:t};var O="storejs",M=v.document,y=i(),m=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(o,s){if(m)return;var u=r(o);y(function(a){a.setAttribute(u,s),a.save(O)})}function b(o){if(m)return;var s=r(o),u=null;return y(function(a){u=a.getAttribute(s)}),u}function p(o){y(function(s){for(var u=s.XMLDocument.documentElement.attributes,a=u.length-1;a>=0;a--){var c=u[a];o(s.getAttribute(c.name),c.name)}})}function d(o){var s=r(o);y(function(u){u.removeAttribute(s),u.save(O)})}function t(){y(function(o){var s=o.XMLDocument.documentElement.attributes;o.load(O);for(var u=s.length-1;u>=0;u--)o.removeAttribute(s[u].name);o.save(O)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(o){return o.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!M||!M.documentElement||!M.documentElement.addBehavior)return null;var o="script",s,u,a;try{u=new ActiveXObject("htmlfile"),u.open(),u.write("<"+o+">document.w=window'),u.close(),s=u.w.frames[0].document,a=s.createElement("div")}catch(c){a=M.createElement("div"),s=M.body}return function(c){var f=[].slice.call(arguments,0);f.unshift(a),s.appendChild(a),a.addBehavior("#default#userData"),a.load(O),c.apply(this,f),s.removeChild(a);return}}},S6kV:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.OFB=function(){var v=N.lib.BlockCipherMode.extend(),O=v.Encryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._keystream;b&&(p=this._keystream=b.slice(0),this._iv=void 0),m.encryptBlock(p,0);for(var d=0;d|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ne){for(var J=0,X=!1,Q=!1,me=0,fe=ne.length;me122||(de<65||Ae>90||Ve.push([Math.max(65,Ae)|32,Math.min(de,90)|32]),de<97||Ae>122||Ve.push([Math.max(97,Ae)&~32,Math.min(de,122)&~32]))}}Ve.sort(function(ke,Ye){return ke[0]-Ye[0]||Ye[1]-ke[1]});for(var _e=[],Se=[],Ge=0;GeIe[0]&&(Ie[1]+1>Ie[0]&&Ne.push("-"),Ne.push(qe(Ie[1])))}return Ne.push("]"),Ne.join("")}function et(Le){for(var Oe=Le.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")),Ve=Oe.length,Ze=[],Ne=0,Ge=0;Ne=2&&Ae==="["?Oe[Ne]=Xe(De):Ae!=="\\"&&(Oe[Ne]=De.replace(/[a-zA-Z]/g,function(Se){var Ie=Se.charCodeAt(0);return"["+String.fromCharCode(Ie&~32,Ie|32)+"]"}))}return Oe.join("")}for(var rt=[],me=0,fe=ne.length;me=0;)X[rt.charAt(Le)]=et;var Oe=et[1],Ve=""+Oe;Je.hasOwnProperty(Ve)||(ze.push(Oe),Je[Ve]=null)}ze.push(/[\0-\uffff]/),Q=U(ze)})();var me=J.length,fe=function(Te){for(var ze=Te.sourceCode,Je=Te.basePos,qe=Te.sourceNode,Xe=[Je,T],et=0,rt=ze.match(Q)||[],Le={},Oe=0,Ve=rt.length;Oe=5&&Ne.substring(0,5)==="lang-",De&&!(Ge&&typeof Ge[1]=="string")&&(De=!1,Ne=A),De||(Le[Ze]=Ne)}var de=et;if(et+=Ze.length,!De)Xe.push(Je+de,Ne);else{var _e=Ge[1],Se=Ze.indexOf(_e),Ie=Se+_e.length;Ge[2]&&(Ie=Ze.length-Ge[2].length,Se=Ie-_e.length);var ke=Ne.substring(5);H(qe,Je+de,Ze.substring(0,Se),fe,Xe),H(qe,Je+de+Se,_e,se(ke,_e),Xe),H(qe,Je+de+Ie,Ze.substring(Ie),fe,Xe)}}Te.decorations=Xe};return fe}function ce(ne){var J=[],X=[];ne.tripleQuotedStrings?J.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?J.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&X.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ne.hashComments;Q&&(ne.cStyleComments?(Q>1?J.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([C,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(X.push([C,/^\/\/[^\r\n]*/,null]),X.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=ne.regexLiterals;if(me){var fe=me>1?"":` \r`,Te=fe?".":"[\\S\\s]",ze="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+ze+")")])}var Je=ne.types;Je&&X.push([g,Je]);var qe=(""+ne.keywords).replace(/^ | $/g,"");qe.length&&X.push([R,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([T,/^\s+/,null,` \r \xA0`]);var Xe="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(Xe+="(?!s*/)"),X.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[E,new RegExp(Xe),null]),Z(J,X)}var he=ce({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ae(ne,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,fe=ne.ownerDocument,Te=fe.createElement("li");ne.firstChild;)Te.appendChild(ne.firstChild);var ze=[Te];function Je(Oe){var Ve=Oe.nodeType;if(Ve==1&&!Q.test(Oe.className))if(Oe.nodeName==="br")qe(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var Ze=Oe.firstChild;Ze;Ze=Ze.nextSibling)Je(Ze);else if((Ve==3||Ve==4)&&X){var Ne=Oe.nodeValue,Ge=Ne.match(me);if(Ge){var De=Ne.substring(0,Ge.index);Oe.nodeValue=De;var we=Ne.substring(Ge.index+Ge[0].length);if(we){var Ae=Oe.parentNode;Ae.insertBefore(fe.createTextNode(we),Oe.nextSibling)}qe(Oe),De||Oe.parentNode.removeChild(Oe)}}}function qe(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function Ve(Ge,De){var we=De?Ge.cloneNode(!1):Ge,Ae=Ge.parentNode;if(Ae){var de=Ve(Ae,1),_e=Ge.nextSibling;de.appendChild(we);for(var Se=_e;Se;Se=_e)_e=Se.nextSibling,de.appendChild(Se)}return we}for(var Ze=Ve(Oe.nextSibling,0),Ne;(Ne=Ze.parentNode)&&Ne.nodeType===1;)Ze=Ne;ze.push(Ze)}for(var Xe=0;Xe=Ae&&(Je+=2),fe>=de&&(et+=2)}}finally{Ne&&(Ne.style.display=Ge)}}var ge={};function oe(ne,J){for(var X=J.length;--X>=0;){var Q=J[X];ge.hasOwnProperty(Q)?b.console&&console.warn("cannot override language handler %s",Q):ge[Q]=ne}}function se(ne,J){return ne&&ge.hasOwnProperty(ne)||(ne=/^\s*]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),oe(Z([[T,/^[\s]+/,null,` \r `],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["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"]),oe(Z([],[[K,/^[\s\S]+/]]),["uq.val"]),oe(ce({keywords:l,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),oe(ce({keywords:"null,true,false"}),["json"]),oe(ce({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),oe(ce({keywords:r,cStyleComments:!0}),["java"]),oe(ce({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),oe(ce({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),oe(ce({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),oe(ce({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),oe(ce({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),oe(ce({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),oe(Z([],[[h,/^[\s\S]+/]]),["regex"]);function te(ne){var J=ne.langExtension;try{var X=P(ne.sourceNode,ne.pre),Q=X.sourceCode;ne.sourceCode=Q,ne.spans=X.spans,ne.basePos=0,se(J,Q)(ne),xe(ne)}catch(me){b.console&&console.log(me&&me.stack||me)}}function be(ne,J,X){var Q=X||!1,me=J||null,fe=document.createElement("div");fe.innerHTML="
    "+ne+"
    ",fe=fe.firstChild,Q&&ae(fe,Q,!0);var Te={langExtension:me,numberLines:Q,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(Te),fe.innerHTML}function ee(ne,J){var X=J||document.body,Q=X.ownerDocument||document;function me(we){return X.getElementsByTagName(we)}for(var fe=[me("pre"),me("code"),me("xmp")],Te=[],ze=0;ze=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(` `);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===` `&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(` `);return r!==` `&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},,,,function(p){function d(r,i){this.raw_options=t(r,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,i){var o=this.raw_options[r],s=i||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(s=o.concat()):typeof o=="string"&&(s=o.split(/[^a-zA-Z0-9_\/\-]+/)),s},d.prototype._get_boolean=function(r,i){var o=this.raw_options[r],s=o===void 0?!!i:!!o;return s},d.prototype._get_characters=function(r,i){var o=this.raw_options[r],s=i||"";return typeof o=="string"&&(s=o.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),s},d.prototype._get_number=function(r,i){var o=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var s=parseInt(o,10);return isNaN(s)&&(s=i),s},d.prototype._get_selection=function(r,i,o){var s=this._get_selection_list(r,i,o);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values: `+i+` You passed in: '`+this.raw_options[r]+"'");return s[0]},d.prototype._get_selection_list=function(r,i,o){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[i[0]],!this._is_valid_selection(o,i))throw new Error("Invalid Default Value!");var s=this._get_array(r,o);if(!this._is_valid_selection(s,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values: `+i+` You passed in: '`+this.raw_options[r]+"'");return s},d.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(o){return i.indexOf(o)===-1})};function t(r,i){var o={};r=l(r);var s;for(s in r)s!==i&&(o[s]=r[s]);if(i&&r[i])for(s in r[i])o[s]=r[i][s];return o}function l(r){var i={},o;for(o in r){var s=o.replace(/-/g,"_");i[s]=r[o]}return i}p.exports.Options=d,p.exports.normalizeOpts=l,p.exports.mergeOpts=t},,function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position=0&&l=0&&r=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},,,,,function(p){function d(t,l){t=typeof t=="string"?t:t.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+l,"g")}d.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(t);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(t);return l},d.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},,function(p,d,t){var l=t(16).Beautifier,r=t(17).Options;function i(o,s){var u=new l(o,s);return u.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(17).Options,r=t(2).Output,i=t(8).InputScanner,o=t(13).Directives,s=new o(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,c=/\s/,f=/(?:\s|\n)+/g,w=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function h(R,C){this._source_text=R||"",this._options=new l(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}h.prototype.eatString=function(R){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return C},h.prototype.eatWhitespace=function(R){for(var C=c.test(this._input.peek()),g=0;c.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===` `&&((g===0||g0&&this._indentLevel--},h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,C=this._options.eol;C==="auto"&&(C=` `,R&&u.test(R||"")&&(C=R.match(u)[0])),R=R.replace(a,` `);var g=R.match(/^[\t ]*/)[0];this._output=new r(this._options,g),this._input=new i(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,E=!1,T=!1,k=!1,L=!1,A=!1,G=!1,K=this._ch,W=!1,z,U,P;z=this._input.read(f),U=z!=="",P=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(w),V=s.get_directives(H);V&&V.ignore==="start"&&(H+=s.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s$/,""),this.print_string(q),this._output.space_before_token=!0),q=q.replace(/\s$/,""),q==="extend"?L=!0:q==="import"&&(A=!0),q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(k=!0)):!E&&x===0&&q.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),k?(k=!1,E=this._indentLevel>=this._nestedLevel):E=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&E&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),P==="{"&&this._output.trim(!0),A=!1,L=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),E=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Z=0;Z"||this._ch==="+"||this._ch==="~")&&!T&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ae=P==='"'||P==="'";this.preserveSingleSpace(ae||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&W&&this._output.add_new_line()}var xe=this._output.get_code(C);return xe},p.exports.Beautifier=h},function(p,d,t){var l=t(6).Options;function r(i){l.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u=15&&(l=!1,p=!0);var h=c&&(d||l&&(_==null||_<12.11)),R=O||S&&b>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,n){var D=e.className,I=C(n).exec(D);if(I){var B=D.slice(I.index+I[0].length);e.className=D.slice(0,I.index)+(B?I[1]+B:"")}};function x(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function E(e,n){return x(e).appendChild(n)}function T(e,n,D,I){var B=document.createElement(e);if(D&&(B.className=D),I&&(B.style.cssText=I),typeof n=="string")B.appendChild(document.createTextNode(n));else if(n)for(var Y=0;Y=n)return re+(n-Y);re+=le-Y,re+=D-re%D,Y=le+1}}var V=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,n){this.f=n;var D=+new Date+e;(!this.id||D=n)return I+Math.min(re,n-B);if(B+=Y-I,B+=D-B%D,I=Y+1,B>=n)return I}}var oe=[""];function se(e){for(;oe.length<=e;)oe.push(te(oe)+" ");return oe[e]}function te(e){return e[e.length-1]}function be(e,n){for(var D=[],I=0;I"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function X(e,n){return n?n.source.indexOf("\\w")>-1&&J(e)?!0:n.test(e):J(e)}function Q(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var me=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function fe(e){return e.charCodeAt(0)>=768&&me.test(e)}function Te(e,n,D){for(;(D<0?n>0:nD?-1:1;;){if(n==D)return n;var B=(n+D)/2,Y=I<0?Math.ceil(B):Math.floor(B);if(Y==n)return e(Y)?n:D;e(Y)?D=Y:n=Y+I}}function Je(e,n,D,I){if(!e)return I(n,D,"ltr",0);for(var B=!1,Y=0;Yn||n==D&&re.to==n)&&(I(Math.max(re.from,n),Math.min(re.to,D),re.level==1?"rtl":"ltr",Y),B=!0)}B||I(n,D,"ltr")}var qe=null;function Xe(e,n,D){var I;qe=null;for(var B=0;Bn)return B;Y.to==n&&(Y.from!=Y.to&&D=="before"?I=B:qe=B),Y.from==n&&(Y.from!=Y.to&&D!="before"?I=B:qe=B)}return I!=null?I:qe}var et=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?n.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,B=/[stwN]/,Y=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ve,je,Ue){this.level=ve,this.from=je,this.to=Ue}return function(ve,je){var Ue=je=="ltr"?"L":"R";if(ve.length==0||je=="ltr"&&!I.test(ve))return!1;for(var tt=ve.length,Qe=[],st=0;st-1&&(I[n]=B.slice(0,Y).concat(B.slice(Y+1)))}}}function Ne(e,n){var D=Ve(e,n);if(!D.length)return;for(var I=Array.prototype.slice.call(arguments,2),B=0;B0}function Ae(e){e.prototype.on=function(n,D){Oe(this,n,D)},e.prototype.off=function(n,D){Ze(this,n,D)}}function de(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ie(e){de(e),_e(e)}function ke(e){return e.target||e.srcElement}function Ye(e){var n=e.which;return n==null&&(e.button&1?n=1:e.button&2?n=3:e.button&4&&(n=2)),c&&e.ctrlKey&&n==1&&(n=3),n}var nt=function(){if(S&&b<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),lt;function at(e){if(lt==null){var n=T("span","\u200B");E(e,T("span",[n,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(lt=n.offsetWidth<=1&&n.offsetHeight>2&&!(S&&b<8))}var D=lt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var ot;function Ct(e){if(ot!=null)return ot;var n=E(e,document.createTextNode("A\u062EA")),D=L(n,0,1).getBoundingClientRect(),I=L(n,1,2).getBoundingClientRect();return x(e),!D||D.left==D.right?!1:ot=I.right-D.right<3}var bt=` b`.split(/\n/).length!=3?function(e){for(var n=0,D=[],I=e.length;n<=I;){var B=e.indexOf(` `,n);B==-1&&(B=e.length);var Y=e.slice(n,e.charAt(B-1)=="\r"?B-1:B),re=Y.indexOf("\r");re!=-1?(D.push(Y.slice(0,re)),n+=re+1):(D.push(Y),n=B+1)}return D}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(n){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(D){}return!n||n.parentElement()!=e?!1:n.compareEndPoints("StartToEnd",n)!=0},jt=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Pt=null;function Xt(e){if(Pt!=null)return Pt;var n=E(e,T("span","x")),D=n.getBoundingClientRect(),I=L(n,0,1).getBoundingClientRect();return Pt=Math.abs(D.left-I.left)>1}var Qt={},kt={};function Et(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qt[e]=n}function Vt(e,n){kt[e]=n}function pt(e){if(typeof e=="string"&&kt.hasOwnProperty(e))e=kt[e];else if(e&&typeof e.name=="string"&&kt.hasOwnProperty(e.name)){var n=kt[e.name];typeof n=="string"&&(n={name:n}),e=Ee(n,e),e.name=n.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return pt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return pt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function dt(e,n){n=pt(n);var D=Qt[n.name];if(!D)return dt(e,"text/plain");var I=D(e,n);if(At.hasOwnProperty(n.name)){var B=At[n.name];for(var Y in B){if(!B.hasOwnProperty(Y))continue;I.hasOwnProperty(Y)&&(I["_"+Y]=I[Y]),I[Y]=B[Y]}}if(I.name=n.name,n.helperType&&(I.helperType=n.helperType),n.modeProps)for(var re in n.modeProps)I[re]=n.modeProps[re];return I}var At={};function Mt(e,n){var D=At.hasOwnProperty(e)?At[e]:At[e]={};P(n,D)}function rr(e,n){if(n===!0)return n;if(e.copyState)return e.copyState(n);var D={};for(var I in n){var B=n[I];B instanceof Array&&(B=B.concat([])),D[I]=B}return D}function Fn(e,n){for(var D;e.innerMode&&!(D=e.innerMode(n),!D||D.mode==e);)n=D.state,e=D.mode;return D||{mode:e,state:n}}function yt(e,n,D){return e.startState?e.startState(n,D):!0}var St=function(e,n,D){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};St.prototype.eol=function(){return this.pos>=this.string.length},St.prototype.sol=function(){return this.pos==this.lineStart},St.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},St.prototype.next=function(){if(this.posn},St.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},St.prototype.skipToEnd=function(){this.pos=this.string.length},St.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},St.prototype.backUp=function(e){this.pos-=e},St.prototype.column=function(){return this.lastColumnPos0?null:(Y&&n!==!1&&(this.pos+=Y[0].length),Y)}},St.prototype.current=function(){return this.string.slice(this.start,this.pos)},St.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},St.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},St.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function vt(e,n){if(n-=e.first,n<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var D=e;!D.lines;)for(var I=0;;++I){var B=D.children[I],Y=B.chunkSize();if(n=e.first&&nD?ut(D,vt(e,D).text.length):dn(n,vt(e,n.line).text.length)}function dn(e,n){var D=e.ch;return D==null||D>n?ut(e.line,n):D<0?ut(e.line,0):e}function ct(e,n){for(var D=[],I=0;Ithis.maxLookAhead&&(this.maxLookAhead=e),n},mr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mr.fromSaved=function(e,n,D){return n instanceof kr?new mr(e,rr(e.mode,n.state),D,n.lookAhead):new mr(e,rr(e.mode,n),D)},mr.prototype.save=function(e){var n=e!==!1?rr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kr(n,this.maxLookAhead):n};function ei(e,n,D,I){var B=[e.state.modeGen],Y={};Wr(e,n.text,e.doc.mode,D,function(ve,je){return B.push(ve,je)},Y,I);for(var re=D.state,le=function(ve){D.baseTokens=B;var je=e.state.overlays[ve],Ue=1,tt=0;D.state=!0,Wr(e,n.text,je.mode,D,function(Qe,st){for(var ht=Ue;ttQe&&B.splice(Ue,1,Qe,B[Ue+1],_t),Ue+=2,tt=Math.min(Qe,_t)}if(!st)return;if(je.opaque)B.splice(ht,Ue-ht,Qe,"overlay "+st),Ue=ht+2;else for(;hte.options.maxHighlightLength&&rr(e.doc.mode,I.state),Y=ei(e,n,I);B&&(I.state=B),n.stateAfter=I.save(!B),n.styles=Y.styles,Y.classes?n.styleClasses=Y.classes:n.styleClasses&&(n.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function bn(e,n,D){var I=e.doc,B=e.display;if(!I.mode.startState)return new mr(I,!0,n);var Y=lr(e,n,D),re=Y>I.first&&vt(I,Y-1).stateAfter,le=re?mr.fromSaved(I,re,Y):new mr(I,yt(I.mode),Y);return I.iter(Y,n,function(ue){di(e,ue.text,le);var ve=le.line;ue.stateAfter=ve==n-1||ve%5==0||ve>=B.viewFrom&&ven.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var Hr=function(e,n,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=D};function fi(e,n,D,I){var B=e.doc,Y=B.mode,re;n=Dt(B,n);var le=vt(B,n.line),ue=bn(e,n.line,D),ve=new St(le.text,e.options.tabSize,ue),je;for(I&&(je=[]);(I||ve.pose.options.maxHighlightLength?(le=!1,re&&di(e,n,I,je.pos),je.pos=n.length,Ue=null):Ue=hn(sn(D,je,I.state,tt),Y),tt){var Qe=tt[0].name;Qe&&(Ue="m-"+(Ue?Qe+" "+Ue:Qe))}if(!le||ve!=Ue){for(;uere;--le){if(le<=Y.first)return Y.first;var ue=vt(Y,le-1),ve=ue.stateAfter;if(ve&&(!D||le+(ve instanceof kr?ve.lookAhead:0)<=Y.modeFrontier))return le;var je=H(ue.text,null,e.options.tabSize);(B==null||I>je)&&(B=le-1,I=je)}return B}function nn(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),e.highlightFrontierD;I--){var B=vt(e,I).stateAfter;if(B&&(!(B instanceof kr)||I+B.lookAhead=n:Y.to>n);(I||(I=[])).push(new jr(re,Y.from,ue?null:Y.to))}}return I}function $i(e,n,D){var I;if(e)for(var B=0;B=n:Y.to>n);if(le||Y.from==n&&re.type=="bookmark"&&(!D||Y.marker.insertLeft)){var ue=Y.from==null||(re.inclusiveLeft?Y.from<=n:Y.from0&&le)for(var Ft=0;Ft0)continue;var je=[ue,1],Ue=It(ve.from,le.from),tt=It(ve.to,le.to);(Ue<0||!re.inclusiveLeft&&!Ue)&&je.push({from:ve.from,to:le.from}),(tt>0||!re.inclusiveRight&&!tt)&&je.push({from:le.to,to:ve.to}),B.splice.apply(B,je),ue+=je.length-3}return B}function Zr(e){var n=e.markedSpans;if(!n)return;for(var D=0;Dn)&&(!I||Sn(I,Y.marker)<0)&&(I=Y.marker)}return I}function Mi(e,n,D,I,B){var Y=vt(e,n),re=Kt&&Y.markedSpans;if(re)for(var le=0;le=0&&Ue<=0||je<=0&&Ue>=0)continue;if(je<=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?It(ve.to,D)>=0:It(ve.to,D)>0)||je>=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?It(ve.from,I)<=0:It(ve.from,I)<0))return!0}}function Gn(e){for(var n;n=Kn(e);)e=n.find(-1,!0).line;return e}function Ni(e){for(var n;n=zn(e);)e=n.find(1,!0).line;return e}function pi(e){for(var n,D;n=zn(e);)e=n.find(1,!0).line,(D||(D=[])).push(e);return D}function mi(e,n){var D=vt(e,n),I=Gn(D);return D==I?n:Rt(I)}function Xn(e,n){if(n>e.lastLine())return n;var D=vt(e,n),I;if(!Vn(e,D))return n;for(;I=zn(D);)D=I.find(1,!0).line;return Rt(D)+1}function Vn(e,n){var D=Kt&&n.markedSpans;if(D)for(var I=void 0,B=0;Bn.maxLineLength&&(n.maxLineLength=B,n.maxLine=I)})}var ii=function(e,n,D){this.text=e,ri(this,n),this.height=D?D(this):1};ii.prototype.lineNo=function(){return Rt(this)},Ae(ii);function Pr(e,n,D,I){e.text=n,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Zr(e),ri(e,D);var B=I?I(e):1;B!=e.height&&Bt(e,B)}function Nt(e){e.parent=null,Zr(e)}var Yt={},Ut={};function nr(e,n){if(!e||/^\s*$/.test(e))return null;var D=n.addModeClass?Ut:Yt;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function gr(e,n){var D=k("span",null,null,p?"padding-right: .1px":null),I={pre:k("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var B=0;B<=(n.rest?n.rest.length:0);B++){var Y=B?n.rest[B-1]:n.line,re=void 0;I.pos=0,I.addToken=dr,Ct(e.display.measure)&&(re=rt(Y,e.doc.direction))&&(I.addToken=Un(I.addToken,re)),I.map=[];var le=n!=e.display.externalMeasured&&Rt(Y);vi(Y,I,Tn(e,Y,le)),Y.styleClasses&&(Y.styleClasses.bgClass&&(I.bgClass=W(Y.styleClasses.bgClass,I.bgClass||"")),Y.styleClasses.textClass&&(I.textClass=W(Y.styleClasses.textClass,I.textClass||""))),I.map.length==0&&I.map.push(0,0,I.content.appendChild(at(e.display.measure))),B==0?(n.measure.map=I.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(I.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(p){var ue=I.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(I.content.className="cm-tab-wrap-hack")}return Ne(e,"renderLine",e,n.line,I.pre),I.pre.className&&(I.textClass=W(I.pre.className,I.textClass||"")),I}function Rr(e){var n=T("span","\u2022","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function dr(e,n,D,I,B,Y,re){if(!n)return;var le=e.splitSpaces?qr(n,e.trailingSpace):n,ue=e.cm.state.specialChars,ve=!1,je;if(!ue.test(n))e.col+=n.length,je=document.createTextNode(le),e.map.push(e.pos,e.pos+n.length,je),S&&b<9&&(ve=!0),e.pos+=n.length;else{je=document.createDocumentFragment();for(var Ue=0;;){ue.lastIndex=Ue;var tt=ue.exec(n),Qe=tt?tt.index-Ue:n.length-Ue;if(Qe){var st=document.createTextNode(le.slice(Ue,Ue+Qe));S&&b<9?je.appendChild(T("span",[st])):je.appendChild(st),e.map.push(e.pos,e.pos+Qe,st),e.col+=Qe,e.pos+=Qe}if(!tt)break;Ue+=Qe+1;var ht=void 0;if(tt[0]==" "){var _t=e.cm.options.tabSize,wt=_t-e.col%_t;ht=je.appendChild(T("span",se(wt),"cm-tab")),ht.setAttribute("role","presentation"),ht.setAttribute("cm-text"," "),e.col+=wt}else tt[0]=="\r"||tt[0]==` `?(ht=je.appendChild(T("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ht.setAttribute("cm-text",tt[0]),e.col+=1):(ht=e.cm.options.specialCharPlaceholder(tt[0]),ht.setAttribute("cm-text",tt[0]),S&&b<9?je.appendChild(T("span",[ht])):je.appendChild(ht),e.col+=1);e.map.push(e.pos,e.pos+1,ht),e.pos++}}if(e.trailingSpace=le.charCodeAt(n.length-1)==32,D||I||B||ve||Y||re){var Lt=D||"";I&&(Lt+=I),B&&(Lt+=B);var Tt=T("span",[je],Lt,Y);if(re)for(var Ft in re)re.hasOwnProperty(Ft)&&Ft!="style"&&Ft!="class"&&Tt.setAttribute(Ft,re[Ft]);return e.content.appendChild(Tt)}e.content.appendChild(je)}function qr(e,n){if(e.length>1&&!/ /.test(e))return e;for(var D=n,I="",B=0;Bve&&Ue.from<=ve);tt++);if(Ue.to>=je)return e(D,I,B,Y,re,le,ue);e(D,I.slice(0,Ue.to-ve),B,Y,null,le,ue),Y=null,I=I.slice(Ue.to-ve),ve=Ue.to}}}function sr(e,n,D,I){var B=!I&&D.widgetNode;B&&e.map.push(e.pos,e.pos+n,B),!I&&e.cm.display.input.needsContentAttribute&&(B||(B=e.content.appendChild(document.createElement("span"))),B.setAttribute("cm-marker",D.id)),B&&(e.cm.display.input.setUneditable(B),e.content.appendChild(B)),e.pos+=n,e.trailingSpace=!1}function vi(e,n,D){var I=e.markedSpans,B=e.text,Y=0;if(!I){for(var re=1;reue||Er.collapsed&&Gt.to==ue&&Gt.from==ue)){if(Gt.to!=null&&Gt.to!=ue&&Qe>Gt.to&&(Qe=Gt.to,ht=""),Er.className&&(st+=" "+Er.className),Er.css&&(tt=(tt?tt+";":"")+Er.css),Er.startStyle&&Gt.from==ue&&(_t+=" "+Er.startStyle),Er.endStyle&&Gt.to==Qe&&(Ft||(Ft=[])).push(Er.endStyle,Gt.to),Er.title&&((Lt||(Lt={})).title=Er.title),Er.attributes)for(var cn in Er.attributes)(Lt||(Lt={}))[cn]=Er.attributes[cn];Er.collapsed&&(!wt||Sn(wt.marker,Er)<0)&&(wt=Gt)}else Gt.from>ue&&Qe>Gt.from&&(Qe=Gt.from)}if(Ft)for(var oi=0;oi=le)break;for(var Pi=Math.min(le,Qe);;){if(je){var Ri=ue+je.length;if(!wt){var Hn=Ri>Pi?je.slice(0,Pi-ue):je;n.addToken(n,Hn,Ue?Ue+st:st,_t,ue+Hn.length==Qe?ht:"",tt,Lt)}if(Ri>=Pi){je=je.slice(Pi-ue),ue=Pi;break}ue=Ri,_t=""}je=B.slice(Y,Y=D[ve++]),Ue=nr(D[ve++],n.cm.options)}}}function Ir(e,n,D){this.line=n,this.rest=pi(n),this.size=this.rest?Rt(te(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Vn(e,n)}function On(e,n,D){for(var I=[],B,Y=n;Y2&&Y.push((ue.bottom+ve.top)/2-D.top)}}Y.push(D.bottom-D.top)}}function ye(e,n,D){if(e.line==n)return{map:e.measure.map,cache:e.measure.cache};for(var I=0;ID)return{map:e.measure.maps[B],cache:e.measure.caches[B],before:!0}}function Pe(e,n){n=Gn(n);var D=Rt(n),I=e.display.externalMeasured=new Ir(e.doc,n,D);I.lineN=D;var B=I.built=gr(e,I);return I.text=B.pre,E(e.display.lineMeasure,B.pre),I}function Fe(e,n,D,I){return $e(e,He(e,n),D,I)}function We(e,n){if(n>=e.display.viewFrom&&n=D.lineN&&nn)&&(Y=ue-le,B=Y-1,n>=ue&&(re="right")),B!=null){if(I=e[ve+2],le==ue&&D==(I.insertLeft?"left":"right")&&(re=D),D=="left"&&B==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)I=e[(ve-=3)+2],re="left";if(D=="right"&&B==ue-le)for(;ve=0&&!((D=e[B]).left!=D.right);B--);return D}function xt(e,n,D,I){var B=gt(n.map,D,I),Y=B.node,re=B.start,le=B.end,ue=B.collapse,ve;if(Y.nodeType==3){for(var je=0;je<4;je++){for(;re&&fe(n.line.text.charAt(B.coverStart+re));)--re;for(;B.coverStart+le0&&(ue=I="right");var Ue;e.options.lineWrapping&&(Ue=Y.getClientRects()).length>1?ve=Ue[I=="right"?Ue.length-1:0]:ve=Y.getBoundingClientRect()}if(S&&b<9&&!re&&(!ve||!ve.left&&!ve.right)){var tt=Y.parentNode.getClientRects()[0];tt?ve={left:tt.left,right:tt.left+Yn(e.display),top:tt.top,bottom:tt.bottom}:ve=it}for(var Qe=ve.top-n.rect.top,st=ve.bottom-n.rect.top,ht=(Qe+st)/2,_t=n.view.measure.heights,wt=0;wt<_t.length-1&&!(ht<_t[wt]);wt++);var Lt=wt?_t[wt-1]:0,Tt=_t[wt],Ft={left:(ue=="right"?ve.right:ve.left)-n.rect.left,right:(ue=="left"?ve.left:ve.right)-n.rect.left,top:Lt,bottom:Tt};return!ve.left&&!ve.right&&(Ft.bogus=!0),e.options.singleCursorHeightPerLine||(Ft.rtop=Qe,Ft.rbottom=st),Ft}function Wt(e,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xt(e))return n;var D=screen.logicalXDPI/screen.deviceXDPI,I=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*D,right:n.right*D,top:n.top*I,bottom:n.bottom*I}}function ar(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n=I.text.length?(ue=I.text.length,ve="before"):ue<=0&&(ue=0,ve="after"),!le)return re(ve=="before"?ue-1:ue,ve=="before");function je(st,ht,_t){var wt=le[ht],Lt=wt.level==1;return re(_t?st-1:st,Lt!=_t)}var Ue=Xe(le,ue,ve),tt=qe,Qe=je(ue,Ue,ve=="before");return tt!=null&&(Qe.other=je(ue,tt,ve!="before")),Qe}function Jt(e,n){var D=0;n=Dt(e.doc,n),e.options.lineWrapping||(D=Yn(e.display)*n.ch);var I=vt(e.doc,n.line),B=ni(I)+Xi(e.display);return{left:D,right:D,top:B,bottom:B+I.height}}function zt(e,n,D,I,B){var Y=ut(e,n,D);return Y.xRel=B,I&&(Y.outside=I),Y}function Or(e,n,D){var I=e.doc;if(D+=e.display.viewOffset,D<0)return zt(I.first,0,null,-1,-1);var B=br(I,D),Y=I.first+I.size-1;if(B>Y)return zt(I.first+I.size-1,vt(I,Y).text.length,null,1,1);n<0&&(n=0);for(var re=vt(I,B);;){var le=vn(e,re,B,n,D),ue=Li(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ve=ue.find(1);if(ve.line==B)return ve;re=vt(I,B=ve.line)}}function Mr(e,n,D,I){I-=cr(n);var B=n.text.length,Y=ze(function(re){return $e(e,D,re-1).bottom<=I},B,0);return B=ze(function(re){return $e(e,D,re).top>I},Y,B),{begin:Y,end:B}}function Ht(e,n,D,I){D||(D=He(e,n));var B=Lr(e,n,$e(e,D,I),"line").top;return Mr(e,n,D,B)}function Nr(e,n,D,I){return e.bottom<=D?!1:e.top>D?!0:(I?e.left:e.right)>n}function vn(e,n,D,I,B){B-=ni(n);var Y=He(e,n),re=cr(n),le=0,ue=n.text.length,ve=!0,je=rt(n,e.doc.direction);if(je){var Ue=(e.options.lineWrapping?en:Ur)(e,n,D,Y,je,I,B);ve=Ue.level!=1,le=ve?Ue.from:Ue.to-1,ue=ve?Ue.to:Ue.from-1}var tt=null,Qe=null,st=ze(function(Zt){var Gt=$e(e,Y,Zt);return Gt.top+=re,Gt.bottom+=re,Nr(Gt,I,B,!1)?(Gt.top<=B&&Gt.left<=I&&(tt=Zt,Qe=Gt),!0):!1},le,ue),ht,_t,wt=!1;if(Qe){var Lt=I-Qe.left=Ft.bottom?1:0}return st=Te(n.text,st,1),zt(D,st,_t,wt,I-ht)}function Ur(e,n,D,I,B,Y,re){var le=ze(function(Ue){var tt=B[Ue],Qe=tt.level!=1;return Nr(wr(e,ut(D,Qe?tt.to:tt.from,Qe?"before":"after"),"line",n,I),Y,re,!0)},0,B.length-1),ue=B[le];if(le>0){var ve=ue.level!=1,je=wr(e,ut(D,ve?ue.from:ue.to,ve?"after":"before"),"line",n,I);Nr(je,Y,re,!0)&&je.top>re&&(ue=B[le-1])}return ue}function en(e,n,D,I,B,Y,re){var le=Mr(e,n,I,re),ue=le.begin,ve=le.end;/\s/.test(n.text.charAt(ve-1))&&ve--;for(var je=null,Ue=null,tt=0;tt=ve||Qe.to<=ue)continue;var st=Qe.level!=1,ht=$e(e,I,st?Math.min(ve,Qe.to)-1:Math.max(ue,Qe.from)).right,_t=ht_t)&&(je=Qe,Ue=_t)}return je||(je=B[B.length-1]),je.fromve&&(je={from:je.from,to:ve,level:je.level}),je}var Jr;function Dn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Jr==null){Jr=T("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Jr.appendChild(document.createTextNode("x")),Jr.appendChild(T("br"));Jr.appendChild(document.createTextNode("x"))}E(e.measure,Jr);var D=Jr.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),x(e.measure),D||1}function Yn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var n=T("span","xxxxxxxxxx"),D=T("pre",[n],"CodeMirror-line-like");E(e.measure,D);var I=n.getBoundingClientRect(),B=(I.right-I.left)/10;return B>2&&(e.cachedCharWidth=B),B||10}function En(e){for(var n=e.display,D={},I={},B=n.gutters.clientLeft,Y=n.gutters.firstChild,re=0;Y;Y=Y.nextSibling,++re){var le=e.display.gutterSpecs[re].className;D[le]=Y.offsetLeft+Y.clientLeft+B,I[le]=Y.clientWidth}return{fixedPos:yi(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:D,gutterWidth:I,wrapperWidth:n.wrapper.clientWidth}}function yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fi(e){var n=Dn(e.display),D=e.options.lineWrapping,I=D&&Math.max(5,e.display.scroller.clientWidth/Yn(e.display)-3);return function(B){if(Vn(e.doc,B))return 0;var Y=0;if(B.widgets)for(var re=0;re0&&(ve=vt(e.doc,ue.line).text).length==ue.ch){var je=H(ve,ve.length,e.options.tabSize)-ve.length;ue=ut(ue.line,Math.max(0,Math.round((Y-Be(e.display).left)/Yn(e.display))-je))}return ue}function un(e,n){if(n>=e.display.viewTo)return null;if(n-=e.display.viewFrom,n<0)return null;for(var D=e.display.view,I=0;In)&&(B.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=B.viewTo)Kt&&mi(e.doc,n)B.viewFrom?yn(e):(B.viewFrom+=I,B.viewTo+=I);else if(n<=B.viewFrom&&D>=B.viewTo)yn(e);else if(n<=B.viewFrom){var Y=Ui(e,D,D+I,1);Y?(B.view=B.view.slice(Y.index),B.viewFrom=Y.lineN,B.viewTo+=I):yn(e)}else if(D>=B.viewTo){var re=Ui(e,n,n,-1);re?(B.view=B.view.slice(0,re.index),B.viewTo=re.lineN):yn(e)}else{var le=Ui(e,n,n,-1),ue=Ui(e,D,D+I,1);le&&ue?(B.view=B.view.slice(0,le.index).concat(On(e,le.lineN,ue.lineN)).concat(B.view.slice(ue.index)),B.viewTo+=I):yn(e)}var ve=B.externalMeasured;ve&&(D=B.lineN&&n=I.viewTo)return;var Y=I.view[un(e,n)];if(Y.node==null)return;var re=Y.changes||(Y.changes=[]);q(re,D)==-1&&re.push(D)}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,n,D,I){var B=un(e,n),Y,re=e.display.view;if(!Kt||D==e.doc.first+e.doc.size)return{index:B,lineN:D};for(var le=e.display.viewFrom,ue=0;ue0){if(B==re.length-1)return null;Y=le+re[B].size-n,B++}else Y=le-n;n+=Y,D+=Y}for(;mi(e.doc,D)!=D;){if(B==(I<0?0:re.length-1))return null;D+=I*re[B-(I<0?1:0)].size,B+=I}return{index:B,lineN:D}}function ea(e,n,D){var I=e.display,B=I.view;B.length==0||n>=I.viewTo||D<=I.viewFrom?(I.view=On(e,n,D),I.viewFrom=n):(I.viewFrom>n?I.view=On(e,n,I.viewFrom).concat(I.view):I.viewFromD&&(I.view=I.view.slice(0,un(e,D)))),I.viewTo=D}function ta(e){for(var n=e.display.view,D=0,I=0;I=e.display.viewTo||le.to().line0?n.blinker=setInterval(function(){e.hasFocus()||va(e),n.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}function So(e){e.state.focused||(e.display.input.focus(),na(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,va(e))},100)}function na(e,n){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ne(e,"focus",e,n),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jn(e)}function va(e,n){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ne(e,"blur",e,n),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var n=e.display,D=n.lineDiv.offsetTop,I=0;I.005||je<-.005)&&(Bt(B.line,re),to(B.line),B.rest))for(var Ue=0;Uee.display.sizerWidth){var tt=Math.ceil(le/Yn(e.display));tt>e.display.maxLineLength&&(e.display.maxLineLength=tt,e.display.maxLine=B.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var n=0;n=re&&(Y=br(n,ni(vt(n,ue))-e.wrapper.clientHeight),re=ue)}return{from:Y,to:Math.max(re,Y+1)}}function Vo(e,n){if(Ge(e,"scrollCursorIntoView"))return;var D=e.display,I=D.sizer.getBoundingClientRect(),B=null;if(n.top+I.top<0?B=!0:n.bottom+I.top>(window.innerHeight||document.documentElement.clientHeight)&&(B=!1),B!=null&&!o){var Y=T("div","\u200B",null,`position: absolute; top: `+(n.top-D.viewOffset-Xi(e.display))+`px; height: `+(n.bottom-n.top+Ke(e)+D.barHeight)+`px; left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(B),e.display.lineSpace.removeChild(Y)}}function Yo(e,n,D,I){I==null&&(I=0);var B;!e.options.lineWrapping&&n==D&&(n=n.ch?ut(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n,D=n.sticky=="before"?ut(n.line,n.ch+1,"before"):n);for(var Y=0;Y<5;Y++){var re=!1,le=wr(e,n),ue=!D||D==n?le:wr(e,D);B={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-I,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+I};var ve=ro(e,B),je=e.doc.scrollTop,Ue=e.doc.scrollLeft;if(ve.scrollTop!=null&&(_a(e,ve.scrollTop),Math.abs(e.doc.scrollTop-je)>1&&(re=!0)),ve.scrollLeft!=null&&(Bi(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Ue)>1&&(re=!0)),!re)break}return B}function Oo(e,n){var D=ro(e,n);D.scrollTop!=null&&_a(e,D.scrollTop),D.scrollLeft!=null&&Bi(e,D.scrollLeft)}function ro(e,n){var D=e.display,I=Dn(e.display);n.top<0&&(n.top=0);var B=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,Y=pe(e),re={};n.bottom-n.top>Y&&(n.bottom=n.top+Y);var le=e.doc.height+Re(D),ue=n.tople-I;if(n.topB+Y){var je=Math.min(n.top,(ve?le:n.bottom)-Y);je!=B&&(re.scrollTop=je)}var Ue=e.options.fixedGutter?0:D.gutters.offsetWidth,tt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ue,Qe=Me(e)-D.gutters.offsetWidth,st=n.right-n.left>Qe;return st&&(n.right=n.left+Qe),n.left<10?re.scrollLeft=0:n.leftQe+tt-3&&(re.scrollLeft=n.right+(st?0:10)-Qe),re}function no(e,n){if(n==null)return;Na(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n}function ya(e){Na(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function ba(e,n,D){(n!=null||D!=null)&&Na(e),n!=null&&(e.curOp.scrollLeft=n),D!=null&&(e.curOp.scrollTop=D)}function $o(e,n){Na(e),e.curOp.scrollToPos=n}function Na(e){var n=e.curOp.scrollToPos;if(n){e.curOp.scrollToPos=null;var D=Jt(e,n.from),I=Jt(e,n.to);Ca(e,D,I,n.margin)}}function Ca(e,n,D,I){var B=ro(e,{left:Math.min(n.left,D.left),top:Math.min(n.top,D.top)-I,right:Math.max(n.right,D.right),bottom:Math.max(n.bottom,D.bottom)+I});ba(e,B.scrollLeft,B.scrollTop)}function _a(e,n){if(Math.abs(e.doc.scrollTop-n)<2)return;O||Ia(e,{top:n}),Ea(e,n,!0),O&&Ia(e),Ra(e,100)}function Ea(e,n,D){if(n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),e.display.scroller.scrollTop==n&&!D)return;e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n)}function Bi(e,n,D,I){if(n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!I)return;e.doc.scrollLeft=n,Ar(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n)}function ca(e){var n=e.display,D=n.gutters.offsetWidth,I=Math.round(e.doc.height+Re(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:I,scrollHeight:I+Ke(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:D}}var ia=function(e,n,D){this.cm=D;var I=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),B=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");I.tabIndex=B.tabIndex=-1,e(I),e(B),Oe(I,"scroll",function(){I.clientHeight&&n(I.scrollTop,"vertical")}),Oe(B,"scroll",function(){B.clientWidth&&n(B.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ia.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,I=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=n?I+"px":"0";var B=e.viewHeight-(n?I:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+B)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=D?I+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(D?I: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&&(I==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?I:0,bottom:n?I:0}},ia.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ia.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ia.prototype.zeroWidthHack=function(){var e=c&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},ia.prototype.enableZeroWidthBar=function(e,n,D){e.style.pointerEvents="auto";function I(){var B=e.getBoundingClientRect(),Y=D=="vert"?document.elementFromPoint(B.right-1,(B.top+B.bottom)/2):document.elementFromPoint((B.right+B.left)/2,B.bottom-1);Y!=e?e.style.pointerEvents="none":n.set(1e3,I)}n.set(1e3,I)},ia.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(e,n){n||(n=ca(e));var D=e.display.barWidth,I=e.display.barHeight;ja(e,n);for(var B=0;B<4&&D!=e.display.barWidth||I!=e.display.barHeight;B++)D!=e.display.barWidth&&e.options.lineWrapping&&ka(e),ja(e,ca(e)),D=e.display.barWidth,I=e.display.barHeight}function ja(e,n){var D=e.display,I=D.scrollbars.update(n);D.sizer.style.paddingRight=(D.barWidth=I.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=I.bottom)+"px",D.heightForcer.style.borderBottom=I.bottom+"px solid transparent",I.right&&I.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=I.bottom+"px",D.scrollbarFiller.style.width=I.right+"px"):D.scrollbarFiller.style.display="",I.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=I.bottom+"px",D.gutterFiller.style.width=n.gutterWidth+"px"):D.gutterFiller.style.display=""}var io={native:ia,null:Aa};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),Oe(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,D){D=="horizontal"?Bi(e,n):_a(e,n)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var ao=0;function aa(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:++ao},li(e.curOp)}function fa(e){var n=e.curOp;n&&Dr(n,function(D){for(var I=0;I=D.viewTo)||D.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new Hi(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&ha(e.cm,e.update)}function Zo(e){var n=e.cm,D=n.display;e.updatedDisplay&&ka(n),e.barMeasure=ca(n),D.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Fe(n,D.maxLine,D.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Ke(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Me(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function oo(e){var n=e.cm;e.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var D=+new Date+e.options.workTime,I=bn(e,n.highlightFrontier),B=[];n.iter(I.line,Math.min(n.first+n.size,e.display.viewTo+500),function(Y){if(I.line>=e.display.viewFrom){var re=Y.styles,le=Y.text.length>e.options.maxHighlightLength?rr(n.mode,I.state):null,ue=ei(e,Y,I,!0);le&&(I.state=le),Y.styles=ue.styles;var ve=Y.styleClasses,je=ue.classes;je?Y.styleClasses=je:ve&&(Y.styleClasses=null);for(var Ue=!re||re.length!=Y.styles.length||ve!=je&&(!ve||!je||ve.bgClass!=je.bgClass||ve.textClass!=je.textClass),tt=0;!Ue&&ttD)return Ra(e,e.options.workDelay),!0}),n.highlightFrontier=I.line,n.modeFrontier=Math.max(n.modeFrontier,I.line),B.length&&xi(e,function(){for(var Y=0;Y=D.viewFrom&&n.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ta(e)==0)return!1;Qn(e)&&(yn(e),n.dims=En(e));var B=I.first+I.size,Y=Math.max(n.visible.from-e.options.viewportMargin,I.first),re=Math.min(B,n.visible.to+e.options.viewportMargin);D.viewFromre&&D.viewTo-re<20&&(re=Math.min(B,D.viewTo)),Kt&&(Y=mi(e.doc,Y),re=Xn(e.doc,re));var le=Y!=D.viewFrom||re!=D.viewTo||D.lastWrapHeight!=n.wrapperHeight||D.lastWrapWidth!=n.wrapperWidth;ea(e,Y,re),D.viewOffset=ni(vt(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=ta(e);if(!le&&ue==0&&!n.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var ve=Ro(e);return ue>4&&(D.lineDiv.style.display="none"),Do(e,D.updateLineNumbers,n.dims),ue>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Io(ve),x(D.cursorDiv),x(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,le&&(D.lastWrapHeight=n.wrapperHeight,D.lastWrapWidth=n.wrapperWidth,Ra(e,400)),D.updateLineNumbers=null,!0}function Ua(e,n){for(var D=n.viewport,I=!0;;I=!1){if(!I||!e.options.lineWrapping||n.oldDisplayWidth==Me(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Re(e.display)-pe(e),D.top)}),n.visible=Pa(e.display,e.doc,D),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break}else I&&(n.visible=Pa(e.display,e.doc,D));if(!ha(e,n))break;ka(e);var B=ca(e);Qr(e),da(e,B),Xr(e,B),n.force=!1}n.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ia(e,n){var D=new Hi(e,n);if(ha(e,D)){ka(e),Ua(e,D);var I=ca(e);Qr(e),da(e,I),Xr(e,I),D.finish()}}function Do(e,n,D){var I=e.display,B=e.options.lineNumbers,Y=I.lineDiv,re=Y.firstChild;function le(st){var ht=st.nextSibling;return p&&c&&e.display.currentWheelTarget==st?st.style.display="none":st.parentNode.removeChild(st),ht}for(var ue=I.view,ve=I.viewFrom,je=0;je-1&&(Qe=!1),zi(e,Ue,ve,D)),Qe&&(x(Ue.lineNumber),Ue.lineNumber.appendChild(document.createTextNode(Cr(e.options,ve)))),re=Ue.node.nextSibling}ve+=Ue.size}for(;re;)re=le(re)}function Ba(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function Xr(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Ke(e)+"px"}function Ar(e){var n=e.display,D=n.view;if(!n.alignWidgets&&(!n.gutters.firstChild||!e.options.fixedGutter))return;for(var I=yi(n)-n.scroller.scrollLeft+e.doc.scrollLeft,B=n.gutters.offsetWidth,Y=I+"px",re=0;rere.clientWidth,ue=re.scrollHeight>re.clientHeight;if(!(I&&le||B&&ue))return;if(B&&c&&p){e:for(var ve=n.target,je=Y.view;ve!=re;ve=ve.parentNode)for(var Ue=0;Ue=0&&It(e,I.to())<=0)return D}return-1};var Kr=function(e,n){this.anchor=e,this.head=n};Kr.prototype.from=function(){return fn(this.anchor,this.head)},Kr.prototype.to=function(){return An(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Wi(e,n,D){var I=e&&e.options.selectionsMayTouch,B=n[D];n.sort(function(tt,Qe){return It(tt.from(),Qe.from())}),D=q(n,B);for(var Y=1;Y0:ue>=0){var ve=fn(le.from(),re.from()),je=An(le.to(),re.to()),Ue=le.empty()?re.from()==re.head:le.from()==le.head;Y<=D&&--D,n.splice(--Y,2,new Kr(Ue?je:ve,Ue?ve:je))}}return new Ti(n,D)}function Qi(e,n){return new Ti([new Kr(e,n||e)],0)}function Zi(e){return e.text?ut(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,n){if(It(e,n.from)<0)return e;if(It(e,n.to)<=0)return Zi(n);var D=e.line+n.text.length-(n.to.line-n.from.line)-1,I=e.ch;return e.line==n.to.line&&(I+=Zi(n).ch-n.to.ch),ut(D,I)}function Wa(e,n){for(var D=[],I=0;I1&&e.remove(le.line+1,st-1),e.insert(le.line+1,wt)}fr(e,"change",e,n)}function wa(e,n,D){function I(B,Y,re){if(B.linked)for(var le=0;le1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function _s(e,n,D,I){var B=e.history;B.undone.length=0;var Y=+new Date,re,le;if((B.lastOp==I||B.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&B.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(re=ml(B,B.lastOp==I)))le=te(re.changes),It(n.from,n.to)==0&&It(n.from,le.to)==0?le.to=Zi(n):re.changes.push(rs(e,n));else{var ue=te(B.done);for((!ue||!ue.ranges)&&Po(e.sel,B.done),re={changes:[rs(e,n)],generation:B.generation},B.done.push(re);B.done.length>B.undoDepth;)B.done.shift(),B.done[0].ranges||B.done.shift()}B.done.push(D),B.generation=++B.maxGeneration,B.lastModTime=B.lastSelTime=Y,B.lastOp=B.lastSelOp=I,B.lastOrigin=B.lastSelOrigin=n.origin,le||Ne(e,"historyAdded")}function gl(e,n,D,I){var B=n.charAt(0);return B=="*"||B=="+"&&D.ranges.length==I.ranges.length&&D.somethingSelected()==I.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,n,D,I){var B=e.history,Y=I&&I.origin;D==B.lastSelOp||Y&&B.lastSelOrigin==Y&&(B.lastModTime==B.lastSelTime&&B.lastOrigin==Y||gl(e,Y,te(B.done),n))?B.done[B.done.length-1]=n:Po(n,B.done),B.lastSelTime=+new Date,B.lastSelOrigin=Y,B.lastSelOp=D,I&&I.clearRedo!==!1&&bs(B.undone)}function Po(e,n){var D=te(n);D&&D.ranges&&D.equals(e)||n.push(e)}function Es(e,n,D,I){var B=n["spans_"+e.id],Y=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,I),function(re){re.markedSpans&&((B||(B=n["spans_"+e.id]={}))[Y]=re.markedSpans),++Y})}function yl(e){if(!e)return null;for(var n,D=0;D-1&&(te(le)[Ue]=ve[Ue],delete ve[Ue]))}}return I}function ns(e,n,D,I){if(I){var B=e.anchor;if(D){var Y=It(n,B)<0;Y!=It(D,B)<0?(B=n,n=D):Y!=It(n,D)<0&&(n=D)}return new Kr(B,n)}else return new Kr(D||n,n)}function No(e,n,D,I,B){B==null&&(B=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new Ti([ns(e.sel.primary(),n,D,B)],0),I)}function ws(e,n,D){for(var I=[],B=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y=n.ch:le.to>n.ch))){if(B&&(Ne(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(Y.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(D){var Ue=ue.find(I<0?1:-1),tt=void 0;if((I<0?je:ve)&&(Ue=Rs(e,Ue,-I,Ue&&Ue.line==n.line?Y:null)),Ue&&Ue.line==n.line&&(tt=It(Ue,D))&&(I<0?tt<0:tt>0))return za(e,Ue,n,I,B)}var Qe=ue.find(I<0?-1:1);return(I<0?ve:je)&&(Qe=Rs(e,Qe,I,Qe.line==n.line?Y:null)),Qe?za(e,Qe,n,I,B):null}}return n}function Fo(e,n,D,I,B){var Y=I||1,re=za(e,n,D,Y,B)||!B&&za(e,n,D,Y,!0)||za(e,n,D,-Y,B)||!B&&za(e,n,D,-Y,!0);return re||(e.cantEdit=!0,ut(e.first,0))}function Rs(e,n,D,I){return D<0&&n.ch==0?n.line>e.first?Dt(e,ut(n.line-1)):null:D>0&&n.ch==(I||vt(e,n.line)).text.length?n.line=0;--B)Ls(e,{from:I[B].from,to:I[B].to,text:B?[""]:n.text,origin:n.origin});else Ls(e,n)}function Ls(e,n){if(n.text.length==1&&n.text[0]==""&&It(n.from,n.to)==0)return;var D=Wa(e,n);_s(e,n,D,e.cm?e.cm.curOp.id:NaN),fo(e,n,D,Oi(e,n));var I=[];wa(e,function(B,Y){!Y&&q(I,B.history)==-1&&(Ns(B.history,n),I.push(B.history)),fo(B,n,null,Oi(B,n))})}function Uo(e,n,D){var I=e.cm&&e.cm.state.suppressEdits;if(I&&!D)return;for(var B=e.history,Y,re=e.sel,le=n=="undo"?B.done:B.undone,ue=n=="undo"?B.undone:B.done,ve=0;ve=0;--Qe){var st=tt(Qe);if(st)return st.v}}function Ms(e,n){if(n==0)return;if(e.first+=n,e.sel=new Ti(be(e.sel.ranges,function(B){return new Kr(ut(B.anchor.line+n,B.anchor.ch),ut(B.head.line+n,B.head.ch))}),e.sel.primIndex),e.cm){tn(e.cm,e.first,e.first-n,n);for(var D=e.cm.display,I=D.viewFrom;Ie.lastLine())return;if(n.from.lineY&&(n={from:n.from,to:ut(Y,vt(e,Y).text.length),text:[n.text[0]],origin:n.origin}),n.removed=yr(e,n.from,n.to),D||(D=Wa(e,n)),e.cm?El(e.cm,n,I):ts(e,n,I),jo(e,D,he),e.cantEdit&&Fo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,n,D){var I=e.doc,B=e.display,Y=n.from,re=n.to,le=!1,ue=Y.line;e.options.lineWrapping||(ue=Rt(Gn(vt(I,Y.line))),I.iter(ue,re.line+1,function(Qe){if(Qe==B.maxLine)return le=!0,!0})),I.sel.contains(n.from,n.to)>-1&&De(e),ts(I,n,D,Fi(e)),e.options.lineWrapping||(I.iter(ue,Y.line+n.text.length,function(Qe){var st=gi(Qe);st>B.maxLineLength&&(B.maxLine=Qe,B.maxLineLength=st,B.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),nn(I,Y.line),Ra(e,400);var ve=n.text.length-(re.line-Y.line)-1;n.full?tn(e):Y.line==re.line&&n.text.length==1&&!gs(e.doc,n)?xn(e,Y.line,"text"):tn(e,Y.line,re.line+1,ve);var je=we(e,"changes"),Ue=we(e,"change");if(Ue||je){var tt={from:Y,to:re,text:n.text,removed:n.removed,origin:n.origin};Ue&&fr(e,"change",e,tt),je&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(tt)}e.display.selForContextMenu=null}function Xa(e,n,D,I,B){var Y;I||(I=D),It(I,D)<0&&(Y=[I,D],D=Y[0],I=Y[1]),typeof n=="string"&&(n=e.splitLines(n)),Ga(e,{from:D,to:I,text:n,origin:B})}function ks(e,n,D,I){D1||!(this.children[0]instanceof po))){var le=[];this.collapse(le),this.children=[new po(le)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var re=B.lines.length%25+25,le=re;le10);e.parent.maybeSpill()},iterN:function(e,n,D){for(var I=0;Ie.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=je,e.display.maxLineChanged=!0)}I!=null&&e&&this.collapsed&&tn(e,I,B+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cs(e.doc)),e&&fr(e,"markerCleared",e,this,I,B),n&&fa(e),this.parent&&this.parent.clear()},Ta.prototype.find=function(e,n){e==null&&this.type=="bookmark"&&(e=1);for(var D,I,B=0;B0||re==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=k("span",[Y.replacedWith],"CodeMirror-widget"),I.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),I.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(Mi(e,n.line,n,D,Y)||n.line!=D.line&&Mi(e,D.line,n,D,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sr()}Y.addToHistory&&_s(e,{from:n,to:D,origin:"markText"},e.sel,NaN);var le=n.line,ue=e.cm,ve;if(e.iter(le,D.line+1,function(Ue){ue&&Y.collapsed&&!ue.options.lineWrapping&&Gn(Ue)==ue.display.maxLine&&(ve=!0),Y.collapsed&&le!=n.line&&Bt(Ue,0),la(Ue,new jr(Y,le==n.line?n.ch:null,le==D.line?D.ch:null)),++le}),Y.collapsed&&e.iter(n.line,D.line+1,function(Ue){Vn(e,Ue)&&Bt(Ue,0)}),Y.clearOnEnter&&Oe(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(er(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Fs,Y.atomic=!0),ue){if(ve&&(ue.curOp.updateMaxLine=!0),Y.collapsed)tn(ue,n.line,D.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var je=n.line;je<=D.line;je++)xn(ue,je,"text");Y.atomic&&Cs(ue.doc),fr(ue,"markerAdded",ue,Y)}return Y}var vo=function(e,n){this.markers=e,this.primary=n;for(var D=0;D=0;ue--)Ga(this,I[ue]);le?Ss(this,le):this.cm&&ya(this.cm)}),undo:Nn(function(){Uo(this,"undo")}),redo:Nn(function(){Uo(this,"redo")}),undoSelection:Nn(function(){Uo(this,"undo",!0)}),redoSelection:Nn(function(){Uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,D=0,I=0;I=e.ch)&&n.push(B.marker.parent||B.marker)}return n},findMarks:function(e,n,D){e=Dt(this,e),n=Dt(this,n);var I=[],B=e.line;return this.iter(e.line,n.line+1,function(Y){var re=Y.markedSpans;if(re)for(var le=0;le=ue.to||ue.from==null&&B!=e.line||ue.from!=null&&B==n.line&&ue.from>=n.ch)&&(!D||D(ue.marker))&&I.push(ue.marker.parent||ue.marker)}++B}),I},getAllMarks:function(){var e=[];return this.iter(function(n){var D=n.markedSpans;if(D)for(var I=0;Ie)return n=e,!0;e-=Y,++D}),Dt(this,ut(D,n))},indexFromPos:function(e){e=Dt(this,e);var n=e.ch;if(e.linen&&(n=e.from),e.to!=null&&e.to-1){n.state.draggingText(e),setTimeout(function(){return n.display.input.focus()},20);return}try{var je=e.dataTransfer.getData("Text");if(je){var Ue;if(n.state.draggingText&&!n.state.draggingText.copy&&(Ue=n.listSelections()),jo(n.doc,Qi(D,D)),Ue)for(var tt=0;tt=0;le--)Xa(e.doc,"",I[le].from,I[le].to,"+delete");ya(e)})}function as(e,n,D){var I=Te(e.text,n+D,D);return I<0||I>e.text.length?null:I}function os(e,n,D){var I=as(e,n.ch,D);return I==null?null:new ut(n.line,I,D<0?"after":"before")}function ss(e,n,D,I,B){if(e){n.doc.direction=="rtl"&&(B=-B);var Y=rt(D,n.doc.direction);if(Y){var re=B<0?te(Y):Y[0],le=B<0==(re.level==1),ue=le?"after":"before",ve;if(re.level>0||n.doc.direction=="rtl"){var je=He(n,D);ve=B<0?D.text.length-1:0;var Ue=$e(n,je,ve).top;ve=ze(function(tt){return $e(n,je,tt).top==Ue},B<0==(re.level==1)?re.from:re.to-1,ve),ue=="before"&&(ve=as(D,ve,1))}else ve=B<0?re.to:re.from;return new ut(I,ve,ue)}}return new ut(I,B<0?D.text.length:0,B<0?"before":"after")}function Pl(e,n,D,I){var B=rt(n,e.doc.direction);if(!B)return os(n,D,I);D.ch>=n.text.length?(D.ch=n.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var Y=Xe(B,D.ch,D.sticky),re=B[Y];if(e.doc.direction=="ltr"&&re.level%2==0&&(I>0?re.to>D.ch:re.from=re.from&&tt>=je.begin)){var Qe=Ue?"before":"after";return new ut(D.line,tt,Qe)}}var st=function(wt,Lt,Tt){for(var Ft=function(cn,oi){return oi?new ut(D.line,le(cn,1),"before"):new ut(D.line,cn,"after")};wt>=0&&wt0==(Zt.level!=1),Er=Gt?Tt.begin:le(Tt.end,-1);if(Zt.from<=Er&&Er0?je.end:le(je.begin,-1);return _t!=null&&!(I>0&&_t==n.text.length)&&(ht=st(I>0?0:B.length-1,I,ve(_t)),ht)?ht:null}var _o={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return $a(e,function(n){if(n.empty()){var D=vt(e.doc,n.head.line).text.length;return n.head.ch==D&&n.head.line0)B=new ut(B.line,B.ch+1),e.replaceRange(Y.charAt(B.ch-1)+Y.charAt(B.ch-2),ut(B.line,B.ch-2),B,"+transpose");else if(B.line>e.doc.first){var re=vt(e.doc,B.line-1).text;re&&(B=new ut(B.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),ut(B.line-1,re.length-1),B,"+transpose"))}}D.push(new Kr(B,B))}e.setSelections(D)})},newlineAndIndent:function(e){return xi(e,function(){for(var n=e.listSelections(),D=n.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),n[D].anchor,n[D].head,"+input");n=e.listSelections();for(var I=0;Ie&&It(n,this.pos)==0&&D==this.button};var xo,wo;function Wl(e,n){var D=+new Date;return wo&&wo.compare(D,e,n)?(xo=wo=null,"triple"):xo&&xo.compare(D,e,n)?(wo=new us(D,e,n),xo=null,"double"):(xo=new us(D,e,n),wo=null,"single")}function tl(e){var n=this,D=n.display;if(Ge(n,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Bn(D,e)){p||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(n,e))return;var I=$n(n,e),B=Ye(e),Y=I?Wl(I,B):"single";if(window.focus(),B==1&&n.state.selectingText&&n.state.selectingText(e),I&&Kl(n,B,I,Y,e))return;B==1?I?Gl(n,I,Y,e):ke(e)==D.scroller&&de(e):B==2?(I&&No(n.doc,I),setTimeout(function(){return D.input.focus()},20)):B==3&&(R?n.display.input.onContextMenu(e):eo(n))}function Kl(e,n,D,I,B){var Y="Click";return I=="double"?Y="Double"+Y:I=="triple"&&(Y="Triple"+Y),Y=(n==1?"Left":n==2?"Middle":"Right")+Y,Eo(e,Gs(Y,B),B,function(re){if(typeof re=="string"&&(re=_o[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,D)!=ce}finally{e.state.suppressEdits=!1}return le})}function zl(e,n,D){var I=e.getOption("configureMouse"),B=I?I(e,n,D):{};if(B.unit==null){var Y=f?D.shiftKey&&D.metaKey:D.altKey;B.unit=Y?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(B.extend==null||e.doc.extend)&&(B.extend=e.doc.extend||D.shiftKey),B.addNew==null&&(B.addNew=c?D.metaKey:D.ctrlKey),B.moveOnDrag==null&&(B.moveOnDrag=!(c?D.altKey:D.ctrlKey)),B}function Gl(e,n,D,I){S?setTimeout(U(So,e),0):e.curOp.focus=G();var B=zl(e,D,I),Y=e.doc.sel,re;e.options.dragDrop&&nt&&!e.isReadOnly()&&D=="single"&&(re=Y.contains(n))>-1&&(It((re=Y.ranges[re]).from(),n)<0||n.xRel>0)&&(It(re.to(),n)>0||n.xRel<0)?Xl(e,I,n,B):Vl(e,I,n,B)}function Xl(e,n,D,I){var B=e.display,Y=!1,re=Pn(e,function(ve){p&&(B.scroller.draggable=!1),e.state.draggingText=!1,Ze(B.wrapper.ownerDocument,"mouseup",re),Ze(B.wrapper.ownerDocument,"mousemove",le),Ze(B.scroller,"dragstart",ue),Ze(B.scroller,"drop",re),Y||(de(ve),I.addNew||No(e.doc,D,null,null,I.extend),p&&!r||S&&b==9?setTimeout(function(){B.wrapper.ownerDocument.body.focus({preventScroll:!0}),B.input.focus()},20):B.input.focus())}),le=function(ve){Y=Y||Math.abs(n.clientX-ve.clientX)+Math.abs(n.clientY-ve.clientY)>=10},ue=function(){return Y=!0};p&&(B.scroller.draggable=!0),e.state.draggingText=re,re.copy=!I.moveOnDrag,B.scroller.dragDrop&&B.scroller.dragDrop(),Oe(B.wrapper.ownerDocument,"mouseup",re),Oe(B.wrapper.ownerDocument,"mousemove",le),Oe(B.scroller,"dragstart",ue),Oe(B.scroller,"drop",re),eo(e),setTimeout(function(){return B.input.focus()},20)}function rl(e,n,D){if(D=="char")return new Kr(n,n);if(D=="word")return e.findWordAt(n);if(D=="line")return new Kr(ut(n.line,0),Dt(e.doc,ut(n.line+1,0)));var I=D(e,n);return new Kr(I.from,I.to)}function Vl(e,n,D,I){var B=e.display,Y=e.doc;de(n);var re,le,ue=Y.sel,ve=ue.ranges;if(I.addNew&&!I.extend?(le=Y.sel.contains(D),le>-1?re=ve[le]:re=new Kr(D,D)):(re=Y.sel.primary(),le=Y.sel.primIndex),I.unit=="rectangle")I.addNew||(re=new Kr(D,D)),D=$n(e,n,!0,!0),le=-1;else{var je=rl(e,D,I.unit);I.extend?re=ns(re,je.anchor,je.head,I.extend):re=je}I.addNew?le==-1?(le=ve.length,bi(Y,Wi(e,ve.concat([re]),le),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[le].empty()&&I.unit=="char"&&!I.extend?(bi(Y,Wi(e,ve.slice(0,le).concat(ve.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=Y.sel):is(Y,le,re,ae):(le=0,bi(Y,new Ti([re],0),ae),ue=Y.sel);var Ue=D;function tt(Tt){if(It(Ue,Tt)==0)return;if(Ue=Tt,I.unit=="rectangle"){for(var Ft=[],Zt=e.options.tabSize,Gt=H(vt(Y,D.line).text,D.ch,Zt),Er=H(vt(Y,Tt.line).text,Tt.ch,Zt),cn=Math.min(Gt,Er),oi=Math.max(Gt,Er),Cn=Math.min(D.line,Tt.line),Pi=Math.min(e.lastLine(),Math.max(D.line,Tt.line));Cn<=Pi;Cn++){var Ri=vt(Y,Cn).text,Hn=ge(Ri,cn,Zt);cn==oi?Ft.push(new Kr(ut(Cn,Hn),ut(Cn,Hn))):Ri.length>Hn&&Ft.push(new Kr(ut(Cn,Hn),ut(Cn,ge(Ri,oi,Zt))))}Ft.length||Ft.push(new Kr(D,D)),bi(Y,Wi(e,ue.ranges.slice(0,le).concat(Ft),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Tt)}else{var Ii=re,ci=rl(e,Tt,I.unit),qn=Ii.anchor,Wn;It(ci.anchor,qn)>0?(Wn=ci.head,qn=fn(Ii.from(),ci.anchor)):(Wn=ci.anchor,qn=An(Ii.to(),ci.head));var Ln=ue.ranges.slice(0);Ln[le]=Yl(e,new Kr(Dt(Y,qn),Wn)),bi(Y,Wi(e,Ln,le),ae)}}var Qe=B.wrapper.getBoundingClientRect(),st=0;function ht(Tt){var Ft=++st,Zt=$n(e,Tt,!0,I.unit=="rectangle");if(!Zt)return;if(It(Zt,Ue)!=0){e.curOp.focus=G(),tt(Zt);var Gt=Pa(B,Y);(Zt.line>=Gt.to||Zt.lineQe.bottom?20:0;Er&&setTimeout(Pn(e,function(){if(st!=Ft)return;B.scroller.scrollTop+=Er,ht(Tt)}),50)}}function _t(Tt){e.state.selectingText=!1,st=Infinity,Tt&&(de(Tt),B.input.focus()),Ze(B.wrapper.ownerDocument,"mousemove",wt),Ze(B.wrapper.ownerDocument,"mouseup",Lt),Y.history.lastSelOrigin=null}var wt=Pn(e,function(Tt){Tt.buttons===0||!Ye(Tt)?_t(Tt):ht(Tt)}),Lt=Pn(e,_t);e.state.selectingText=Lt,Oe(B.wrapper.ownerDocument,"mousemove",wt),Oe(B.wrapper.ownerDocument,"mouseup",Lt)}function Yl(e,n){var D=n.anchor,I=n.head,B=vt(e.doc,D.line);if(It(D,I)==0&&D.sticky==I.sticky)return n;var Y=rt(B);if(!Y)return n;var re=Xe(Y,D.ch,D.sticky),le=Y[re];if(le.from!=D.ch&&le.to!=D.ch)return n;var ue=re+(le.from==D.ch==(le.level!=1)?0:1);if(ue==0||ue==Y.length)return n;var ve;if(I.line!=D.line)ve=(I.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var je=Xe(Y,I.ch,I.sticky),Ue=je-re||(I.ch-D.ch)*(le.level==1?-1:1);je==ue-1||je==ue?ve=Ue<0:ve=Ue>0}var tt=Y[ue+(ve?-1:0)],Qe=ve==(tt.level==1),st=Qe?tt.from:tt.to,ht=Qe?"after":"before";return D.ch==st&&D.sticky==ht?n:new Kr(new ut(D.line,st,ht),I)}function nl(e,n,D,I){var B,Y;if(n.touches)B=n.touches[0].clientX,Y=n.touches[0].clientY;else try{B=n.clientX,Y=n.clientY}catch(tt){return!1}if(B>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;I&&de(n);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(Y>le.bottom||!we(e,D))return Se(n);Y-=le.top-re.viewOffset;for(var ue=0;ue=B){var je=br(e.doc,Y),Ue=e.display.gutterSpecs[ue];return Ne(e,D,e,je,Ue.className,n),Se(n)}}}function cs(e,n){return nl(e,n,"gutterClick",!0)}function il(e,n){if(Bn(e.display,n)||$l(e,n))return;if(Ge(e,n,"contextmenu"))return;R||e.display.input.onContextMenu(n)}function $l(e,n){return we(e,"gutterContextMenu")?nl(e,n,"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-"),ur(e)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var n=e.optionHandlers;function D(I,B,Y,re){e.defaults[I]=B,Y&&(n[I]=re?function(le,ue,ve){ve!=Ja&&Y(le,ue,ve)}:Y)}e.defineOption=D,e.Init=Ja,D("value","",function(I,B){return I.setValue(B)},!0),D("mode",null,function(I,B){I.doc.modeOption=B,pa(I)},!0),D("indentUnit",2,pa,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(I){co(I),ur(I),tn(I)},!0),D("lineSeparator",null,function(I,B){if(I.doc.lineSep=B,!B)return;var Y=[],re=I.doc.first;I.doc.iter(function(ue){for(var ve=0;;){var je=ue.text.indexOf(B,ve);if(je==-1)break;ve=je+B.length,Y.push(ut(re,je))}re++});for(var le=Y.length-1;le>=0;le--)Xa(I.doc,B,Y[le],ut(Y[le].line,Y[le].ch+B.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(I,B,Y){I.state.specialChars=new RegExp(B.source+(B.test(" ")?"":"| "),"g"),Y!=Ja&&I.refresh()}),D("specialCharPlaceholder",Rr,function(I){return I.refresh()},!0),D("electricChars",!0),D("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(I,B){return I.getInputField().spellcheck=B},!0),D("autocorrect",!1,function(I,B){return I.getInputField().autocorrect=B},!0),D("autocapitalize",!1,function(I,B){return I.getInputField().autocapitalize=B},!0),D("rtlMoveVisually",!w),D("wholeLineUpdateBefore",!0),D("theme","default",function(I){al(I),Ji(I)},!0),D("keyMap","default",function(I,B,Y){var re=Ho(B),le=Y!=Ja&&Ho(Y);le&&le.detach&&le.detach(I,re),re.attach&&re.attach(I,le||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(I,B){I.display.gutterSpecs=wi(B,I.options.lineNumbers),Ji(I)},!0),D("fixedGutter",!0,function(I,B){I.display.gutters.style.left=B?yi(I.display)+"px":"0",I.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(I){return da(I)},!0),D("scrollbarStyle","native",function(I){Fa(I),da(I),I.display.scrollbars.setScrollTop(I.doc.scrollTop),I.display.scrollbars.setScrollLeft(I.doc.scrollLeft)},!0),D("lineNumbers",!1,function(I,B){I.display.gutterSpecs=wi(I.options.gutters,B),Ji(I)},!0),D("firstLineNumber",1,Ji,!0),D("lineNumberFormatter",function(I){return I},Ji,!0),D("showCursorWhenSelecting",!1,Qr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(I,B){B=="nocursor"&&(va(I),I.display.input.blur()),I.display.input.readOnlyChanged(B)}),D("screenReaderLabel",null,function(I,B){B=B===""?null:B,I.display.input.screenReaderLabelChanged(B)}),D("disableInput",!1,function(I,B){B||I.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,Qr,!0),D("singleCursorHeightPerLine",!0,Qr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(I,B){return I.doc.history.undoDepth=B}),D("historyEventDelay",1250),D("viewportMargin",10,function(I){return I.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(I,B){B||I.display.input.resetPosition()}),D("tabindex",null,function(I,B){return I.display.input.getField().tabIndex=B||""}),D("autofocus",null),D("direction","ltr",function(I,B){return I.doc.setDirection(B)},!0),D("phrases",null)}function Ql(e,n,D){var I=D&&D!=Ja;if(!n!=!I){var B=e.display.dragFunctions,Y=n?Oe:Ze;Y(e.display.scroller,"dragstart",B.start),Y(e.display.scroller,"dragenter",B.enter),Y(e.display.scroller,"dragover",B.over),Y(e.display.scroller,"dragleave",B.leave),Y(e.display.scroller,"drop",B.drop)}}function Zl(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),ji(e)),Ei(e),tn(e),ur(e),setTimeout(function(){return da(e)},100)}function wn(e,n){var D=this;if(!(this instanceof wn))return new wn(e,n);this.options=n=n?P(n):{},P(ol,n,!1);var I=n.value;typeof I=="string"?I=new Ai(I,n.mode,null,n.lineSeparator,n.direction):n.mode&&(I.modeOption=n.mode),this.doc=I;var B=new wn.inputStyles[n.inputStyle](this),Y=this.display=new Da(e,I,B,n);Y.wrapper.CodeMirror=this,al(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 V,keySeq:null,specialChars:null},n.autofocus&&!a&&Y.input.focus(),S&&b<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Il(),aa(this),this.curOp.forceUpdate=!0,vs(this,I),n.autofocus&&!a||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&na(D)},20):va(this);for(var re in Ko)Ko.hasOwnProperty(re)&&Ko[re](this,n[re],Ja);Qn(this),n.finishInit&&n.finishInit(this);for(var le=0;le20*20}Oe(n.scroller,"touchstart",function(ue){if(!Ge(e,ue)&&!Y(ue)&&!cs(e,ue)){n.input.ensurePolled(),clearTimeout(D);var ve=+new Date;n.activeTouch={start:ve,moved:!1,prev:ve-I.end<=300?I:null},ue.touches.length==1&&(n.activeTouch.left=ue.touches[0].pageX,n.activeTouch.top=ue.touches[0].pageY)}}),Oe(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),Oe(n.scroller,"touchend",function(ue){var ve=n.activeTouch;if(ve&&!Bn(n,ue)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var je=e.coordsChar(n.activeTouch,"page"),Ue;!ve.prev||re(ve,ve.prev)?Ue=new Kr(je,je):!ve.prev.prev||re(ve,ve.prev.prev)?Ue=e.findWordAt(je):Ue=new Kr(ut(je.line,0),Dt(e.doc,ut(je.line+1,0))),e.setSelection(Ue.anchor,Ue.head),e.focus(),de(ue)}B()}),Oe(n.scroller,"touchcancel",B),Oe(n.scroller,"scroll",function(){n.scroller.clientHeight&&(_a(e,n.scroller.scrollTop),Bi(e,n.scroller.scrollLeft,!0),Ne(e,"scroll",e))}),Oe(n.scroller,"mousewheel",function(ue){return lo(e,ue)}),Oe(n.scroller,"DOMMouseScroll",function(ue){return lo(e,ue)}),Oe(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(ue){Ge(e,ue)||Ie(ue)},over:function(ue){Ge(e,ue)||(Rl(e,ue),Ie(ue))},start:function(ue){return Al(e,ue)},drop:Pn(e,Cl),leave:function(ue){Ge(e,ue)||Hs(e)}};var le=n.input.getField();Oe(le,"keyup",function(ue){return Zs.call(e,ue)}),Oe(le,"keydown",Pn(e,Qs)),Oe(le,"keypress",Pn(e,el)),Oe(le,"focus",function(ue){return na(e,ue)}),Oe(le,"blur",function(ue){return va(e,ue)})}var ds=[];wn.defineInitHook=function(e){return ds.push(e)};function To(e,n,D,I){var B=e.doc,Y;D==null&&(D="add"),D=="smart"&&(B.mode.indent?Y=bn(e,n).state:D="prev");var re=e.options.tabSize,le=vt(B,n),ue=H(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ve=le.text.match(/^\s*/)[0],je;if(!I&&!/\S/.test(le.text))je=0,D="not";else if(D=="smart"&&(je=B.mode.indent(Y,le.text.slice(ve.length),le.text),je==ce||je>150)){if(!I)return;D="prev"}D=="prev"?n>B.first?je=H(vt(B,n-1).text,null,re):je=0:D=="add"?je=ue+e.options.indentUnit:D=="subtract"?je=ue-e.options.indentUnit:typeof D=="number"&&(je=ue+D),je=Math.max(0,je);var Ue="",tt=0;if(e.options.indentWithTabs)for(var Qe=Math.floor(je/re);Qe;--Qe)tt+=re,Ue+=" ";if(ttre,ue=bt(n),ve=null;if(le&&I.ranges.length>1)if(qi&&qi.text.join(` `)==n){if(I.ranges.length%qi.text.length==0){ve=[];for(var je=0;je=0;tt--){var Qe=I.ranges[tt],st=Qe.from(),ht=Qe.to();Qe.empty()&&(D&&D>0?st=ut(st.line,st.ch-D):e.state.overwrite&&!le?ht=ut(ht.line,Math.min(vt(Y,ht.line).text.length,ht.ch+te(ue).length)):le&&qi&&qi.lineWise&&qi.text.join(` `)==ue.join(` `)&&(st=ht=ut(st.line,0)));var _t={from:st,to:ht,text:ve?ve[tt%ve.length]:ue,origin:B||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Ga(e.doc,_t),fr(e,"inputRead",e,_t)}n&&!le&&ll(e,n),ya(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ue),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,n){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&xi(n,function(){return fs(n,D,0,null,"paste")}),!0}function ll(e,n){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,I=D.ranges.length-1;I>=0;I--){var B=D.ranges[I];if(B.head.ch>100||I&&D.ranges[I-1].head.line==B.head.line)continue;var Y=e.getModeAt(B.head),re=!1;if(Y.electricChars){for(var le=0;le-1){re=To(e,B.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(vt(e.doc,B.head.line).text.slice(0,B.head.ch))&&(re=To(e,B.head.line,"smart")));re&&fr(e,"electricInput",e,B.head.line)}}function ul(e){for(var n=[],D=[],I=0;IY&&(To(this,le.head.line,I,!0),Y=le.head.line,re==this.doc.sel.primIndex&&ya(this));else{var ue=le.from(),ve=le.to(),je=Math.max(Y,ue.line);Y=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ue=je;Ue0&&is(this.doc,re,new Kr(ue,tt[re].to()),he)}}}),getTokenAt:function(I,B){return fi(this,I,B)},getLineTokens:function(I,B){return fi(this,ut(I),B,!0)},getTokenTypeAt:function(I){I=Dt(this.doc,I);var B=Tn(this,vt(this.doc,I.line)),Y=0,re=(B.length-1)/2,le=I.ch,ue;if(le==0)ue=B[2];else for(;;){var ve=Y+re>>1;if((ve?B[ve*2-1]:0)>=le)re=ve;else if(B[ve*2+1]ue&&(I=ue,re=!0),le=vt(this.doc,I)}else le=I;return Lr(this,le,{top:0,left:0},B||"page",Y||re).top+(re?this.doc.height-ni(le):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(I,B,Y,re,le){var ue=this.display;I=wr(this,Dt(this.doc,I));var ve=I.bottom,je=I.left;if(B.style.position="absolute",B.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(B),ue.sizer.appendChild(B),re=="over")ve=I.top;else if(re=="above"||re=="near"){var Ue=Math.max(ue.wrapper.clientHeight,this.doc.height),tt=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||I.bottom+B.offsetHeight>Ue)&&I.top>B.offsetHeight?ve=I.top-B.offsetHeight:I.bottom+B.offsetHeight<=Ue&&(ve=I.bottom),je+B.offsetWidth>tt&&(je=tt-B.offsetWidth)}B.style.top=ve+"px",B.style.left=B.style.right="",le=="right"?(je=ue.sizer.clientWidth-B.offsetWidth,B.style.right="0px"):(le=="left"?je=0:le=="middle"&&(je=(ue.sizer.clientWidth-B.offsetWidth)/2),B.style.left=je+"px"),Y&&Oo(this,{left:je,top:ve,right:je+B.offsetWidth,bottom:ve+B.offsetHeight})},triggerOnKeyDown:ui(Qs),triggerOnKeyPress:ui(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ui(tl),execCommand:function(I){if(_o.hasOwnProperty(I))return _o[I].call(null,this)},triggerElectric:ui(function(I){ll(this,I)}),findPosH:function(I,B,Y,re){var le=1;B<0&&(le=-1,B=-B);for(var ue=Dt(this.doc,I),ve=0;ve0&&je(Y.charAt(re-1));)--re;for(;le.5||this.options.lineWrapping)&&Ei(this),Ne(this,"refresh",this)}),swapDoc:ui(function(I){var B=this.doc;return B.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,I),ur(this),this.display.input.reset(),ba(this,I.scrollLeft,I.scrollTop),this.curOp.forceScroll=!0,fr(this,"swapDoc",this,B),B}),phrase:function(I){var B=this.options.phrases;return B&&Object.prototype.hasOwnProperty.call(B,I)?B[I]:I},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}},Ae(e),e.registerHelper=function(I,B,Y){D.hasOwnProperty(I)||(D[I]=e[I]={_global:[]}),D[I][B]=Y},e.registerGlobalHelper=function(I,B,Y,re){e.registerHelper(I,B,re),D[I]._global.push({pred:Y,val:re})}}function hs(e,n,D,I,B){var Y=n,re=D,le=vt(e,n.line),ue=B&&e.direction=="rtl"?-D:D;function ve(){var Lt=n.line+ue;return Lt=e.first+e.size?!1:(n=new ut(Lt,n.ch,n.sticky),le=vt(e,Lt))}function je(Lt){var Tt;if(I=="codepoint"){var Ft=le.text.charCodeAt(n.ch+(I>0?0:-1));isNaN(Ft)?Tt=null:Tt=new ut(n.line,Math.max(0,Math.min(le.text.length,n.ch+D*(Ft>=55296&&Ft<56320?2:1))),-D)}else B?Tt=Pl(e.cm,le,n,D):Tt=os(le,n,D);if(Tt==null)if(!Lt&&ve())n=ss(B,e.cm,le,n.line,ue);else return!1;else n=Tt;return!0}if(I=="char"||I=="codepoint")je();else if(I=="column")je(!0);else if(I=="word"||I=="group")for(var Ue=null,tt=I=="group",Qe=e.cm&&e.cm.getHelper(n,"wordChars"),st=!0;!(D<0&&!je(!st));st=!1){var ht=le.text.charAt(n.ch)||` `,_t=X(ht,Qe)?"w":tt&&ht==` `?"n":!tt||/\s/.test(ht)?null:"p";if(tt&&!st&&!_t&&(_t="s"),Ue&&Ue!=_t){D<0&&(D=1,je(),n.sticky="after");break}if(_t&&(Ue=_t),D>0&&!je(!st))break}var wt=Fo(e,n,Y,re,!0);return Br(Y,wt)&&(wt.hitSide=!0),wt}function fl(e,n,D,I){var B=e.doc,Y=n.left,re;if(I=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Dn(e.display),3);re=(D>0?n.bottom:n.top)+D*ue}else I=="line"&&(re=D>0?n.bottom+3:n.top-3);for(var ve;!(ve=Or(e,Y,re),!ve.outside);){if(D<0?re<=0:re>=B.height){ve.hitSide=!0;break}re+=D*5}return ve}var rn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};rn.prototype.init=function(e){var n=this,D=this,I=D.cm,B=D.div=e.lineDiv;cl(B,I.options.spellcheck,I.options.autocorrect,I.options.autocapitalize);function Y(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==B)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Oe(B,"paste",function(le){if(!Y(le)||Ge(I,le)||sl(le,I))return;b<=11&&setTimeout(Pn(I,function(){return n.updateFromDOM()}),20)}),Oe(B,"compositionstart",function(le){n.composing={data:le.data,done:!1}}),Oe(B,"compositionupdate",function(le){n.composing||(n.composing={data:le.data,done:!1})}),Oe(B,"compositionend",function(le){n.composing&&(le.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Oe(B,"touchstart",function(){return D.forceCompositionEnd()}),Oe(B,"input",function(){n.composing||n.readFromDOMSoon()});function re(le){if(!Y(le)||Ge(I,le))return;if(I.somethingSelected())zo({lineWise:!1,text:I.getSelections()}),le.type=="cut"&&I.replaceSelection("",null,"cut");else if(I.options.lineWiseCopyCut){var ue=ul(I);zo({lineWise:!0,text:ue.text}),le.type=="cut"&&I.operation(function(){I.setSelections(ue.ranges,0,he),I.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ve=qi.text.join(` `);if(le.clipboardData.setData("Text",ve),le.clipboardData.getData("Text")==ve){le.preventDefault();return}}var je=dl(),Ue=je.firstChild;I.display.lineSpace.insertBefore(je,I.display.lineSpace.firstChild),Ue.value=qi.text.join(` `);var tt=document.activeElement;z(Ue),setTimeout(function(){I.display.lineSpace.removeChild(je),tt.focus(),tt==B&&D.showPrimarySelection()},50)}Oe(B,"copy",re),Oe(B,"cut",re)},rn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},rn.prototype.prepareSelection=function(){var e=Vi(this.cm,!1);return e.focus=document.activeElement==this.div,e},rn.prototype.showSelection=function(e,n){if(!e||!this.cm.display.view.length)return;(e.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(e)},rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rn.prototype.showPrimarySelection=function(){var e=this.getSelection(),n=this.cm,D=n.doc.sel.primary(),I=D.from(),B=D.to();if(n.display.viewTo==n.display.viewFrom||I.line>=n.display.viewTo||B.line=n.display.viewFrom&&hl(n,I)||{node:le[0].measure.map[2],offset:0},ve=B.linee.firstLine()&&(I=ut(I.line-1,vt(e.doc,I.line-1).length)),B.ch==vt(e.doc,B.line).text.length&&B.linen.viewTo-1)return!1;var Y,re,le;I.line==n.viewFrom||(Y=un(e,I.line))==0?(re=Rt(n.view[0].line),le=n.view[0].node):(re=Rt(n.view[Y].line),le=n.view[Y-1].node.nextSibling);var ue=un(e,B.line),ve,je;if(ue==n.view.length-1?(ve=n.viewTo-1,je=n.lineDiv.lastChild):(ve=Rt(n.view[ue+1].line)-1,je=n.view[ue+1].node.previousSibling),!le)return!1;for(var Ue=e.doc.splitLines(ru(e,le,je,re,ve)),tt=yr(e.doc,ut(re,0),ut(ve,vt(e.doc,ve).text.length));Ue.length>1&&tt.length>1;)if(te(Ue)==te(tt))Ue.pop(),tt.pop(),ve--;else if(Ue[0]==tt[0])Ue.shift(),tt.shift(),re++;else break;for(var Qe=0,st=0,ht=Ue[0],_t=tt[0],wt=Math.min(ht.length,_t.length);QeI.ch&&Lt.charCodeAt(Lt.length-st-1)==Tt.charCodeAt(Tt.length-st-1);)Qe--,st++;Ue[Ue.length-1]=Lt.slice(0,Lt.length-st).replace(/^\u200b+/,""),Ue[0]=Ue[0].slice(Qe).replace(/\u200b+$/,"");var Zt=ut(re,Qe),Gt=ut(ve,tt.length?te(tt).length-st:0);if(Ue.length>1||Ue[0]||It(Zt,Gt))return Xa(e.doc,Ue,Zt,Gt,"+input"),!0},rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},rn.prototype.reset=function(){this.forceCompositionEnd()},rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},rn.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)},rn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&xi(this.cm,function(){return tn(e.cm)})},rn.prototype.setUneditable=function(e){e.contentEditable="false"},rn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},rn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},rn.prototype.onContextMenu=function(){},rn.prototype.resetPosition=function(){},rn.prototype.needsContentAttribute=!0;function hl(e,n){var D=We(e,n.line);if(!D||D.hidden)return null;var I=vt(e.doc,n.line),B=ye(D,I,n.line),Y=rt(I,e.doc.direction),re="left";if(Y){var le=Xe(Y,n.ch);re=le%2?"right":"left"}var ue=gt(B.map,n.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var n=e;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function Qa(e,n){return n&&(e.bad=!0),e}function ru(e,n,D,I,B){var Y="",re=!1,le=e.doc.lineSeparator(),ue=!1;function ve(Qe){return function(st){return st.id==Qe}}function je(){re&&(Y+=le,ue&&(Y+=le),re=ue=!1)}function Ue(Qe){Qe&&(je(),Y+=Qe)}function tt(Qe){if(Qe.nodeType==1){var st=Qe.getAttribute("cm-text");if(st){Ue(st);return}var ht=Qe.getAttribute("cm-marker"),_t;if(ht){var wt=e.findMarks(ut(I,0),ut(B+1,0),ve(+ht));wt.length&&(_t=wt[0].find(0))&&Ue(yr(e.doc,_t.from,_t.to).join(le));return}if(Qe.getAttribute("contenteditable")=="false")return;var Lt=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;Lt&&je();for(var Tt=0;Tt=9&&n.hasSelection&&(n.hasSelection=null),D.poll()}),Oe(B,"paste",function(re){if(Ge(I,re)||sl(re,I))return;I.state.pasteIncoming=+new Date,D.fastPoll()});function Y(re){if(Ge(I,re))return;if(I.somethingSelected())zo({lineWise:!1,text:I.getSelections()});else if(I.options.lineWiseCopyCut){var le=ul(I);zo({lineWise:!0,text:le.text}),re.type=="cut"?I.setSelections(le.ranges,null,he):(D.prevInput="",B.value=le.text.join(` `),z(B))}else return;re.type=="cut"&&(I.state.cutIncoming=+new Date)}Oe(B,"cut",Y),Oe(B,"copy",Y),Oe(e.scroller,"paste",function(re){if(Bn(e,re)||Ge(I,re))return;if(!B.dispatchEvent){I.state.pasteIncoming=+new Date,D.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,B.dispatchEvent(le)}),Oe(e.lineSpace,"selectstart",function(re){Bn(e,re)||de(re)}),Oe(B,"compositionstart",function(){var re=I.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:re,range:I.markText(re,I.getCursor("to"),{className:"CodeMirror-composing"})}}),Oe(B,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},jn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=this.cm,n=e.display,D=e.doc,I=Vi(e);if(e.options.moveInputWithCursor){var B=wr(e,D.sel.primary().head,"div"),Y=n.wrapper.getBoundingClientRect(),re=n.lineDiv.getBoundingClientRect();I.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,B.top+re.top-Y.top)),I.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,B.left+re.left-Y.left))}return I},jn.prototype.showSelection=function(e){var n=this.cm,D=n.display;E(D.cursorDiv,e.cursors),E(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},jn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var n=this.cm;if(n.somethingSelected()){this.prevInput="";var D=n.getSelection();this.textarea.value=D,n.state.focused&&z(this.textarea),S&&b>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&b>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},jn.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0;function D(){var I=n.poll();!I&&!e?(e=!0,n.polling.set(60,D)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,D)},jn.prototype.poll=function(){var e=this,n=this.cm,D=this.textarea,I=this.prevInput;if(this.contextMenuPending||!n.state.focused||ft(D)&&!I&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var B=D.value;if(B==I&&!n.somethingSelected())return!1;if(S&&b>=9&&this.hasSelection===B||c&&/[\uf700-\uf7ff]/.test(B))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var Y=B.charCodeAt(0);if(Y==8203&&!I&&(I="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(I.length,B.length);re1e3||B.indexOf(` `)>-1?D.value=e.prevInput="":e.prevInput=B,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){S&&b>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(e){var n=this,D=n.cm,I=D.display,B=n.textarea;n.contextMenuPending&&n.contextMenuPending();var Y=$n(D,e),re=I.scroller.scrollTop;if(!Y||l)return;var le=D.options.resetSelectionOnContextMenu;le&&D.doc.sel.contains(Y)==-1&&Pn(D,bi)(D.doc,Qi(Y),he);var ue=B.style.cssText,ve=n.wrapper.style.cssText,je=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",B.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-je.top-5)+"px; left: "+(e.clientX-je.left-5)+`px; z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ue;p&&(Ue=window.scrollY),I.input.focus(),p&&window.scrollTo(null,Ue),I.input.reset(),D.somethingSelected()||(B.value=n.prevInput=" "),n.contextMenuPending=Qe,I.selForContextMenu=D.doc.sel,clearTimeout(I.detectingSelectAll);function tt(){if(B.selectionStart!=null){var ht=D.somethingSelected(),_t="\u200B"+(ht?B.value:"");B.value="\u21DA",B.value=_t,n.prevInput=ht?"":"\u200B",B.selectionStart=1,B.selectionEnd=_t.length,I.selForContextMenu=D.doc.sel}}function Qe(){if(n.contextMenuPending!=Qe)return;if(n.contextMenuPending=!1,n.wrapper.style.cssText=ve,B.style.cssText=ue,S&&b<9&&I.scrollbars.setScrollTop(I.scroller.scrollTop=re),B.selectionStart!=null){(!S||S&&b<9)&&tt();var ht=0,_t=function(){I.selForContextMenu==D.doc.sel&&B.selectionStart==0&&B.selectionEnd>0&&n.prevInput=="\u200B"?Pn(D,Is)(D):ht++<10?I.detectingSelectAll=setTimeout(_t,500):(I.selForContextMenu=null,I.input.reset())};I.detectingSelectAll=setTimeout(_t,200)}}if(S&&b>=9&&tt(),R){Ie(e);var st=function(){Ze(window,"mouseup",st),setTimeout(Qe,20)};Oe(window,"mouseup",st)}else setTimeout(Qe,50)},jn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function iu(e,n){if(n=n?P(n):{},n.value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),n.autofocus==null){var D=G();n.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function I(){e.value=le.getValue()}var B;if(e.form&&(Oe(e.form,"submit",I),!n.leaveSubmitMethodAlone)){var Y=e.form;B=Y.submit;try{var re=Y.submit=function(){I(),Y.submit=B,Y.submit(),Y.submit=re}}catch(ue){}}n.finishInit=function(ue){ue.save=I,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,I(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(Ze(e.form,"submit",I),!n.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=B))}},e.style.display="none";var le=wn(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},n);return le}function au(e){e.off=Ze,e.on=Oe,e.wheelEventPixels=so,e.Doc=Ai,e.splitLines=bt,e.countColumn=H,e.findColumn=ge,e.isWordChar=J,e.Pass=ce,e.signal=Ne,e.Line=ii,e.changeEnd=Zi,e.scrollbarModel=io,e.Pos=ut,e.cmpPos=It,e.modes=Qt,e.mimeModes=kt,e.resolveMode=pt,e.getMode=dt,e.modeExtensions=At,e.extendMode=Mt,e.copyState=rr,e.startState=yt,e.innerMode=Fn,e.commands=_o,e.keyMap=ma,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Ya,e.normalizeKeyMap=kl,e.StringStream=St,e.SharedTextMarker=vo,e.TextMarker=Ta,e.LineWidget=go,e.e_preventDefault=de,e.e_stopPropagation=_e,e.e_stop=Ie,e.addClass=K,e.contains=A,e.rmClass=g,e.keyNames=Sa}Jl(wn),eu(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Ai.prototype)Ai.prototype.hasOwnProperty(Xo)&&q(ou,Xo)<0&&(wn.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ai.prototype[Xo]));return Ae(Ai),wn.inputStyles={textarea:jn,contenteditable:rn},wn.defineMode=function(e){!wn.defaults.mode&&e!="null"&&(wn.defaults.mode=e),Et.apply(this,arguments)},wn.defineMIME=Vt,wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(e,n){wn.prototype[e]=n},wn.defineDocExtension=function(e,n){Ai.prototype[e]=n},wn.fromTextArea=iu,au(wn),wn.version="5.58.2",wn})},WYAk:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){(function(){var v=N,O=v.lib,M=O.Base,y=v.enc,m=y.Utf8,S=v.algo,b=S.HMAC=M.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=m.parse(d));var t=p.blockSize,l=t*4;d.sigBytes>l&&(d=p.finalize(d)),d.clamp();for(var r=this._oKey=d.clone(),i=this._iKey=d.clone(),o=r.words,s=i.words,u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,xe=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(ae&&G[xe])return G[xe];var ge=window.getComputedStyle(he),oe=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),se=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),te=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),be=A.map(function(ie){return"".concat(ie,":").concat(ge.getPropertyValue(ie))}).join(";"),ee={sizingStyle:be,paddingSize:se,borderSize:te,boxSizing:oe};return ae&&xe&&(G[xe]=ee),ee}function z(he){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),he.getAttribute("wrap")?K.setAttribute("wrap",he.getAttribute("wrap")):K.removeAttribute("wrap");var oe=W(he,ae),se=oe.paddingSize,te=oe.borderSize,be=oe.boxSizing,ee=oe.sizingStyle;K.setAttribute("style","".concat(ee,";").concat(L)),K.value=he.value||he.placeholder||"";var ie=Number.MIN_SAFE_INTEGER,Ee=Number.MAX_SAFE_INTEGER,ne=K.scrollHeight,J;if(be==="border-box"?ne+=te:be==="content-box"&&(ne-=se),xe!==null||ge!==null){K.value=" ";var X=K.scrollHeight-se;xe!==null&&(ie=X*xe,be==="border-box"&&(ie=ie+se+te),ne=Math.max(ie,ne)),ge!==null&&(Ee=X*ge,be==="border-box"&&(Ee=Ee+se+te),J=ne>Ee?"":"hidden",ne=Math.min(Ee,ne))}return{height:ne,minHeight:ie,maxHeight:Ee,overflowY:J,resize:"none"}}var U=j("Gytx"),P=j.n(U),H;(function(he){he[he.NONE=0]="NONE",he[he.RESIZING=1]="RESIZING",he[he.RESIZED=2]="RESIZED"})(H||(H={}));var V=function(he){Object(M.a)(xe,he);var ae=Object(y.a)(xe);function xe(ge){var oe;return Object(v.a)(this,xe),oe=ae.call(this,ge),oe.nextFrameActionId=void 0,oe.resizeFrameId=void 0,oe.textArea=void 0,oe.saveTextArea=function(se){oe.textArea=se},oe.handleResize=function(se){var te=oe.state.resizeStatus,be=oe.props,ee=be.autoSize,ie=be.onResize;if(te!==H.NONE)return;typeof ie=="function"&&ie(se),ee&&oe.resizeOnNextFrame()},oe.resizeOnNextFrame=function(){cancelAnimationFrame(oe.nextFrameActionId),oe.nextFrameActionId=requestAnimationFrame(oe.resizeTextarea)},oe.resizeTextarea=function(){var se=oe.props.autoSize;if(!se||!oe.textArea)return;var te=se.minRows,be=se.maxRows,ee=z(oe.textArea,!1,te,be);oe.setState({textareaStyles:ee,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(oe.resizeFrameId),oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:H.RESIZED},function(){oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:H.NONE}),oe.fixFirefoxAutoScroll()})})})})},oe.renderTextArea=function(){var se=oe.props,te=se.prefixCls,be=te===void 0?"rc-textarea":te,ee=se.autoSize,ie=se.onResize,Ee=se.className,ne=se.disabled,J=oe.state,X=J.textareaStyles,Q=J.resizeStatus,me=Object(E.a)(oe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=k()(be,Ee,Object(b.a)({},"".concat(be,"-disabled"),ne));"value"in me&&(me.value=me.value||"");var Te=Object(S.a)(Object(S.a)(Object(S.a)({},oe.props.style),X),Q===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:oe.handleResize,disabled:!(ee||ie)},m.createElement("textarea",Object(N.a)({},me,{className:fe,style:Te,ref:oe.saveTextArea})))},oe.state={textareaStyles:{},resizeStatus:H.NONE},oe}return Object(O.a)(xe,[{key:"componentDidUpdate",value:function(oe){(oe.value!==this.props.value||!P()(oe.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 oe=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(oe,se)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),xe}(m.Component),q=V,Z=function(he){Object(M.a)(xe,he);var ae=Object(y.a)(xe);function xe(ge){var oe;Object(v.a)(this,xe),oe=ae.call(this,ge),oe.resizableTextArea=void 0,oe.focus=function(){oe.resizableTextArea.textArea.focus()},oe.saveTextArea=function(te){oe.resizableTextArea=te},oe.handleChange=function(te){var be=oe.props.onChange;oe.setValue(te.target.value,function(){oe.resizableTextArea.resizeTextarea()}),be&&be(te)},oe.handleKeyDown=function(te){var be=oe.props,ee=be.onPressEnter,ie=be.onKeyDown;te.keyCode===13&&ee&&ee(te),ie&&ie(te)};var se=typeof ge.value=="undefined"||ge.value===null?ge.defaultValue:ge.value;return oe.state={value:se},oe}return Object(O.a)(xe,[{key:"setValue",value:function(oe,se){"value"in this.props||this.setState({value:oe},se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(q,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(oe){return"value"in oe?{value:oe.value}:null}}]),xe}(m.Component),ce=$.default=Z},ZD9Y:function(F,$,j){"use strict";var N=j("BoS7"),v=j("Sdc0"),O=j("OaEy"),M=j("2fM7"),y=j("cDcd"),m=j.n(y),S=j("lOMy"),b=j.n(S),p=M.a.Option;$.a=function(d){var t=d.onFontSizeChange,l=d.cmFontSize,r=d.cmCodeMode,i=d.onCodeModeChange,o=d.onTabToSpace,s=d.className,u=s===void 0?"":s,a=d.tabToSpace,c=d.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(u)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(M.a,{bordered:!1,size:"small",value:r,onChange:i},m.a.createElement(p,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(p,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(M.a,{bordered:!1,size:"small",value:l,onChange:t},m.a.createElement(p,{value:12},"12px"),m.a.createElement(p,{value:14},"14px"),m.a.createElement(p,{value:16},"16px"),m.a.createElement(p,{value:18},"18px"),m.a.createElement(p,{value:20},"20px"),m.a.createElement(p,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(v.a,{checked:a,onChange:o}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),c)}},ZW9T:function(F,$,j){"use strict";j.d($,"a",function(){return z});var N=j("k1fw"),v=j("miYZ"),O=j("tsqr"),M=j("rAM+"),y=j("tJVT"),m=j("PpiC"),S=j("cDcd"),b=j.n(S),p=j("bdgK"),d=j("oBTY"),t=j("9og8"),l=j("WmNS"),r=j.n(l),i={keywords:["print","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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},s={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"for",content:["for( ; ; ){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)}]},u={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},a=j("5VLF"),c=j.n(a),f={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},w=function(P,H){return H.map(function(V){return{label:V,kind:P.languages.CompletionItemKind.Keyword,insertText:V}})},_=function(P){return Object.keys(f.tables).map(function(H){return{label:H,kind:P.languages.CompletionItemKind.Variable,insertText:H}})},h=function(P,H){var V=f.tables[P];return V?V.map(function(q){return{label:q,kind:H.languages.CompletionItemKind.Field,insertText:q}}):[]};function R(U,P,H,V,q){var Z=P.getWordUntilPosition(H),ce={startLineNumber:H.lineNumber,endLineNumber:H.lineNumber,startColumn:Z.startColumn,endColumn:Z.endColumn},he=V.map(function(ae){return{label:ae,kind:U.languages.CompletionItemKind.Keyword,insertText:ae,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}});return q.map(function(ae){he.push(Object(N.a)(Object(N.a)({},ae),{},{range:ce}))}),he}var C=function(U){f.languages.map(function(q){return U.languages.registerDocumentFormattingEditProvider(q,{provideDocumentFormattingEdits:function(ce,he,ae){return Object(t.a)(r.a.mark(function xe(){var ge;return r.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ge=c()(ce.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),se.abrupt("return",[{range:ce.getFullModelRange(),text:ge}]);case 2:case"end":return se.stop()}},xe)}))()}}),q});var P=s.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),H=u.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),V=o.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(d.a)(s.keywords),Object(d.a)(s.quickKey.map(function(q){return q.label}))),provideCompletionItems:function(Z,ce){var he=Z.getValueInRange({startLineNumber:ce.lineNumber,startColumn:1,endLineNumber:ce.lineNumber,endColumn:ce.column}),ae=he.match(/cu/gim);console.log("match:",ae,ce,he,Z);var xe=[],ge=ce.lineNumber,oe=ce.column,se=Z.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:oe}),te=se.trim().split(/\s+/),be=te[te.length-1];if(be.endsWith(".")){var ee=be.slice(0,be.length-1);Object.keys(f.tables).includes(ee)&&(xe=Object(d.a)(h(ee,U)))}else be==="."?xe=[]:xe=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,s.keywords)),Object(d.a)(P));return{suggestions:xe}}}),U.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(d.a)(i.keywords)),provideCompletionItems:function(Z,ce){var he=Z.getValueInRange({startLineNumber:ce.lineNumber,startColumn:1,endLineNumber:ce.lineNumber,endColumn:ce.column}),ae=he.match(/cu/gim);console.log("match:",ae,ce,he,Z);var xe=[],ge=ce.lineNumber,oe=ce.column,se=Z.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:oe}),te=se.trim().split(/\s+/),be=te[te.length-1];if(be.endsWith(".")){var ee=be.slice(0,be.length-1);Object.keys(f.tables).includes(ee)&&(xe=Object(d.a)(h(ee,U)))}else be==="."?xe=[]:xe=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,i.keywords)));return{suggestions:xe}}}),U.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(d.a)(o.keywords)),provideCompletionItems:function(Z,ce){var he=[],ae=ce.lineNumber,xe=ce.column,ge=Z.getValueInRange({startLineNumber:ae,startColumn:0,endLineNumber:ae,endColumn:xe}),oe=ge.trim().split(/\s+/),se=oe[oe.length-1];if(se.endsWith(".")){var te=se.slice(0,se.length-1);Object.keys(f.tables).includes(te)&&(he=Object(d.a)(h(te,U)))}else se==="."?he=[]:he=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,o.keywords)),Object(d.a)(V));return{suggestions:he}}}),U.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(d.a)(u.keywords)),provideCompletionItems:function(Z,ce){var he=[],ae=ce.lineNumber,xe=ce.column,ge=Z.getValueInRange({startLineNumber:ae,startColumn:0,endLineNumber:ae,endColumn:xe}),oe=ge.trim().split(/\s+/),se=oe[oe.length-1];if(se.endsWith(".")){var te=se.slice(0,se.length-1);Object.keys(f.tables).includes(te)&&(he=Object(d.a)(h(te,U)))}else se==="."?he=[]:he=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,u.keywords)),Object(d.a)(H));return{suggestions:he}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=j("LvDl"),E=j("+ua5");function T(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function k(){}var L=!1,A={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function G(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=U;if(Array.isArray(U)){for(var H=0;H0||rr.target.offsetWidth>0)&&Ne.current.instance.layout()}}catch(Fn){At.e(Fn)}finally{At.f()}}),pt.observe(Ze.current)),pt}function ke(){O.b.warn(decodeURIComponent(g))}var Ye=function(){var dt=Ne.current.instance;if(Z!=null&&dt&&_e){var At=dt.getModel();At&&Z!==At.getValue()&&(L=!0,At.setValue(Z),dt.layout(),L=!1)}};Object(S.useEffect)(function(){Ge.current&&clearTimeout(Ge.current),Ge.current=setTimeout(function(){Ye()},500)},[Z,_e,Ne.current]),Object(S.useEffect)(function(){if(rt&&Ne.current&&Ne.current.instance){var pt=Ne.current.instance;pt.changeViewZones(function(At){var Mt=document.createElement("div");Mt.style.padding="10px 20px",Mt.style.width="calc(100% - 20px)",Mt.className="my-error-line-wrp",Mt.innerHTML=Oe,At.addZone({afterLineNumber:rt||11,heightInLines:3,domNode:Mt})});var dt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};pt.addOverlayWidget(dt),pt.revealPositionInCenter({lineNumber:20,column:1})}},[rt,Ne.current,_e]);function nt(){var pt=Ne.current.instance;if(pt){var dt=pt.getSelection(),At=Ne.current.pastePos||{},Mt=new K.Range(At.startLineNumber||dt.endLineNumber,At.startColumn||dt.endColumn,At.endLineNumber||dt.endLineNumber,At.endColumn||dt.endColumn);setTimeout(function(){pt.executeEdits("",[{range:Mt,text:""}])},300)}}function lt(pt){(window.navigator.platform.match("Mac")?pt.metaKey:pt.ctrlKey)&&pt.keyCode==83&&(pt.preventDefault(),Ee())}var at=function(){if(J&&Ne.current.instance){var dt=Ne.current.instance.getContentHeight();Et(dt0||Te.target.offsetWidth>0)&&J.layout()}}catch(ze){me.e(ze)}finally{me.f()}}),X.observe(ge.current)),X}Object(S.useEffect)(function(){ge.current&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(J){K=J;var X=K.editor.createDiffEditor(ge.current,Object(N.a)(Object(N.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},xe),{},{wordWrap:!0}));be(X);var Q=ee(X);return function(){X.dispose();var me=X.getModel();me&&me.dispose(),Q.unobserve(ge.current)}})},[]),Object(S.useEffect)(function(){te&&te.setModel({original:K.editor.createModel(Z,he),modified:K.editor.createModel(ce,he)})},[Z,ce,he,te]);var ie=T(H),Ee=T(q),ne={width:ie,height:Ee};return b.a.createElement("div",{className:"my-diff-editor",ref:ge,style:ne})}},ZpRC:function(F,$,j){"use strict";function N(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function v(t,l){return(!l||t!=="hidden")&&t!=="visible"&&t!=="clip"}function O(t,l){if(t.clientHeightl||s>t&&u=l&&a>=r?s-t-i:u>l&&ar?u-l+o:0}var y=function(t,l){var r=window,i=l.scrollMode,o=l.block,s=l.inline,u=l.boundary,a=l.skipOverflowHiddenElements,c=typeof u=="function"?u:function(X){return X!==u};if(!N(t))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,w=[],_=t;N(_)&&c(_);){if((_=_.parentElement)===f){w.push(_);break}_!=null&&_===document.body&&O(_)&&!O(document.documentElement)||_!=null&&O(_,a)&&w.push(_)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,x=t.getBoundingClientRect(),E=x.height,T=x.width,k=x.top,L=x.right,A=x.bottom,G=x.left,K=o==="start"||o==="nearest"?k:o==="end"?A:k+E/2,W=s==="center"?G+T/2:s==="end"?L:G,z=[],U=0;U=0&&G>=0&&A<=R&&L<=h&&k>=Z&&A<=he&&G>=ae&&L<=ce)return z;var xe=getComputedStyle(P),ge=parseInt(xe.borderLeftWidth,10),oe=parseInt(xe.borderTopWidth,10),se=parseInt(xe.borderRightWidth,10),te=parseInt(xe.borderBottomWidth,10),be=0,ee=0,ie="offsetWidth"in P?P.offsetWidth-P.clientWidth-ge-se:0,Ee="offsetHeight"in P?P.offsetHeight-P.clientHeight-oe-te:0;if(f===P)be=o==="start"?K:o==="end"?K-R:o==="nearest"?M(g,g+R,R,oe,te,g+K,g+K+E,E):K-R/2,ee=s==="start"?W:s==="center"?W-h/2:s==="end"?W-h:M(C,C+h,h,ge,se,C+W,C+W+T,T),be=Math.max(0,be+g),ee=Math.max(0,ee+C);else{be=o==="start"?K-Z-oe:o==="end"?K-he+te+Ee:o==="nearest"?M(Z,he,V,oe,te+Ee,K,K+E,E):K-(Z+V/2)+Ee/2,ee=s==="start"?W-ae-ge:s==="center"?W-(ae+q/2)+ie/2:s==="end"?W-ce+se+ie:M(ae,ce,q,ge,se+ie,W,W+T,T);var ne=P.scrollLeft,J=P.scrollTop;K+=J-(be=Math.max(0,Math.min(J+be,P.scrollHeight-V+Ee))),W+=ne-(ee=Math.max(0,Math.min(ne+ee,P.scrollWidth-q+ie)))}z.push({el:P,top:be,left:ee})}return z};function m(t){return t===Object(t)&&Object.keys(t).length!==0}function S(t,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;t.forEach(function(i){var o=i.el,s=i.top,u=i.left;o.scroll&&r?o.scroll({top:s,left:u,behavior:l}):(o.scrollTop=s,o.scrollLeft=u)})}function b(t){return t===!1?{block:"end",inline:"nearest"}:m(t)?t:{block:"start",inline:"nearest"}}function p(t,l){var r=!t.ownerDocument.documentElement.contains(t);if(m(l)&&typeof l.behavior=="function")return l.behavior(r?[]:y(t,l));if(r)return;var i=b(l);return S(y(t,i),i.behavior)}var d=$.a=p},Zss7:function(F,$,j){var N;(function(v){var O=/^\s+/,M=/\s+$/,y=0,m=v.round,S=v.min,b=v.max,p=v.random;function d(te,be){if(te=te||"",be=be||{},te instanceof d)return te;if(!(this instanceof d))return new d(te,be);var ee=t(te);this._originalInput=te,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=m(100*this._a)/100,this._format=be.format||ee.format,this._gradientType=be.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=ee.ok,this._tc_id=y++}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),be,ee,ie,Ee,ne,J;return be=te.r/255,ee=te.g/255,ie=te.b/255,be<=.03928?Ee=be/12.92:Ee=v.pow((be+.055)/1.055,2.4),ee<=.03928?ne=ee/12.92:ne=v.pow((ee+.055)/1.055,2.4),ie<=.03928?J=ie/12.92:J=v.pow((ie+.055)/1.055,2.4),.2126*Ee+.7152*ne+.0722*J},setAlpha:function(te){return this._a=z(te),this._roundA=m(100*this._a)/100,this},toHsv:function(){var te=o(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=o(this._r,this._g,this._b),be=m(te.h*360),ee=m(te.s*100),ie=m(te.v*100);return this._a==1?"hsv("+be+", "+ee+"%, "+ie+"%)":"hsva("+be+", "+ee+"%, "+ie+"%, "+this._roundA+")"},toHsl:function(){var te=r(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=r(this._r,this._g,this._b),be=m(te.h*360),ee=m(te.s*100),ie=m(te.l*100);return this._a==1?"hsl("+be+", "+ee+"%, "+ie+"%)":"hsla("+be+", "+ee+"%, "+ie+"%, "+this._roundA+")"},toHex:function(te){return u(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return a(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var be="#"+c(this._r,this._g,this._b,this._a),ee=be,ie=this._gradientType?"GradientType = 1, ":"";if(te){var Ee=d(te);ee="#"+c(Ee._r,Ee._g,Ee._b,Ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+ie+"startColorstr="+be+",endColorstr="+ee+")"},toString:function(te){var be=!!te;te=te||this._format;var ee=!1,ie=this._a<1&&this._a>=0,Ee=!be&&ie&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return Ee?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(ee=this.toRgbString()),te==="prgb"&&(ee=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(ee=this.toHexString()),te==="hex3"&&(ee=this.toHexString(!0)),te==="hex4"&&(ee=this.toHex8String(!0)),te==="hex8"&&(ee=this.toHex8String()),te==="name"&&(ee=this.toName()),te==="hsl"&&(ee=this.toHslString()),te==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(te,be){var ee=te.apply(null,[this].concat([].slice.call(be)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(te,be){return te.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(te,be){if(typeof te=="object"){var ee={};for(var ie in te)te.hasOwnProperty(ie)&&(ie==="a"?ee[ie]=te[ie]:ee[ie]=ce(te[ie]));te=ee}return d(te,be)};function t(te){var be={r:0,g:0,b:0},ee=1,ie=null,Ee=null,ne=null,J=!1,X=!1;return typeof te=="string"&&(te=oe(te)),typeof te=="object"&&(ge(te.r)&&ge(te.g)&&ge(te.b)?(be=l(te.r,te.g,te.b),J=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):ge(te.h)&&ge(te.s)&&ge(te.v)?(ie=ce(te.s),Ee=ce(te.v),be=s(te.h,ie,Ee),J=!0,X="hsv"):ge(te.h)&&ge(te.s)&&ge(te.l)&&(ie=ce(te.s),ne=ce(te.l),be=i(te.h,ie,ne),J=!0,X="hsl"),te.hasOwnProperty("a")&&(ee=te.a)),ee=z(ee),{ok:J,format:te.format||X,r:S(255,b(be.r,0)),g:S(255,b(be.g,0)),b:S(255,b(be.b,0)),a:ee}}function l(te,be,ee){return{r:U(te,255)*255,g:U(be,255)*255,b:U(ee,255)*255}}function r(te,be,ee){te=U(te,255),be=U(be,255),ee=U(ee,255);var ie=b(te,be,ee),Ee=S(te,be,ee),ne,J,X=(ie+Ee)/2;if(ie==Ee)ne=J=0;else{var Q=ie-Ee;J=X>.5?Q/(2-ie-Ee):Q/(ie+Ee);switch(ie){case te:ne=(be-ee)/Q+(be1&&(Te-=1),Te<1/6?me+(fe-me)*6*Te:Te<1/2?fe:Te<2/3?me+(fe-me)*(2/3-Te)*6:me}if(be===0)ie=Ee=ne=ee;else{var X=ee<.5?ee*(1+be):ee+be-ee*be,Q=2*ee-X;ie=J(Q,X,te+1/3),Ee=J(Q,X,te),ne=J(Q,X,te-1/3)}return{r:ie*255,g:Ee*255,b:ne*255}}function o(te,be,ee){te=U(te,255),be=U(be,255),ee=U(ee,255);var ie=b(te,be,ee),Ee=S(te,be,ee),ne,J,X=ie,Q=ie-Ee;if(J=ie===0?0:Q/ie,ie==Ee)ne=0;else{switch(ie){case te:ne=(be-ee)/Q+(be>1)+720)%360;--be;)ie.h=(ie.h+Ee)%360,ne.push(d(ie));return ne}function A(te,be){be=be||6;for(var ee=d(te).toHsv(),ie=ee.h,Ee=ee.s,ne=ee.v,J=[],X=1/be;be--;)J.push(d({h:ie,s:Ee,v:ne})),ne=(ne+X)%1;return J}d.mix=function(te,be,ee){ee=ee===0?0:ee||50;var ie=d(te).toRgb(),Ee=d(be).toRgb(),ne=ee/100,J={r:(Ee.r-ie.r)*ne+ie.r,g:(Ee.g-ie.g)*ne+ie.g,b:(Ee.b-ie.b)*ne+ie.b,a:(Ee.a-ie.a)*ne+ie.a};return d(J)},d.readability=function(te,be){var ee=d(te),ie=d(be);return(v.max(ee.getLuminance(),ie.getLuminance())+.05)/(v.min(ee.getLuminance(),ie.getLuminance())+.05)},d.isReadable=function(te,be,ee){var ie=d.readability(te,be),Ee,ne;ne=!1,Ee=se(ee);switch(Ee.level+Ee.size){case"AAsmall":case"AAAlarge":ne=ie>=4.5;break;case"AAlarge":ne=ie>=3;break;case"AAAsmall":ne=ie>=7;break}return ne},d.mostReadable=function(te,be,ee){var ie=null,Ee=0,ne,J,X,Q;ee=ee||{},J=ee.includeFallbackColors,X=ee.level,Q=ee.size;for(var me=0;meEe&&(Ee=ne,ie=d(be[me]));return d.isReadable(te,ie,{level:X,size:Q})||!J?ie:(ee.includeFallbackColors=!1,d.mostReadable(te,["#fff","#000"],ee))};var G=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=d.hexNames=W(G);function W(te){var be={};for(var ee in te)te.hasOwnProperty(ee)&&(be[te[ee]]=ee);return be}function z(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function U(te,be){V(te)&&(te="100%");var ee=q(te);return te=S(be,b(0,parseFloat(te))),ee&&(te=parseInt(te*be,10)/100),v.abs(te-be)<1e-6?1:te%be/parseFloat(be)}function P(te){return S(1,b(0,te))}function H(te){return parseInt(te,16)}function V(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function q(te){return typeof te=="string"&&te.indexOf("%")!=-1}function Z(te){return te.length==1?"0"+te:""+te}function ce(te){return te<=1&&(te=te*100+"%"),te}function he(te){return v.round(parseFloat(te)*255).toString(16)}function ae(te){return H(te)/255}var xe=function(){var te="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+be+")|(?:"+te+")",ie="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",Ee="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+ie),rgba:new RegExp("rgba"+Ee),hsl:new RegExp("hsl"+ie),hsla:new RegExp("hsla"+Ee),hsv:new RegExp("hsv"+ie),hsva:new RegExp("hsva"+Ee),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 ge(te){return!!xe.CSS_UNIT.exec(te)}function oe(te){te=te.replace(O,"").replace(M,"").toLowerCase();var be=!1;if(G[te])te=G[te],be=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=xe.rgb.exec(te))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=xe.rgba.exec(te))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=xe.hsl.exec(te))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=xe.hsla.exec(te))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=xe.hsv.exec(te))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=xe.hsva.exec(te))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=xe.hex8.exec(te))?{r:H(ee[1]),g:H(ee[2]),b:H(ee[3]),a:ae(ee[4]),format:be?"name":"hex8"}:(ee=xe.hex6.exec(te))?{r:H(ee[1]),g:H(ee[2]),b:H(ee[3]),format:be?"name":"hex"}:(ee=xe.hex4.exec(te))?{r:H(ee[1]+""+ee[1]),g:H(ee[2]+""+ee[2]),b:H(ee[3]+""+ee[3]),a:ae(ee[4]+""+ee[4]),format:be?"name":"hex8"}:(ee=xe.hex3.exec(te))?{r:H(ee[1]+""+ee[1]),g:H(ee[2]+""+ee[2]),b:H(ee[3]+""+ee[3]),format:be?"name":"hex"}:!1}function se(te){var be,ee;return te=te||{level:"AA",size:"small"},be=(te.level||"AA").toUpperCase(),ee=(te.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:be,size:ee}}F.exports?F.exports=d:!(N=function(){return d}.call($,j,$,F),N!==void 0&&(F.exports=N))})(Math)},bCnd:function(F,$,j){"use strict";j.d($,"b",function(){return M}),j.d($,"a",function(){return y});var N=j("je13"),v=j.n(N),O=!1;function M(m,S){var b=v.a.get("__ec");b||(b={}),b[m]=S,v.a.set("__ec",b)}function y(m,S){var b=v.a.get("__ec");return b?b[m]===void 0?S:b[m]:S}},bQjk:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.CipherParams,m=O.enc,S=m.Hex,b=O.format,p=b.Hex={stringify:function(d){return d.ciphertext.toString(S)},parse:function(d){var t=S.parse(d);return y.create({ciphertext:t})}}}(),N.format.Hex})},bT9E:function(F,$,j){"use strict";j.d($,"a",function(){return v});var N=j("VTBJ");function v(O,M){var y=Object(N.a)({},O);return Array.isArray(M)&&M.forEach(function(m){delete y[m]}),y}},biw7:function(F,$,j){"use strict";var N=j("cDcd"),v=j.n(N),O=N.createContext(null);$.a=O},c5Ni:function(F,$,j){},cDPC:function(F,$,j){"use strict";var N=j("tJVT"),v=j("cDcd"),O=j.n(v),M=j("i3hx"),y=j.n(M);$.a=function(m){var S=m.defaultX,b=S===void 0?"40%":S,p=m.leftChild,d=m.rightChild,t=m.className,l=m.hideResize,r=l===void 0?!1:l,i=Object(v.useState)(b),o=Object(N.a)(i,2),s=o[0],u=o[1],a=Object(v.useRef)();function c(){a.current=!0}Object(v.useEffect)(function(){function _(R){a.current&&u(R.pageX)}function h(){a.current=!1}return window.addEventListener("mousemove",_),window.addEventListener("mouseup",h),function(){window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",h)}},[]);var f=typeof s=="number"&&s!==.01?"".concat(s,"px"):b,w="calc(100% - ".concat(r?"0px":"4px"," - ").concat(f,")");return O.a.createElement("div",{className:"split-panel-container ".concat(t)},O.a.createElement("section",{style:{width:f,display:s===.01?"none":""}},p),O.a.createElement("section",{className:"resize-x-bar",onMouseDown:c},O.a.createElement("a",{className:"btn-resize"},O.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},O.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),O.a.createElement("section",{style:{width:w}},d))}},cv67:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.algo,b=[];(function(){for(var i=0;i<64;i++)b[i]=v.abs(v.sin(i+1))*4294967296|0})();var p=S.MD5=m.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,o){for(var s=0;s<16;s++){var u=o+s,a=i[u];i[u]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var c=this._hash.words,f=i[o+0],w=i[o+1],_=i[o+2],h=i[o+3],R=i[o+4],C=i[o+5],g=i[o+6],x=i[o+7],E=i[o+8],T=i[o+9],k=i[o+10],L=i[o+11],A=i[o+12],G=i[o+13],K=i[o+14],W=i[o+15],z=c[0],U=c[1],P=c[2],H=c[3];z=d(z,U,P,H,f,7,b[0]),H=d(H,z,U,P,w,12,b[1]),P=d(P,H,z,U,_,17,b[2]),U=d(U,P,H,z,h,22,b[3]),z=d(z,U,P,H,R,7,b[4]),H=d(H,z,U,P,C,12,b[5]),P=d(P,H,z,U,g,17,b[6]),U=d(U,P,H,z,x,22,b[7]),z=d(z,U,P,H,E,7,b[8]),H=d(H,z,U,P,T,12,b[9]),P=d(P,H,z,U,k,17,b[10]),U=d(U,P,H,z,L,22,b[11]),z=d(z,U,P,H,A,7,b[12]),H=d(H,z,U,P,G,12,b[13]),P=d(P,H,z,U,K,17,b[14]),U=d(U,P,H,z,W,22,b[15]),z=t(z,U,P,H,w,5,b[16]),H=t(H,z,U,P,g,9,b[17]),P=t(P,H,z,U,L,14,b[18]),U=t(U,P,H,z,f,20,b[19]),z=t(z,U,P,H,C,5,b[20]),H=t(H,z,U,P,k,9,b[21]),P=t(P,H,z,U,W,14,b[22]),U=t(U,P,H,z,R,20,b[23]),z=t(z,U,P,H,T,5,b[24]),H=t(H,z,U,P,K,9,b[25]),P=t(P,H,z,U,h,14,b[26]),U=t(U,P,H,z,E,20,b[27]),z=t(z,U,P,H,G,5,b[28]),H=t(H,z,U,P,_,9,b[29]),P=t(P,H,z,U,x,14,b[30]),U=t(U,P,H,z,A,20,b[31]),z=l(z,U,P,H,C,4,b[32]),H=l(H,z,U,P,E,11,b[33]),P=l(P,H,z,U,L,16,b[34]),U=l(U,P,H,z,K,23,b[35]),z=l(z,U,P,H,w,4,b[36]),H=l(H,z,U,P,R,11,b[37]),P=l(P,H,z,U,x,16,b[38]),U=l(U,P,H,z,k,23,b[39]),z=l(z,U,P,H,G,4,b[40]),H=l(H,z,U,P,f,11,b[41]),P=l(P,H,z,U,h,16,b[42]),U=l(U,P,H,z,g,23,b[43]),z=l(z,U,P,H,T,4,b[44]),H=l(H,z,U,P,A,11,b[45]),P=l(P,H,z,U,W,16,b[46]),U=l(U,P,H,z,_,23,b[47]),z=r(z,U,P,H,f,6,b[48]),H=r(H,z,U,P,x,10,b[49]),P=r(P,H,z,U,K,15,b[50]),U=r(U,P,H,z,C,21,b[51]),z=r(z,U,P,H,A,6,b[52]),H=r(H,z,U,P,h,10,b[53]),P=r(P,H,z,U,k,15,b[54]),U=r(U,P,H,z,w,21,b[55]),z=r(z,U,P,H,E,6,b[56]),H=r(H,z,U,P,W,10,b[57]),P=r(P,H,z,U,g,15,b[58]),U=r(U,P,H,z,G,21,b[59]),z=r(z,U,P,H,R,6,b[60]),H=r(H,z,U,P,L,10,b[61]),P=r(P,H,z,U,_,15,b[62]),U=r(U,P,H,z,T,21,b[63]),c[0]=c[0]+z|0,c[1]=c[1]+U|0,c[2]=c[2]+P|0,c[3]=c[3]+H|0},_doFinalize:function(){var i=this._data,o=i.words,s=this._nDataBytes*8,u=i.sigBytes*8;o[u>>>5]|=128<<24-u%32;var a=v.floor(s/4294967296),c=s;o[(u+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o[(u+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,i.sigBytes=(o.length+1)*4,this._process();for(var f=this._hash,w=f.words,_=0;_<4;_++){var h=w[_];w[_]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}return f},clone:function(){var i=m.clone.call(this);return i._hash=this._hash.clone(),i}});function d(i,o,s,u,a,c,f){var w=i+(o&s|~o&u)+a+f;return(w<>>32-c)+o}function t(i,o,s,u,a,c,f){var w=i+(o&u|s&~u)+a+f;return(w<>>32-c)+o}function l(i,o,s,u,a,c,f){var w=i+(o^s^u)+a+f;return(w<>>32-c)+o}function r(i,o,s,u,a,c,f){var w=i+(s^(o|~u))+a+f;return(w<>>32-c)+o}O.MD5=m._createHelper(p),O.HmacMD5=m._createHmacHelper(p)}(Math),N.MD5})},dejd:function(F,$,j){},dmUQ:function(F,$,j){"use strict";var N=j("Ff2n"),v=j("rePB"),O=j("1OyB"),M=j("vuIU"),y=j("Ji7U"),m=j("md7G"),S=j("foSv"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=j("4IlW");function r(E,T){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(E);T&&(L=L.filter(function(A){return Object.getOwnPropertyDescriptor(E,A).enumerable})),k.push.apply(k,L)}return k}function i(E){for(var T=1;T1?q-1:0),ce=1;ce1?U-1:0),H=1;H=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},A.getInputDisplayValue=function(W){var z=W||A.state,U=z.focused,P=z.inputValue,H=z.value,V;U?V=P:V=A.toPrecisionAsStep(H),V==null&&(V="");var q=A.formatWrapper(V);return h(A.props.decimalSeparator)&&(q=q.toString().replace(".",A.props.decimalSeparator)),q},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(W){}},A.restoreByAfter=function(W){if(W===void 0)return!1;var z=A.input.value,U=z.lastIndexOf(W);if(U===-1)return!1;var P=A.cursorBefore.length;return A.lastKeyCode===l.a.DELETE&&A.cursorBefore.charAt(P-1)===W[0]?(A.fixCaret(P,P),!0):U+W.length===z.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(z,U){var P=W.substring(U);return A.restoreByAfter(P)})},A.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(W,z,U){A.pressingUpOrDown=!0,A.step("down",W,z,U)},A.up=function(W,z,U){A.pressingUpOrDown=!0,A.step("up",W,z,U)},A.saveInput=function(W){A.input=W};var G=L.value;G===void 0&&(G=L.defaultValue),A.state={focused:L.autoFocus};var K=A.getValidValue(A.toNumber(G));return A.state=i(i({},A.state),{},{inputValue:A.toPrecisionAsStep(K),value:K}),A}return Object(M.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var G=this.props,K=G.value,W=G.onChange,z=G.max,U=G.min,P=this.state.focused;if(A){if(!R(A.value,K)||!R(A.max,z)||!R(A.min,U)){var H=P?K:this.getValidValue(K),V;this.pressingUpOrDown?V=H:this.inputting?V=this.rawInput:V=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:V})}var q="value"in this.props?K:this.state.value;"max"in this.props&&A.max!==z&&typeof q=="number"&&q>z&&W&&W(z),"min"in this.props&&A.min!==U&&typeof q=="number"&&q1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(A);return isNaN(W)?A:(WK&&(W=K),W)}},{key:"setValue",value:function(A,G){var K=this.props.precision,W=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),z=this.state.value,U=z===void 0?null:z,P=this.state.inputValue,H=P===void 0?null:P,V=typeof W=="number"?W.toFixed(K):"".concat(W),q=W!==U||V!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},G)):this.setState({value:W,inputValue:this.toPrecisionAsStep(A)},G),q&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(A){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,W=K.precision,z=K.step;if(h(W))return W;var U=this.getPrecision(G),P=this.getPrecision(z),H=this.getPrecision(A);return A?Math.max(H,U+P):U+P}},{key:"getPrecisionFactor",value:function(A){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(A,G);return Math.pow(10,K)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var G=Math.abs(this.getMaxPrecision(A));return isNaN(G)?A.toString():Number(A).toFixed(G)}},{key:"toNumber",value:function(A){var G=this.props.precision,K=this.state.focused,W=A&&A.length>16&&K;return this.isNotCompleteNumber(A)||W?A:h(G)?Math.round(A*Math.pow(10,G))/Math.pow(10,G):Number(A)}},{key:"upStep",value:function(A,G){var K=this.props.step,W=this.getPrecisionFactor(A,G),z=Math.abs(this.getMaxPrecision(A,G)),U=((W*A+W*K*G)/W).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(A,G){var K=this.props.step,W=this.getPrecisionFactor(A,G),z=Math.abs(this.getMaxPrecision(A,G)),U=((W*A-W*K*G)/W).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(A,G){var K=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var H=this["".concat(A,"Step")](P,W),V=H>U.max||HU.max?H=U.max:H=Z),Ge=(et||et===0)&&(isNaN(et)||Number(et)<=ce),De=Ne||W||z,we=Ge||W||z,Ae=t()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(v.a)({},"".concat(K,"-handler-up-disabled"),De)),de=t()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(v.a)({},"".concat(K,"-handler-down-disabled"),we)),_e=U?{onTouchStart:De?u:this.up,onTouchEnd:this.stop}:{onMouseDown:De?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Se=U?{onTouchStart:we?u:this.down,onTouchEnd:this.stop}:{onMouseDown:we?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:Le,style:he,title:ae,onMouseEnter:xe,onMouseLeave:ge,onMouseOver:oe,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(K,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Increase Value","aria-disabled":De,className:Ae}),H||p.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:a})),p.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Decrease Value","aria-disabled":we,className:de}),V||p.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:a}))),p.a.createElement("div",{className:"".concat(K,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ce,"aria-valuemax":Z,"aria-valuenow":et,required:te,type:ie,placeholder:Ee,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:ee,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:u,onKeyUp:Ve?this.onKeyUp:u,autoFocus:fe,maxLength:me,readOnly:z,disabled:W,max:Z,min:ce,step:Q,name:Te,title:ae,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:X,inputMode:J,onInput:Je},Oe))))}}]),k}(p.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:c,required:!1,autoComplete:"off"};var g=C,x=$.a=g},e7zE:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Base,y=O.WordArray,m=v.algo,S=m.SHA1,b=m.HMAC,p=m.PBKDF2=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,t){for(var l=this.cfg,r=b.create(l.hasher,d),i=y.create(),o=y.create([1]),s=i.words,u=o.words,a=l.keySize,c=l.iterations;s.length=Z&&H<0||U.scrollTop<=0&&H>0))||q&&(!oe||oe&&(U.scrollLeft>=ce&&P<0||U.scrollLeft<=0&&P>0))?W(z,U.parentNode,P,H):!1};function C(W){var z=g();return function(){var P=Object(m.a)(W),H;if(z){var V=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,V)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(W){return!1}}var x={},E=function(W){Object(M.a)(U,W);var z=C(U);function U(P){var H;return Object(v.a)(this,U),H=z.call(this,P),H.domFocus=function(){H.dom&&H.dom.focus()},H.removeStartHandler=function(V){if(V.touches.length>1)return;H.startPos={x:V.touches[0].clientX,y:V.touches[0].clientY}},H.removeMoveHandler=function(V){if(V.changedTouches.length>1)return;var q=V.currentTarget,Z=V.changedTouches[0].clientX-H.startPos.x,ce=V.changedTouches[0].clientY-H.startPos.y;(q===H.maskDom||q===H.handlerDom||q===H.contentDom&&R(q,V.target,Z,ce))&&V.cancelable&&V.preventDefault()},H.transitionEnd=function(V){var q=V.target;f(q,a,H.transitionEnd),q.style.transition=""},H.onKeyDown=function(V){if(V.keyCode===i.a.ESC){var q=H.props.onClose;V.stopPropagation(),q&&q(V)}},H.onWrapperTransitionEnd=function(V){var q=H.props,Z=q.open,ce=q.afterVisibleChange;V.target===H.contentWrapper&&V.propertyName.match(/transform$/)&&(H.dom.style.transition="",!Z&&H.getCurrentDrawerSome()&&(document.body.style.overflowX="",H.maskDom&&(H.maskDom.style.left="",H.maskDom.style.width="")),ce&&ce(!!Z))},H.openLevelTransition=function(){var V=H.props,q=V.open,Z=V.width,ce=V.height,he=H.getHorizontalBoolAndPlacementName(),ae=he.isHorizontal,xe=he.placementName,ge=H.contentDom?H.contentDom.getBoundingClientRect()[ae?"width":"height"]:0,oe=(ae?Z:ce)||ge;H.setLevelAndScrolling(q,xe,oe)},H.setLevelTransform=function(V,q,Z,ce){var he=H.props,ae=he.placement,xe=he.levelMove,ge=he.duration,oe=he.ease,se=he.showMask;H.levelDom.forEach(function(te){te.style.transition="transform ".concat(ge," ").concat(oe),c(te,a,H.transitionEnd);var be=V?Z:0;if(xe){var ee=w(xe,{target:te,open:V});be=V?ee[0]:ee[1]||0}var ie=typeof be=="number"?"".concat(be,"px"):be,Ee=ae==="left"||ae==="top"?ie:"-".concat(ie);Ee=se&&ae==="right"&&ce?"calc(".concat(Ee," + ").concat(ce,"px)"):Ee,te.style.transform=be?"".concat(q,"(").concat(Ee,")"):""})},H.setLevelAndScrolling=function(V,q,Z){var ce=H.props.onChange;if(!h){var he=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;H.setLevelTransform(V,q,Z,he),H.toggleScrollingToDrawerAndBody(he)}ce&&ce(V)},H.toggleScrollingToDrawerAndBody=function(V){var q=H.props,Z=q.getOpenCount,ce=q.getContainer,he=q.showMask,ae=q.open,xe=ce&&ce(),ge=Z&&Z();if(xe&&xe.parentNode===document.body&&he){var oe=["touchstart"],se=[document.body,H.maskDom,H.handlerDom,H.contentDom];ae&&document.body.style.overflow!=="hidden"?(V&&H.addScrollingEffect(V),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",se.forEach(function(te,be){if(!te)return;c(te,oe[be]||"touchmove",be?H.removeMoveHandler:H.removeStartHandler,H.passive)})):H.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",V&&H.remScrollingEffect(V),se.forEach(function(te,be){if(!te)return;f(te,oe[be]||"touchmove",be?H.removeMoveHandler:H.removeStartHandler,H.passive)}))}},H.addScrollingEffect=function(V){var q=H.props,Z=q.placement,ce=q.duration,he=q.ease,ae=q.getOpenCount,xe=q.switchScrollingEffect,ge=ae&&ae();ge===1&&xe();var oe="width ".concat(ce," ").concat(he),se="transform ".concat(ce," ").concat(he);H.dom.style.transition="none";switch(Z){case"right":H.dom.style.transform="translateX(-".concat(V,"px)");break;case"top":case"bottom":H.dom.style.width="calc(100% - ".concat(V,"px)"),H.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(se,",").concat(oe),H.dom.style.width="",H.dom.style.transform="")})},H.remScrollingEffect=function(V){var q=H.props,Z=q.placement,ce=q.duration,he=q.ease,ae=q.getOpenCount,xe=q.switchScrollingEffect,ge=ae&&ae();ge||xe(!0),u&&(document.body.style.overflowX="hidden"),H.dom.style.transition="none";var oe,se="width ".concat(ce," ").concat(he),te="transform ".concat(ce," ").concat(he);switch(Z){case"left":{H.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ce);break}case"right":{H.dom.style.transform="translateX(".concat(V,"px)"),H.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ce),H.maskDom&&(H.maskDom.style.left="-".concat(V,"px"),H.maskDom.style.width="calc(100% + ".concat(V,"px)"));break}case"top":case"bottom":{H.dom.style.width="calc(100% + ".concat(V,"px)"),H.dom.style.height="100%",H.dom.style.transform="translateZ(0)",oe="height 0s ".concat(he," ").concat(ce);break}default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(te,",").concat(oe?"".concat(oe,","):"").concat(se),H.dom.style.transform="",H.dom.style.width="",H.dom.style.height="")})},H.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(V){return x[V]})},H.getLevelDom=function(V){var q=V.level,Z=V.getContainer;if(h)return;var ce=Z&&Z(),he=ce?ce.parentNode:null;if(H.levelDom=[],q==="all"){var ae=he?Array.prototype.slice.call(he.children):[];ae.forEach(function(xe){xe.nodeName!=="SCRIPT"&&xe.nodeName!=="STYLE"&&xe.nodeName!=="LINK"&&xe!==ce&&H.levelDom.push(xe)})}else q&&o(q).forEach(function(xe){document.querySelectorAll(xe).forEach(function(ge){H.levelDom.push(ge)})})},H.getHorizontalBoolAndPlacementName=function(){var V=H.props.placement,q=V==="left"||V==="right",Z="translate".concat(q?"X":"Y");return{isHorizontal:q,placementName:Z}},H.state={_self:Object(d.a)(H)},H}return Object(O.a)(U,[{key:"componentDidMount",value:function(){var H=this;if(!h){var V=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return V=!0,null}}))}catch(ae){}this.passive=V?{passive:!1}:!1}var q=this.props,Z=q.open,ce=q.getContainer,he=ce&&ce();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Z&&(he&&he.parentNode===document.body&&(x[this.drawerId]=Z),this.openLevelTransition(),this.forceUpdate(function(){H.domFocus()}))}},{key:"componentDidUpdate",value:function(H){var V=this.props,q=V.open,Z=V.getContainer,ce=Z&&Z();q!==H.open&&(q&&this.domFocus(),ce&&ce.parentNode===document.body&&(x[this.drawerId]=!!q),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var H=this.props,V=H.getOpenCount,q=H.open,Z=H.switchScrollingEffect,ce=typeof V=="function"&&V();delete x[this.drawerId],q&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ce||(document.body.style.overflow="",Z(!0))}},{key:"render",value:function(){var H,V=this,q=this.props,Z=q.className,ce=q.children,he=q.style,ae=q.width,xe=q.height,ge=q.defaultOpen,oe=q.open,se=q.prefixCls,te=q.placement,be=q.level,ee=q.levelMove,ie=q.ease,Ee=q.duration,ne=q.getContainer,J=q.handler,X=q.onChange,Q=q.afterVisibleChange,me=q.showMask,fe=q.maskClosable,Te=q.maskStyle,ze=q.onClose,Je=q.onHandleClick,qe=q.keyboard,Xe=q.getOpenCount,et=q.switchScrollingEffect,rt=Object(N.a)(q,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Le=this.dom?oe:!1,Oe=l()(se,(H={},Object(p.a)(H,"".concat(se,"-").concat(te),!0),Object(p.a)(H,"".concat(se,"-open"),Le),Object(p.a)(H,Z||"",!!Z),Object(p.a)(H,"no-mask",!me),H)),Ve=this.getHorizontalBoolAndPlacementName(),Ze=Ve.placementName,Ne=te==="left"||te==="top"?"-100%":"100%",Ge=Le?"":"".concat(Ze,"(").concat(Ne,")"),De=J&&b.cloneElement(J,{onClick:function(Ae){J.props.onClick&&J.props.onClick(),Je&&Je(Ae)},ref:function(Ae){V.handlerDom=Ae}});return b.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Oe,style:he,ref:function(Ae){V.dom=Ae},onKeyDown:Le&&qe?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),me&&b.createElement("div",{className:"".concat(se,"-mask"),onClick:fe?ze:void 0,style:Te,ref:function(Ae){V.maskDom=Ae}}),b.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:Ge,msTransform:Ge,width:_(ae)?"".concat(ae,"px"):ae,height:_(xe)?"".concat(xe,"px"):xe},ref:function(Ae){V.contentWrapper=Ae}},b.createElement("div",{className:"".concat(se,"-content"),ref:function(Ae){V.contentDom=Ae},onTouchStart:Le&&me?this.removeStartHandler:void 0,onTouchMove:Le&&me?this.removeMoveHandler:void 0},ce),De))}}],[{key:"getDerivedStateFromProps",value:function(H,V){var q=V.prevProps,Z=V._self,ce={prevProps:H};if(q!==void 0){var he=H.placement,ae=H.level;he!==q.placement&&(Z.contentDom=null),ae!==q.level&&Z.getLevelDom(H)}return ce}}]),U}(b.Component);E.defaultProps={switchScrollingEffect:function(){}};var T=E;function k(W){var z=L();return function(){var P=Object(m.a)(W),H;if(z){var V=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,V)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function L(){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(W){return!1}}var A=function(W){Object(M.a)(U,W);var z=k(U);function U(P){var H;Object(v.a)(this,U),H=z.call(this,P),H.onHandleClick=function(q){var Z=H.props,ce=Z.onHandleClick,he=Z.open;if(ce&&ce(q),typeof he=="undefined"){var ae=H.state.open;H.setState({open:!ae})}},H.onClose=function(q){var Z=H.props,ce=Z.onClose,he=Z.open;ce&&ce(q),typeof he=="undefined"&&H.setState({open:!1})};var V=typeof P.open!="undefined"?P.open:!!P.defaultOpen;return H.state={open:V},"onMaskClick"in P&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),H}return Object(O.a)(U,[{key:"render",value:function(){var H=this,V=this.props,q=V.defaultOpen,Z=V.getContainer,ce=V.wrapperClassName,he=V.forceRender,ae=V.handler,xe=Object(N.a)(V,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!Z)return b.createElement("div",{className:ce,ref:function(te){H.dom=te}},b.createElement(T,Object.assign({},xe,{open:ge,handler:ae,getContainer:function(){return H.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var oe=!!ae||he;return b.createElement(S.a,{visible:ge,forceRender:oe,getContainer:Z,wrapperClassName:ce},function(se){var te=se.visible,be=se.afterClose,ee=Object(N.a)(se,["visible","afterClose"]);return b.createElement(T,Object.assign({},xe,ee,{open:te!==void 0?te:ge,afterVisibleChange:be!==void 0?be:xe.afterVisibleChange,handler:ae,onClose:H.onClose,onHandleClick:H.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(H,V){var q=V.prevProps,Z={prevProps:H};return typeof q!="undefined"&&H.open!==q.open&&(Z.open=H.open),Z}}]),U}(b.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:b.createElement("div",{className:"drawer-handle"},b.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=A,K=$.a=G},fyJ8:function(F,$,j){"use strict";var N=j("rePB"),v=j("VTBJ"),O=j("Ff2n"),M=j("U8pU"),y=j("cDcd"),m=j.n(y),S=j("TSYQ"),b=j.n(S),p=j("c+Xe"),d=j("sR1s");function t(s){return s&&Object(M.a)(s)==="object"&&!Array.isArray(s)&&!y.isValidElement(s)}function l(s){return typeof s=="string"?!0:Object(p.c)(s)}function r(s,u){var a,c=s.prefixCls,f=s.className,w=s.record,_=s.index,h=s.dataIndex,R=s.render,C=s.children,g=s.component,x=g===void 0?"td":g,E=s.colSpan,T=s.rowSpan,k=s.fixLeft,L=s.fixRight,A=s.firstFixLeft,G=s.lastFixLeft,K=s.firstFixRight,W=s.lastFixRight,z=s.appendNode,U=s.additionalProps,P=U===void 0?{}:U,H=s.ellipsis,V=s.align,q=s.rowType,Z=s.isSticky,ce="".concat(c,"-cell"),he,ae;if(C)ae=C;else{var xe=Object(d.b)(w,h);if(ae=xe,R){var ge=R(xe,w,_);t(ge)?(ae=ge.children,he=ge.props):ae=ge}}Object(M.a)(ae)==="object"&&!Array.isArray(ae)&&!y.isValidElement(ae)&&(ae=null),H&&(G||K)&&(ae=y.createElement("span",{className:"".concat(ce,"-content")},ae));var oe=he||{},se=oe.colSpan,te=oe.rowSpan,be=oe.style,ee=oe.className,ie=Object(O.a)(oe,["colSpan","rowSpan","style","className"]),Ee=se!==void 0?se:E,ne=te!==void 0?te:T;if(Ee===0||ne===0)return null;var J={},X=typeof k=="number",Q=typeof L=="number";X&&(J.position="sticky",J.left=k),Q&&(J.position="sticky",J.right=L);var me={};V&&(me.textAlign=V);var fe,Te=H===!0?{showTitle:!0}:H;Te&&(Te.showTitle||q==="header")&&(typeof ae=="string"||typeof ae=="number"?fe=ae.toString():y.isValidElement(ae)&&typeof ae.props.children=="string"&&(fe=ae.props.children));var ze=Object(v.a)(Object(v.a)(Object(v.a)({title:fe},ie),P),{},{colSpan:Ee&&Ee!==1?Ee:null,rowSpan:ne&&ne!==1?ne:null,className:b()(ce,f,(a={},Object(N.a)(a,"".concat(ce,"-fix-left"),X),Object(N.a)(a,"".concat(ce,"-fix-left-first"),A),Object(N.a)(a,"".concat(ce,"-fix-left-last"),G),Object(N.a)(a,"".concat(ce,"-fix-right"),Q),Object(N.a)(a,"".concat(ce,"-fix-right-first"),K),Object(N.a)(a,"".concat(ce,"-fix-right-last"),W),Object(N.a)(a,"".concat(ce,"-ellipsis"),H),Object(N.a)(a,"".concat(ce,"-with-append"),z),Object(N.a)(a,"".concat(ce,"-fix-sticky"),(X||Q)&&Z),a),P.className,ee),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},P.style),me),J),be),ref:l(x)?u:null});return y.createElement(x,Object.assign({},ze),z,ae)}var i=y.forwardRef(r);i.displayName="Cell";var o=y.memo(i,function(s,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,s.record):!1});$.a=o},gRFJ:function(F,$,j){F.exports=[j("rdUC"),j("ynwM"),j("RELg"),j("DlR+"),j("CrYA"),j("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(F){return F<10?"0"+F:F}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(F){return rx_escapable.lastIndex=0,rx_escapable.test(F)?'"'+F.replace(rx_escapable,function($){var j=meta[$];return typeof j=="string"?j:"\\u"+("0000"+$.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+F+'"'}function str(F,$){var j,N,v,O,M=gap,y,m=$[F];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(F)),typeof rep=="function"&&(m=rep.call($,F,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,y=[],Object.prototype.toString.apply(m)==="[object Array]"){for(O=m.length,j=0;jK.length)&&(W=K.length);for(var z=0,U=new Array(W);z=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;z[U]=K[U]}}return z}function o(K,W){if(K==null)return{};var z={},U=Object.keys(K),P,H;for(H=0;H=0)continue;z[P]=K[P]}return z}var s=function(W){var z=W.className,U=W.percent,P=W.prefixCls,H=W.strokeColor,V=W.strokeLinecap,q=W.strokeWidth,Z=W.style,ce=W.trailColor,he=W.trailWidth,ae=W.transition,xe=i(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete xe.gapPosition;var ge=Array.isArray(U)?U:[U],oe=Array.isArray(H)?H:[H],se=m(ge),te=b(se,1),be=te[0],ee=q/2,ie=100-q/2,Ee="M ".concat(V==="round"?ee:0,",").concat(ee,` L `).concat(V==="round"?ie:100,",").concat(ee),ne="0 0 100 ".concat(q),J=0;return v.a.createElement("svg",S({className:M()("".concat(P,"-line"),z),viewBox:ne,preserveAspectRatio:"none",style:Z},xe),v.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Ee,strokeLinecap:V,stroke:ce,strokeWidth:he||q,fillOpacity:"0"}),ge.map(function(X,Q){var me={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=oe[Q]||oe[oe.length-1];return J+=X,v.a.createElement("path",{key:Q,className:"".concat(P,"-line-path"),d:Ee,strokeLinecap:V,stroke:fe,strokeWidth:q,fillOpacity:"0",ref:be[Q],style:me})}))};s.defaultProps=y;var u=s;function a(){return a=Object.assign||function(K){for(var W=1;WK.length)&&(W=K.length);for(var z=0,U=new Array(W);z=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;z[U]=K[U]}}return z}function g(K,W){if(K==null)return{};var z={},U=Object.keys(K),P,H;for(H=0;H=0)continue;z[P]=K[P]}return z}var x=0;function E(K){return+K.replace("%","")}function T(K){return Array.isArray(K)?K:[K]}function k(K,W,z,U){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,V=50-U/2,q=0,Z=-V,ce=0,he=-2*V;switch(H){case"left":q=-V,Z=0,ce=2*V,he=0;break;case"right":q=V,Z=0,ce=-2*V,he=0;break;case"bottom":Z=V,he=2*V;break;default:}var ae="M 50,50 m ".concat(q,",").concat(Z,` a `).concat(V,",").concat(V," 0 1 1 ").concat(ce,",").concat(-he,` a `).concat(V,",").concat(V," 0 1 1 ").concat(-ce,",").concat(he),xe=Math.PI*2*V,ge={stroke:z,strokeDasharray:"".concat(W/100*(xe-P),"px ").concat(xe,"px"),strokeDashoffset:"-".concat(P/2+K/100*(xe-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ae,pathStyle:ge}}var L=function(W){var z=W.prefixCls,U=W.strokeWidth,P=W.trailWidth,H=W.gapDegree,V=W.gapPosition,q=W.trailColor,Z=W.strokeLinecap,ce=W.style,he=W.className,ae=W.strokeColor,xe=W.percent,ge=C(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),oe=Object(N.useMemo)(function(){return x+=1,x},[]),se=k(0,100,q,U,H,V),te=se.pathString,be=se.pathStyle,ee=T(xe),ie=T(ae),Ee=ie.find(function(me){return Object.prototype.toString.call(me)==="[object Object]"}),ne=m(ee),J=c(ne,1),X=J[0],Q=function(){var fe=0;return ee.map(function(Te,ze){var Je=ie[ze]||ie[ie.length-1],qe=Object.prototype.toString.call(Je)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(oe,")"):"",Xe=k(fe,Te,Je,U,H,V);return fe+=Te,v.a.createElement("path",{key:ze,className:"".concat(z,"-circle-path"),d:Xe.pathString,stroke:qe,strokeLinecap:Z,strokeWidth:U,opacity:Te===0?0:1,fillOpacity:"0",style:Xe.pathStyle,ref:X[ze]})})};return v.a.createElement("svg",a({className:M()("".concat(z,"-circle"),he),viewBox:"0 0 100 100",style:ce},ge),Ee&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(oe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ee).sort(function(me,fe){return E(me)-E(fe)}).map(function(me,fe){return v.a.createElement("stop",{key:fe,offset:me,stopColor:Ee[me]})}))),v.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:te,stroke:q,strokeLinecap:Z,strokeWidth:P||U,fillOpacity:"0",style:be}),Q().reverse())};L.defaultProps=y;var A=L,G={Line:u,Circle:A}},hW8S:function(F,$,j){"use strict";j.d($,"a",function(){return M}),j.d($,"c",function(){return y}),j.d($,"b",function(){return m});var N=j("VTBJ"),v=j("Ff2n"),O=j("Kwbf"),M="RC_TABLE_INTERNAL_COL_DEFINE";function y(S){var b=S.expandable,p=Object(v.a)(S,["expandable"]);return"expandable"in S?Object(N.a)(Object(N.a)({},p),b):p}function m(S){return Object.keys(S).reduce(function(b,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(b[p]=S[p]),b},{})}},i3hx:function(F,$,j){},jO9C:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(v,O){v.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(v,O)},unpad:function(v){N.pad.ZeroPadding.unpad(v),v.sigBytes--}},N.pad.Iso97971})},je13:function(F,$,j){var N=j("5nXd"),v=j("gRFJ"),O=[j("uQRt")];F.exports=N.createStore(v,O)},k3GJ:function(F,$,j){"use strict";j.d($,"a",function(){return mn});var N=j("rePB"),v=j("ODXe"),O=j("Ff2n"),M=j("VTBJ"),y=j("cDcd"),m=j("TSYQ"),S=j.n(m),b=j("Zm9Q"),p=j("6cGi"),d=j("KQm4"),t=j("xEkU"),l=j.n(t),r=j("t23M");function i(Re){var Be=Object(y.useRef)(),Ke=Object(y.useRef)(!1);function Me(){for(var pe=arguments.length,Ce=new Array(pe),ye=0;ye$e&&(mt=$e-gt),Object(y.useMemo)(function(){if(!Ce.length)return[0,0];for(var xt=Ce.length,Wt=xt,ar=0;arHe+mt){Wt=ar-1;break}}for(var ur=0,vr=xt-1;vr>=0;vr-=1){var pr=Re.get(Ce[vr].key)||w;if(pr[We]1&&arguments[1]!==void 0?arguments[1]:!1,Me=Be&&typeof Be.getBoundingClientRect=="function"&&Be.getBoundingClientRect().width;if(Me){if(Ke){var pe=getComputedStyle(Be),Ce=pe.marginLeft,ye=pe.marginRight;Me+=+Ce.replace("px","")+ +ye.replace("px","")}Me=+Me.toFixed(6)}return Me||0},fe=function(Be,Ke,Me){Be&&Object(K.a)(Be.style)==="object"&&(Be.style[Ke]=Me)},Te=function(){return ee.any},ze=j("bdgK"),Je=j("faye"),qe=j.n(Je),Xe=j("wgJM"),et=j("l4aY"),rt=j("m+aA"),Le=j("c+Xe"),Oe=j("zT1h"),Ve=j("QC+M");function Ze(Re,Be,Ke){return Ke?Re[0]===Be[0]:Re[0]===Be[0]&&Re[1]===Be[1]}function Ne(Re,Be,Ke){var Me=Re[Be]||{};return Object(M.a)(Object(M.a)({},Me),Ke)}function Ge(Re,Be,Ke,Me){for(var pe=Ke.points,Ce=Object.keys(Re),ye=0;ye1&&arguments[1]!==void 0?arguments[1]:2;Be();var Ce=Object(Xe.a)(function(){pe<=1?Me({isCanceled:function(){return Ce!==Re.current}}):Ke(Me,pe-1)});Re.current=Ce}return y.useEffect(function(){return function(){Be()}},[]),[Ke,Be]},Fn=[kt,Et,Vt,pt],yt=!1,St=!0;function vt(Re){return Re===Vt||Re===pt}var yr=function(Re,Be){var Ke=y.useState(Qt),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1],ye=rr(),Pe=Object(v.a)(ye,2),Fe=Pe[0],We=Pe[1];function He(){Ce(kt)}return Mt(function(){if(pe!==Qt&&pe!==pt){var $e=Fn.indexOf(pe),it=Fn[$e+1],gt=Be(pe);gt===yt?Ce(it):Fe(function(mt){function xt(){if(mt.isCanceled())return;Ce(it)}gt===!0?xt():Promise.resolve(gt).then(xt)})}},[Re,pe]),y.useEffect(function(){return function(){We()}},[]),[He,pe]},Tr=function(Re){var Be=Object(y.useRef)(),Ke=Object(y.useRef)(Re);Ke.current=Re;var Me=y.useCallback(function(ye){Ke.current(ye)},[]);function pe(ye){ye&&(ye.removeEventListener(Ct,Me),ye.removeEventListener(ot,Me))}function Ce(ye){Be.current&&Be.current!==ye&&pe(Be.current),ye&&ye!==Be.current&&(ye.addEventListener(Ct,Me),ye.addEventListener(ot,Me),Be.current=ye)}return y.useEffect(function(){return function(){pe(Be.current)}},[]),[Ce,pe]};function Bt(Re,Be,Ke,Me){var pe=Me.motionEnter,Ce=pe===void 0?!0:pe,ye=Me.motionAppear,Pe=ye===void 0?!0:ye,Fe=Me.motionLeave,We=Fe===void 0?!0:Fe,He=Me.motionDeadline,$e=Me.motionLeaveImmediately,it=Me.onAppearPrepare,gt=Me.onEnterPrepare,mt=Me.onLeavePrepare,xt=Me.onAppearStart,Wt=Me.onEnterStart,ar=Me.onLeaveStart,or=Me.onAppearActive,ur=Me.onEnterActive,vr=Me.onLeaveActive,pr=Me.onAppearEnd,cr=Me.onEnterEnd,Lr=Me.onLeaveEnd,xr=Me.onVisibleChanged,gn=dt(),wr=Object(v.a)(gn,2),Jt=wr[0],zt=wr[1],Or=dt(ft),Mr=Object(v.a)(Or,2),Ht=Mr[0],Nr=Mr[1],vn=dt(null),Ur=Object(v.a)(vn,2),en=Ur[0],Jr=Ur[1],Dn=Object(y.useRef)(!1),Yn=Object(y.useRef)(null),En=Object(y.useRef)(!1),yi=Object(y.useRef)(null);function Fi(){var on=Ke();return on||yi.current}var Ei=Object(y.useRef)(!1);function $n(on){var Yr=Fi();if(on&&!on.deadline&&on.target!==Yr)return;var Jn;Ht===jt&&Ei.current?Jn=pr==null?void 0:pr(Yr,on):Ht===Pt&&Ei.current?Jn=cr==null?void 0:cr(Yr,on):Ht===Xt&&Ei.current&&(Jn=Lr==null?void 0:Lr(Yr,on)),Jn!==!1&&!En.current&&(Nr(ft),Jr(null))}var un=Tr($n),tn=Object(v.a)(un,1),xn=tn[0],yn=y.useMemo(function(){var on,Yr,Jn;switch(Ht){case"appear":return on={},Object(N.a)(on,kt,it),Object(N.a)(on,Et,xt),Object(N.a)(on,Vt,or),on;case"enter":return Yr={},Object(N.a)(Yr,kt,gt),Object(N.a)(Yr,Et,Wt),Object(N.a)(Yr,Vt,ur),Yr;case"leave":return Jn={},Object(N.a)(Jn,kt,mt),Object(N.a)(Jn,Et,ar),Object(N.a)(Jn,Vt,vr),Jn;default:return{}}},[Ht]),Ui=yr(Ht,function(on){if(on===kt){var Yr=yn[kt];return Yr?Yr(Fi()):yt}if(Qr in yn){var Jn;Jr(((Jn=yn[Qr])===null||Jn===void 0?void 0:Jn.call(yn,Fi(),null))||null)}return Qr===Vt&&(xn(Fi()),He>0&&(clearTimeout(Yn.current),Yn.current=setTimeout(function(){$n({deadline:!0})},He))),St}),ea=Object(v.a)(Ui,2),ta=ea[0],Qr=ea[1],Vi=vt(Qr);Ei.current=Vi,Mt(function(){zt(Be);var on=Dn.current;if(Dn.current=!0,!Re)return;var Yr;!on&&Be&&Pe&&(Yr=jt),on&&Be&&Ce&&(Yr=Pt),(on&&!Be&&We||!on&&$e&&!Be&&We)&&(Yr=Xt),Yr&&(Nr(Yr),ta())},[Be]),Object(y.useEffect)(function(){(Ht===jt&&!Pe||Ht===Pt&&!Ce||Ht===Xt&&!We)&&Nr(ft)},[Pe,Ce,We]),Object(y.useEffect)(function(){return function(){clearTimeout(Yn.current),En.current=!0}},[]),Object(y.useEffect)(function(){Jt!==void 0&&Ht===ft&&(xr==null||xr(Jt))},[Jt,Ht]);var ra=en;return yn[kt]&&Qr===Et&&(ra=Object(M.a)({transition:"none"},ra)),[Ht,Qr,ra,Jt!=null?Jt:Be]}var Rt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){return Object(R.a)(this,Ke),Be.apply(this,arguments)}return Object(C.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(y.Component),br=Rt;function $r(Re){var Be=Re;Object(K.a)(Re)==="object"&&(Be=Re.transitionSupport);function Ke(pe){return!!(pe.motionName&&Be)}var Me=y.forwardRef(function(pe,Ce){var ye=pe.visible,Pe=ye===void 0?!0:ye,Fe=pe.removeOnLeave,We=Fe===void 0?!0:Fe,He=pe.forceRender,$e=pe.children,it=pe.motionName,gt=pe.leavedClassName,mt=pe.eventProps,xt=Ke(pe),Wt=Object(y.useRef)(),ar=Object(y.useRef)();function or(){try{return Object(rt.a)(Wt.current||ar.current)}catch(Nr){return null}}var ur=Bt(xt,Pe,or,pe),vr=Object(v.a)(ur,4),pr=vr[0],cr=vr[1],Lr=vr[2],xr=vr[3],gn=y.useRef(xr);xr&&(gn.current=!0);var wr=Object(y.useRef)(Ce);wr.current=Ce;var Jt=y.useCallback(function(Nr){Wt.current=Nr,Object(Le.b)(wr.current,Nr)},[]),zt,Or=Object(M.a)(Object(M.a)({},mt),{},{visible:Pe});if(!$e)zt=null;else if(pr===ft||!Ke(pe))xr?zt=$e(Object(M.a)({},Or),Jt):!We&&gn.current?zt=$e(Object(M.a)(Object(M.a)({},Or),{},{className:gt}),Jt):He?zt=$e(Object(M.a)(Object(M.a)({},Or),{},{style:{display:"none"}}),Jt):zt=null;else{var Mr,Ht;cr===kt?Ht="prepare":vt(cr)?Ht="active":cr===Et&&(Ht="start"),zt=$e(Object(M.a)(Object(M.a)({},Or),{},{className:S()(bt(it,pr),(Mr={},Object(N.a)(Mr,bt(it,"".concat(pr,"-").concat(Ht)),Ht),Object(N.a)(Mr,it,typeof it=="string"),Mr)),style:Lr}),Jt)}return y.createElement(br,{ref:ar},zt)});return Me.displayName="CSSMotion",Me}var Cr=$r(at),ut="add",It="keep",Br="remove",Vr="removed";function An(Re){var Be;return Re&&Object(K.a)(Re)==="object"&&"key"in Re?Be=Re:Be={key:Re},Object(M.a)(Object(M.a)({},Be),{},{key:String(Be.key)})}function fn(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Re.map(An)}function zr(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Me=0,pe=Be.length,Ce=fn(Re),ye=fn(Be);Ce.forEach(function(We){for(var He=!1,$e=Me;$e1});return Fe.forEach(function(We){Ke=Ke.filter(function(He){var $e=He.key,it=He.status;return $e!==We||it!==Br}),Ke.forEach(function(He){He.key===We&&(He.status=It)})}),Ke}var Dt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(Re){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cr,Ke=function(Me){Object(x.a)(Ce,Me);var pe=Object(E.a)(Ce);function Ce(){var ye;return Object(R.a)(this,Ce),ye=pe.apply(this,arguments),ye.state={keyEntities:[]},ye.removeKey=function(Pe){ye.setState(function(Fe){var We=Fe.keyEntities;return{keyEntities:We.map(function(He){return He.key!==Pe?He:Object(M.a)(Object(M.a)({},He),{},{status:Vr})})}})},ye}return Object(C.a)(Ce,[{key:"render",value:function(){var Pe=this,Fe=this.state.keyEntities,We=this.props,He=We.component,$e=We.children,it=We.onVisibleChanged,gt=Object(O.a)(We,["component","children","onVisibleChanged"]),mt=He||y.Fragment,xt={};return Dt.forEach(function(Wt){xt[Wt]=gt[Wt],delete gt[Wt]}),delete gt.keys,y.createElement(mt,gt,Fe.map(function(Wt){var ar=Wt.status,or=Object(O.a)(Wt,["status"]),ur=ar===ut||ar===It;return y.createElement(Be,Object(h.a)({},xt,{key:or.key,visible:ur,eventProps:or,onVisibleChanged:function(pr){it==null||it(pr,{key:or.key}),pr||Pe.removeKey(or.key)}}),$e)}))}}],[{key:"getDerivedStateFromProps",value:function(Pe,Fe){var We=Pe.keys,He=Fe.keyEntities,$e=fn(We),it=zr(He,$e);return{keyEntities:it.filter(function(gt){var mt=He.find(function(xt){var Wt=xt.key;return gt.key===Wt});return!(mt&&mt.status===Vr&>.status===Br)})}}}]),Ce}(y.Component);return Ke.defaultProps={component:"div"},Ke}var ct=dn(at),kr=Cr;function mr(Re){var Be=Re.prefixCls,Ke=Re.motion,Me=Re.animation,pe=Re.transitionName;return Ke||(Me?{motionName:"".concat(Be,"-").concat(Me)}:pe?{motionName:pe}:null)}function ei(Re){var Be=Re.prefixCls,Ke=Re.visible,Me=Re.zIndex,pe=Re.mask,Ce=Re.maskMotion,ye=Re.maskAnimation,Pe=Re.maskTransitionName;if(!pe)return null;var Fe={};return(Ce||Pe||ye)&&(Fe=Object(M.a)({motionAppear:!0},mr({motion:Ce,prefixCls:Be,transitionName:Pe,animation:ye}))),y.createElement(kr,Object(h.a)({},Fe,{visible:Ke,removeOnLeave:!0}),function(We){var He=We.className;return y.createElement("div",{style:{zIndex:Me},className:S()("".concat(Be,"-mask"),He)})})}var Tn=j("9mu1"),bn=j("o0o1"),di=j.n(bn),ti=j("HaE+"),sn=["measure","align",null,"motion"],Hr=function(Re,Be){var Ke=Object(y.useState)(null),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1],ye=Object(y.useRef)(),Pe=Object(y.useRef)(!1);function Fe($e){Pe.current||Ce($e)}function We(){Xe.a.cancel(ye.current)}function He($e){We(),ye.current=Object(Xe.a)(function(){Fe(function(it){switch(pe){case"align":return"motion";case"motion":return"stable";default:}return it}),$e==null||$e()})}return Object(y.useEffect)(function(){Fe("measure")},[Re]),Object(y.useEffect)(function(){switch(pe){case"measure":Be();break;default:}pe&&(ye.current=Object(Xe.a)(Object(ti.a)(di.a.mark(function $e(){var it,gt;return di.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:it=sn.indexOf(pe),gt=sn[it+1],gt&&it!==-1&&Fe(gt);case 3:case"end":return xt.stop()}},$e)}))))},[pe]),Object(y.useEffect)(function(){return function(){Pe.current=!0,We()}},[]),[pe,He]},fi=function(Re){var Be=y.useState({width:0,height:0}),Ke=Object(v.a)(Be,2),Me=Ke[0],pe=Ke[1];function Ce(Pe){pe({width:Pe.offsetWidth,height:Pe.offsetHeight})}var ye=y.useMemo(function(){var Pe={};if(Re){var Fe=Me.width,We=Me.height;Re.indexOf("height")!==-1&&We?Pe.height=We:Re.indexOf("minHeight")!==-1&&We&&(Pe.minHeight=We),Re.indexOf("width")!==-1&&Fe?Pe.width=Fe:Re.indexOf("minWidth")!==-1&&Fe&&(Pe.minWidth=Fe)}return Pe},[Re,Me]);return[ye,Ce]},hn=y.forwardRef(function(Re,Be){var Ke=Re.visible,Me=Re.prefixCls,pe=Re.className,Ce=Re.style,ye=Re.children,Pe=Re.zIndex,Fe=Re.stretch,We=Re.destroyPopupOnHide,He=Re.forceRender,$e=Re.align,it=Re.point,gt=Re.getRootDomNode,mt=Re.getClassNameFromAlign,xt=Re.onAlign,Wt=Re.onMouseEnter,ar=Re.onMouseLeave,or=Re.onMouseDown,ur=Re.onTouchStart,vr=Object(y.useRef)(),pr=Object(y.useRef)(),cr=Object(y.useState)(),Lr=Object(v.a)(cr,2),xr=Lr[0],gn=Lr[1],wr=fi(Fe),Jt=Object(v.a)(wr,2),zt=Jt[0],Or=Jt[1];function Mr(){Fe&&Or(gt())}var Ht=Hr(Ke,Mr),Nr=Object(v.a)(Ht,2),vn=Nr[0],Ur=Nr[1],en=Object(y.useRef)();function Jr(){return it||gt}function Dn(){var un;(un=vr.current)===null||un===void 0||un.forceAlign()}function Yn(un,tn){var xn=mt(tn);xr!==xn&&gn(xn),vn==="align"&&(xr!==xn?Promise.resolve().then(function(){Dn()}):Ur(function(){var yn;(yn=en.current)===null||yn===void 0||yn.call(en)}),xt==null||xt(un,tn))}var En=Object(M.a)({},mr(Re));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(un){var tn=En[un];En[un]=function(xn,yn){return Ur(),tn==null?void 0:tn(xn,yn)}});function yi(){return new Promise(function(un){en.current=un})}y.useEffect(function(){!En.motionName&&vn==="motion"&&Ur()},[En.motionName,vn]),y.useImperativeHandle(Be,function(){return{forceAlign:Dn,getElement:function(){return pr.current}}});var Fi=Object(M.a)(Object(M.a)({},zt),{},{zIndex:Pe,opacity:vn==="motion"||vn==="stable"||!Ke?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},Ce),Ei=!0;($e==null?void 0:$e.points)&&(vn==="align"||vn==="stable")&&(Ei=!1);var $n=ye;return y.Children.count(ye)>1&&($n=y.createElement("div",{className:"".concat(Me,"-content")},ye)),y.createElement(kr,Object(h.a)({visible:Ke,ref:pr,leavedClassName:"".concat(Me,"-hidden")},En,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:We,forceRender:He}),function(un,tn){var xn=un.className,yn=un.style,Ui=S()(Me,pe,xr,xn);return y.createElement(Tn.a,{target:Jr(),key:"popup",ref:vr,monitorWindowResize:!0,disabled:Ei,align:$e,onAlign:Yn},y.createElement("div",{ref:tn,className:Ui,onMouseEnter:Wt,onMouseLeave:ar,onMouseDownCapture:or,onTouchStartCapture:ur,style:Object(M.a)(Object(M.a)({},yn),Fi)},$n))})});hn.displayName="PopupInner";var Wr=hn,lr=y.forwardRef(function(Re,Be){var Ke=Re.prefixCls,Me=Re.visible,pe=Re.zIndex,Ce=Re.children,ye=Re.mobile;ye=ye===void 0?{}:ye;var Pe=ye.popupClassName,Fe=ye.popupStyle,We=ye.popupMotion,He=We===void 0?{}:We,$e=ye.popupRender,it=y.useRef();y.useImperativeHandle(Be,function(){return{forceAlign:function(){},getElement:function(){return it.current}}});var gt=Object(M.a)({zIndex:pe},Fe),mt=Ce;return y.Children.count(Ce)>1&&(mt=y.createElement("div",{className:"".concat(Ke,"-content")},Ce)),$e&&(mt=$e(mt)),y.createElement(kr,Object(h.a)({visible:Me,ref:it,removeOnLeave:!0},He),function(xt,Wt){var ar=xt.className,or=xt.style,ur=S()(Ke,Pe,ar);return y.createElement("div",{ref:Wt,className:ur,style:Object(M.a)(Object(M.a)({},or),gt)},mt)})});lr.displayName="MobilePopupInner";var nn=lr,qt=["visible","mobile"],Kt=y.forwardRef(function(Re,Be){var Ke=Re.visible,Me=Re.mobile,pe=Object(O.a)(Re,qt),Ce=Object(y.useState)(Ke),ye=Object(v.a)(Ce,2),Pe=ye[0],Fe=ye[1],We=Object(y.useState)(!1),He=Object(v.a)(We,2),$e=He[0],it=He[1],gt=Object(M.a)(Object(M.a)({},pe),{},{visible:Pe});Object(y.useEffect)(function(){Fe(Ke),Ke&&Me&&it(De())},[Ke,Me]);var mt=$e?y.createElement(nn,Object(h.a)({},gt,{mobile:Me,ref:Be})):y.createElement(Wr,Object(h.a)({},gt,{ref:Be}));return y.createElement("div",null,y.createElement(ei,gt),mt)});Kt.displayName="Popup";var er=Kt,Sr=y.createContext(null),jr=Sr;function Gr(){}function _n(){return""}function la(Re){return Re?Re.ownerDocument:window.document}var Yi=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function $i(Re){var Be=function(Ke){Object(x.a)(pe,Ke);var Me=Object(E.a)(pe);function pe(Ce){var ye;Object(R.a)(this,pe),ye=Me.call(this,Ce),ye.popupRef=y.createRef(),ye.triggerRef=y.createRef(),ye.attachId=void 0,ye.clickOutsideHandler=void 0,ye.touchOutsideHandler=void 0,ye.contextMenuOutsideHandler1=void 0,ye.contextMenuOutsideHandler2=void 0,ye.mouseDownTimeout=void 0,ye.focusTime=void 0,ye.preClickTime=void 0,ye.preTouchTime=void 0,ye.delayTimer=void 0,ye.hasPopupMouseDown=void 0,ye.onMouseEnter=function(Fe){var We=ye.props.mouseEnterDelay;ye.fireEvents("onMouseEnter",Fe),ye.delaySetPopupVisible(!0,We,We?null:Fe)},ye.onMouseMove=function(Fe){ye.fireEvents("onMouseMove",Fe),ye.setPoint(Fe)},ye.onMouseLeave=function(Fe){ye.fireEvents("onMouseLeave",Fe),ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onPopupMouseEnter=function(){ye.clearDelayTimer()},ye.onPopupMouseLeave=function(Fe){var We;if(Fe.relatedTarget&&!Fe.relatedTarget.setTimeout&&Object(et.a)((We=ye.popupRef.current)===null||We===void 0?void 0:We.getElement(),Fe.relatedTarget))return;ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onFocus=function(Fe){ye.fireEvents("onFocus",Fe),ye.clearDelayTimer(),ye.isFocusToShow()&&(ye.focusTime=Date.now(),ye.delaySetPopupVisible(!0,ye.props.focusDelay))},ye.onMouseDown=function(Fe){ye.fireEvents("onMouseDown",Fe),ye.preClickTime=Date.now()},ye.onTouchStart=function(Fe){ye.fireEvents("onTouchStart",Fe),ye.preTouchTime=Date.now()},ye.onBlur=function(Fe){ye.fireEvents("onBlur",Fe),ye.clearDelayTimer(),ye.isBlurToHide()&&ye.delaySetPopupVisible(!1,ye.props.blurDelay)},ye.onContextMenu=function(Fe){Fe.preventDefault(),ye.fireEvents("onContextMenu",Fe),ye.setPopupVisible(!0,Fe)},ye.onContextMenuClose=function(){ye.isContextMenuToShow()&&ye.close()},ye.onClick=function(Fe){if(ye.fireEvents("onClick",Fe),ye.focusTime){var We;if(ye.preClickTime&&ye.preTouchTime?We=Math.min(ye.preClickTime,ye.preTouchTime):ye.preClickTime?We=ye.preClickTime:ye.preTouchTime&&(We=ye.preTouchTime),Math.abs(We-ye.focusTime)<20)return;ye.focusTime=0}ye.preClickTime=0,ye.preTouchTime=0,ye.isClickToShow()&&(ye.isClickToHide()||ye.isBlurToHide())&&Fe&&Fe.preventDefault&&Fe.preventDefault();var He=!ye.state.popupVisible;(ye.isClickToHide()&&!He||He&&ye.isClickToShow())&&ye.setPopupVisible(!ye.state.popupVisible,Fe)},ye.onPopupMouseDown=function(){if(ye.hasPopupMouseDown=!0,clearTimeout(ye.mouseDownTimeout),ye.mouseDownTimeout=window.setTimeout(function(){ye.hasPopupMouseDown=!1},0),ye.context){var Fe;(Fe=ye.context).onPopupMouseDown.apply(Fe,arguments)}},ye.onDocumentClick=function(Fe){if(ye.props.mask&&!ye.props.maskClosable)return;var We=Fe.target,He=ye.getRootDomNode(),$e=ye.getPopupDomNode();(!Object(et.a)(He,We)||ye.isContextMenuOnly())&&!Object(et.a)($e,We)&&!ye.hasPopupMouseDown&&ye.close()},ye.getRootDomNode=function(){var Fe=ye.props.getTriggerDOMNode;if(Fe)return Fe(ye.triggerRef.current);try{var We=Object(rt.a)(ye.triggerRef.current);if(We)return We}catch(He){}return qe.a.findDOMNode(Object(g.a)(ye))},ye.getPopupClassNameFromAlign=function(Fe){var We=[],He=ye.props,$e=He.popupPlacement,it=He.builtinPlacements,gt=He.prefixCls,mt=He.alignPoint,xt=He.getPopupClassNameFromAlign;return $e&&it&&We.push(Ge(it,gt,Fe,mt)),xt&&We.push(xt(Fe)),We.join(" ")},ye.getComponent=function(){var Fe=ye.props,We=Fe.prefixCls,He=Fe.destroyPopupOnHide,$e=Fe.popupClassName,it=Fe.onPopupAlign,gt=Fe.popupMotion,mt=Fe.popupAnimation,xt=Fe.popupTransitionName,Wt=Fe.popupStyle,ar=Fe.mask,or=Fe.maskAnimation,ur=Fe.maskTransitionName,vr=Fe.maskMotion,pr=Fe.zIndex,cr=Fe.popup,Lr=Fe.stretch,xr=Fe.alignPoint,gn=Fe.mobile,wr=Fe.forceRender,Jt=ye.state,zt=Jt.popupVisible,Or=Jt.point,Mr=ye.getPopupAlign(),Ht={};return ye.isMouseEnterToShow()&&(Ht.onMouseEnter=ye.onPopupMouseEnter),ye.isMouseLeaveToHide()&&(Ht.onMouseLeave=ye.onPopupMouseLeave),Ht.onMouseDown=ye.onPopupMouseDown,Ht.onTouchStart=ye.onPopupMouseDown,y.createElement(er,Object(h.a)({prefixCls:We,destroyPopupOnHide:He,visible:zt,point:xr&&Or,className:$e,align:Mr,onAlign:it,animation:mt,getClassNameFromAlign:ye.getPopupClassNameFromAlign},Ht,{stretch:Lr,getRootDomNode:ye.getRootDomNode,style:Wt,mask:ar,zIndex:pr,transitionName:xt,maskAnimation:or,maskTransitionName:ur,maskMotion:vr,ref:ye.popupRef,motion:gt,mobile:gn,forceRender:wr}),typeof cr=="function"?cr():cr)},ye.attachParent=function(Fe){Xe.a.cancel(ye.attachId);var We=ye.props,He=We.getPopupContainer,$e=We.getDocument,it=ye.getRootDomNode(),gt;He?(it||He.length===0)&&(gt=He(it)):gt=$e(ye.getRootDomNode()).body,gt?gt.appendChild(Fe):ye.attachId=Object(Xe.a)(function(){ye.attachParent(Fe)})},ye.getContainer=function(){var Fe=ye.props.getDocument,We=Fe(ye.getRootDomNode()).createElement("div");return We.style.position="absolute",We.style.top="0",We.style.left="0",We.style.width="100%",ye.attachParent(We),We},ye.setPoint=function(Fe){var We=ye.props.alignPoint;if(!We||!Fe)return;ye.setState({point:{pageX:Fe.pageX,pageY:Fe.pageY}})},ye.handlePortalUpdate=function(){ye.state.prevPopupVisible!==ye.state.popupVisible&&ye.props.afterPopupVisibleChange(ye.state.popupVisible)},ye.triggerContextValue={onPopupMouseDown:ye.onPopupMouseDown};var Pe;return"popupVisible"in Ce?Pe=!!Ce.popupVisible:Pe=!!Ce.defaultPopupVisible,ye.state={prevPopupVisible:Pe,popupVisible:Pe},Yi.forEach(function(Fe){ye["fire".concat(Fe)]=function(We){ye.fireEvents(Fe,We)}}),ye}return Object(C.a)(pe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this.props,Pe=this.state;if(Pe.popupVisible){var Fe;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Fe=ye.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Oe.a)(Fe,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Fe=Fe||ye.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Oe.a)(Fe,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Fe=Fe||ye.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Oe.a)(Fe,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Oe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Xe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ye;return((ye=this.popupRef.current)===null||ye===void 0?void 0:ye.getElement())||null}},{key:"getPopupAlign",value:function(){var ye=this.props,Pe=ye.popupPlacement,Fe=ye.popupAlign,We=ye.builtinPlacements;return Pe&&We?Ne(We,Pe,Fe):Fe}},{key:"setPopupVisible",value:function(ye,Pe){var Fe=this.props.alignPoint,We=this.state.popupVisible;this.clearDelayTimer(),We!==ye&&("popupVisible"in this.props||this.setState({popupVisible:ye,prevPopupVisible:We}),this.props.onPopupVisibleChange(ye)),Fe&&Pe&&ye&&this.setPoint(Pe)}},{key:"delaySetPopupVisible",value:function(ye,Pe,Fe){var We=this,He=Pe*1e3;if(this.clearDelayTimer(),He){var $e=Fe?{pageX:Fe.pageX,pageY:Fe.pageY}:null;this.delayTimer=window.setTimeout(function(){We.setPopupVisible(ye,$e),We.clearDelayTimer()},He)}else this.setPopupVisible(ye,Fe)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ye){var Pe=this.props.children.props,Fe=this.props;return Pe[ye]&&Fe[ye]?this["fire".concat(ye)]:Pe[ye]||Fe[ye]}},{key:"isClickToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ye=this.props.action;return ye==="contextMenu"||ye.length===1&&ye[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("contextMenu")!==-1||Fe.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ye;(ye=this.popupRef.current)===null||ye===void 0||ye.forceAlign()}}},{key:"fireEvents",value:function(ye,Pe){var Fe=this.props.children.props[ye];Fe&&Fe(Pe);var We=this.props[ye];We&&We(Pe)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ye=this.state.popupVisible,Pe=this.props,Fe=Pe.children,We=Pe.forceRender,He=Pe.alignPoint,$e=Pe.className,it=Pe.autoDestroy,gt=y.Children.only(Fe),mt={key:"trigger"};this.isContextMenuToShow()?mt.onContextMenu=this.onContextMenu:mt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(mt.onClick=this.onClick,mt.onMouseDown=this.onMouseDown,mt.onTouchStart=this.onTouchStart):(mt.onClick=this.createTwoChains("onClick"),mt.onMouseDown=this.createTwoChains("onMouseDown"),mt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(mt.onMouseEnter=this.onMouseEnter,He&&(mt.onMouseMove=this.onMouseMove)):mt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?mt.onMouseLeave=this.onMouseLeave:mt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(mt.onFocus=this.onFocus,mt.onBlur=this.onBlur):(mt.onFocus=this.createTwoChains("onFocus"),mt.onBlur=this.createTwoChains("onBlur"));var xt=S()(gt&>.props&>.props.className,$e);xt&&(mt.className=xt);var Wt=Object(M.a)({},mt);Object(Le.c)(gt)&&(Wt.ref=Object(Le.a)(this.triggerRef,gt.ref));var ar=y.cloneElement(gt,Wt),or;return(ye||this.popupRef.current||We)&&(or=y.createElement(Re,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ye&&it&&(or=null),y.createElement(jr.Provider,{value:this.triggerContextValue},ar,or)}}],[{key:"getDerivedStateFromProps",value:function(ye,Pe){var Fe=ye.popupVisible,We={};return Fe!==void 0&&Pe.popupVisible!==Fe&&(We.popupVisible=Fe,We.prevPopupVisible=Pe.popupVisible),We}}]),pe}(y.Component);return Be.contextType=jr,Be.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:_n,getDocument:la,onPopupVisibleChange:Gr,afterPopupVisibleChange:Gr,onPopupAlign:Gr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Be}var Oi=$i(Ve.a),pn={adjustX:1,adjustY:1},Ki={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},Zr={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ri=Ki,Mn=0,ln={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Sn=function(Be,Ke,Me){var pe=ne(Ke),Ce=Be.getState();Be.setState({defaultActiveFirst:Object(M.a)(Object(M.a)({},Ce.defaultActiveFirst),{},Object(N.a)({},pe,Me))})},hi=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onDestroy=function(He){pe.props.onDestroy(He)},pe.onKeyDown=function(He){var $e=He.keyCode,it=pe.menuInstance,gt=pe.props.store,mt=pe.getVisible();if($e===s.a.ENTER)return pe.onTitleClick(He),Sn(gt,pe.props.eventKey,!0),!0;if($e===s.a.RIGHT)return mt?it.onKeyDown(He):(pe.triggerOpenChange(!0),Sn(gt,pe.props.eventKey,!0)),!0;if($e===s.a.LEFT){var xt;if(mt)xt=it.onKeyDown(He);else return;return xt||(pe.triggerOpenChange(!1),xt=!0),xt}return mt&&($e===s.a.UP||$e===s.a.DOWN)?it.onKeyDown(He):void 0},pe.onOpenChange=function(He){pe.props.onOpenChange(He)},pe.onPopupVisibleChange=function(He){pe.triggerOpenChange(He,He?"mouseenter":"mouseleave")},pe.onMouseEnter=function(He){var $e=pe.props,it=$e.eventKey,gt=$e.onMouseEnter,mt=$e.store;Sn(mt,pe.props.eventKey,!1),gt({key:it,domEvent:He})},pe.onMouseLeave=function(He){var $e=pe.props,it=$e.parentMenu,gt=$e.eventKey,mt=$e.onMouseLeave;it.subMenuInstance=Object(g.a)(pe),mt({key:gt,domEvent:He})},pe.onTitleMouseEnter=function(He){var $e=pe.props,it=$e.eventKey,gt=$e.onItemHover,mt=$e.onTitleMouseEnter;gt({key:it,hover:!0}),mt({key:it,domEvent:He})},pe.onTitleMouseLeave=function(He){var $e=pe.props,it=$e.parentMenu,gt=$e.eventKey,mt=$e.onItemHover,xt=$e.onTitleMouseLeave;it.subMenuInstance=Object(g.a)(pe),mt({key:gt,hover:!1}),xt({key:gt,domEvent:He})},pe.onTitleClick=function(He){var $e=Object(g.a)(pe),it=$e.props;if(it.onTitleClick({key:it.eventKey,domEvent:He}),it.triggerSubMenuAction==="hover")return;pe.triggerOpenChange(!pe.getVisible(),"click"),Sn(it.store,pe.props.eventKey,!1)},pe.onSubMenuClick=function(He){typeof pe.props.onClick=="function"&&pe.props.onClick(pe.addKeyPath(He))},pe.onSelect=function(He){pe.props.onSelect(He)},pe.onDeselect=function(He){pe.props.onDeselect(He)},pe.getPrefixCls=function(){return"".concat(pe.props.rootPrefixCls,"-submenu")},pe.getActiveClassName=function(){return"".concat(pe.getPrefixCls(),"-active")},pe.getDisabledClassName=function(){return"".concat(pe.getPrefixCls(),"-disabled")},pe.getSelectedClassName=function(){return"".concat(pe.getPrefixCls(),"-selected")},pe.getOpenClassName=function(){return"".concat(pe.props.rootPrefixCls,"-submenu-open")},pe.getVisible=function(){return pe.state.isOpen},pe.getMode=function(){return pe.state.mode},pe.saveMenuInstance=function(He){pe.menuInstance=He},pe.addKeyPath=function(He){return Object(M.a)(Object(M.a)({},He),{},{keyPath:(He.keyPath||[]).concat(pe.props.eventKey)})},pe.triggerOpenChange=function(He,$e){var it=pe.props.eventKey,gt=function(){pe.onOpenChange({key:it,item:Object(g.a)(pe),trigger:$e,open:He})};$e==="mouseenter"?pe.mouseenterTimeout=setTimeout(function(){gt()},0):gt()},pe.isChildrenSelected=function(){var He={find:!1};return X(pe.props.children,pe.props.selectedKeys,He),He.find},pe.isInlineMode=function(){return pe.getMode()==="inline"},pe.adjustWidth=function(){if(!pe.subMenuTitle||!pe.menuInstance)return;var He=Je.findDOMNode(pe.menuInstance);if(He.offsetWidth>=pe.subMenuTitle.offsetWidth)return;He.style.minWidth="".concat(pe.subMenuTitle.offsetWidth,"px")},pe.saveSubMenuTitle=function(He){pe.subMenuTitle=He},pe.getBaseProps=function(){var He=Object(g.a)(pe),$e=He.props,it=pe.getMode();return{mode:it==="horizontal"?"vertical":it,visible:pe.getVisible(),level:$e.level+1,inlineIndent:$e.inlineIndent,focusable:!1,onClick:pe.onSubMenuClick,onSelect:pe.onSelect,onDeselect:pe.onDeselect,onDestroy:pe.onDestroy,selectedKeys:$e.selectedKeys,eventKey:"".concat($e.eventKey,"-menu-"),openKeys:$e.openKeys,motion:$e.motion,onOpenChange:pe.onOpenChange,subMenuOpenDelay:$e.subMenuOpenDelay,parentMenu:Object(g.a)(pe),subMenuCloseDelay:$e.subMenuCloseDelay,forceSubMenuRender:$e.forceSubMenuRender,triggerSubMenuAction:$e.triggerSubMenuAction,builtinPlacements:$e.builtinPlacements,defaultActiveFirst:$e.store.getState().defaultActiveFirst[ne($e.eventKey)],multiple:$e.multiple,prefixCls:$e.rootPrefixCls,id:pe.internalMenuId,manualRef:pe.saveMenuInstance,itemIcon:$e.itemIcon,expandIcon:$e.expandIcon,direction:$e.direction}},pe.getMotion=function(He,$e){var it=Object(g.a)(pe),gt=it.haveRendered,mt=pe.props,xt=mt.motion,Wt=mt.rootPrefixCls,ar=Object(M.a)(Object(M.a)({},xt),{},{leavedClassName:"".concat(Wt,"-hidden"),removeOnLeave:!1,motionAppear:gt||!$e||He!=="inline"});return ar};var Ce=Me.store,ye=Me.eventKey,Pe=Ce.getState(),Fe=Pe.defaultActiveFirst;pe.isRootMenu=!1;var We=!1;return Fe&&(We=Fe[ye]),Sn(Ce,ye,We),pe.state={mode:Me.mode,isOpen:Me.isOpen},pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var pe=this,Ce=this.props,ye=Ce.mode,Pe=Ce.parentMenu,Fe=Ce.manualRef,We=Ce.isOpen,He=function(){pe.setState({mode:ye,isOpen:We})},$e=We!==this.state.isOpen,it=ye!==this.state.mode;if((it||$e)&&(Xe.a.cancel(this.updateStateRaf),it?this.updateStateRaf=Object(Xe.a)(He):He()),Fe&&Fe(this),ye!=="horizontal"||!(Pe==null?void 0:Pe.isRootMenu)||!We)return;this.minWidthTimeout=setTimeout(function(){return pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var pe=this.props,Ce=pe.onDestroy,ye=pe.eventKey;Ce&&Ce(ye),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Xe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(pe,Ce){var ye=this.getBaseProps();return y.createElement(ji,Object(h.a)({},ye,{id:this.internalMenuId,className:pe,style:Ce}),this.props.children)}},{key:"renderChildren",value:function(){var pe=this,Ce=this.getBaseProps(),ye=Ce.mode,Pe=Ce.visible,Fe=Ce.forceSubMenuRender,We=Ce.direction,He=this.getMotion(ye,Pe);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Pe||Fe,!this.haveOpened)return y.createElement("div",null);var $e=S()("".concat(Ce.prefixCls,"-sub"),Object(N.a)({},"".concat(Ce.prefixCls,"-rtl"),We==="rtl"));return this.isInlineMode()?y.createElement(kr,Object(h.a)({visible:Ce.visible,forceRender:Fe},He),function(it){var gt=it.className,mt=it.style,xt=S()($e,gt);return pe.renderPopupMenu(xt,mt)}):this.renderPopupMenu($e)}},{key:"render",value:function(){var pe,Ce,ye,Pe=Object(M.a)({},this.props),Fe=this.getVisible(),We=this.getPrefixCls(),He=this.isInlineMode(),$e=this.getMode(),it=S()(We,"".concat(We,"-").concat($e),(pe={},Object(N.a)(pe,Pe.className,!!Pe.className),Object(N.a)(pe,this.getOpenClassName(),Fe),Object(N.a)(pe,this.getActiveClassName(),Pe.active||Fe&&!He),Object(N.a)(pe,this.getDisabledClassName(),Pe.disabled),Object(N.a)(pe,this.getSelectedClassName(),this.isChildrenSelected()),pe));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(Mn+=1,this.internalMenuId="$__$".concat(Mn,"$Menu")));var gt={},mt={},xt={};Pe.disabled||(gt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},mt={onClick:this.onTitleClick},xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},ar=Pe.direction,or=ar==="rtl";He&&(or?Wt.paddingRight=Pe.inlineIndent*Pe.level:Wt.paddingLeft=Pe.inlineIndent*Pe.level);var ur={};this.getVisible()&&(ur={"aria-owns":this.internalMenuId});var vr=null;$e!=="horizontal"&&(vr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(vr=y.createElement(this.props.expandIcon,Object(M.a)({},this.props))));var pr=y.createElement("div",Object(h.a)({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(We,"-title"),role:"button"},xt,mt,{"aria-expanded":Fe},ur,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,vr||y.createElement("i",{className:"".concat(We,"-arrow")})),cr=this.renderChildren(),Lr=((Ce=Pe.parentMenu)===null||Ce===void 0?void 0:Ce.isRootMenu)?Pe.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},xr=ln[$e],gn=Pe.popupOffset?{offset:Pe.popupOffset}:{},wr=S()((ye={},Object(N.a)(ye,Pe.popupClassName,Pe.popupClassName&&!He),Object(N.a)(ye,"".concat(We,"-rtl"),or),ye)),Jt=Pe.disabled,zt=Pe.triggerSubMenuAction,Or=Pe.subMenuOpenDelay,Mr=Pe.forceSubMenuRender,Ht=Pe.subMenuCloseDelay,Nr=Pe.builtinPlacements;Q.forEach(function(Jr){return delete Pe[Jr]}),delete Pe.onClick;var vn=or?Object(M.a)(Object(M.a)({},Zr),Nr):Object(M.a)(Object(M.a)({},Ki),Nr);delete Pe.direction;var Ur=this.getBaseProps(),en=He?null:this.getMotion(Ur.mode,Ur.visible);return y.createElement("li",Object(h.a)({},Pe,gt,{className:it,role:"menuitem"}),y.createElement(Oi,{prefixCls:We,popupClassName:S()("".concat(We,"-popup"),wr),getPopupContainer:Lr,builtinPlacements:vn,popupPlacement:xr,popupVisible:He?!1:Fe,popupAlign:gn,popup:He?null:cr,action:Jt||He?[]:[zt],mouseEnterDelay:Or,mouseLeaveDelay:Ht,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Mr,popupMotion:en},pr),He?cr:null)}}]),Ke}(y.Component);hi.defaultProps={onMouseEnter:ie,onMouseLeave:ie,onTitleMouseEnter:ie,onTitleMouseLeave:ie,onTitleClick:ie,manualRef:ie,mode:"vertical",title:""};var Kn=Object(T.b)(function(Re,Be){var Ke=Re.openKeys,Me=Re.activeKey,pe=Re.selectedKeys,Ce=Be.eventKey,ye=Be.subMenuKey;return{isOpen:Ke.indexOf(Ce)>-1,active:Me[ye]===Ce,selectedKeys:pe}})(hi);Kn.isSubMenu=!0;var zn=Kn,Li="menuitem-overflowed",Mi=.5,Gn=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.resizeObserver=null,Me.mutationObserver=null,Me.originalTotalWidth=0,Me.overflowedItems=[],Me.menuItemSizes=[],Me.cancelFrameId=null,Me.state={lastVisibleIndex:void 0},Me.childRef=y.createRef(),Me.getMenuItemNodes=function(){var pe=Me.props.prefixCls,Ce=Me.childRef.current;return Ce?[].slice.call(Ce.children).filter(function(ye){return ye.className.split(" ").indexOf("".concat(pe,"-overflowed-submenu"))<0}):[]},Me.getOverflowedSubMenuItem=function(pe,Ce,ye){var Pe=Me.props,Fe=Pe.overflowedIndicator,We=Pe.level,He=Pe.mode,$e=Pe.prefixCls,it=Pe.theme;if(We!==1||He!=="horizontal")return null;var gt=Me.props.children[0],mt=gt.props,xt=mt.children,Wt=mt.title,ar=mt.style,or=Object(O.a)(mt,["children","title","style"]),ur=Object(M.a)({},ar),vr="".concat(pe,"-overflowed-indicator"),pr="".concat(pe,"-overflowed-indicator");Ce.length===0&&ye!==!0?ur=Object(M.a)(Object(M.a)({},ur),{},{display:"none"}):ye&&(ur=Object(M.a)(Object(M.a)({},ur),{},{visibility:"hidden",position:"absolute"}),vr="".concat(vr,"-placeholder"),pr="".concat(pr,"-placeholder"));var cr=it?"".concat($e,"-").concat(it):"",Lr={};return Q.forEach(function(xr){or[xr]!==void 0&&(Lr[xr]=or[xr])}),y.createElement(zn,Object(h.a)({title:Fe,className:"".concat($e,"-overflowed-submenu"),popupClassName:cr},Lr,{key:vr,eventKey:pr,disabled:!1,style:ur}),Ce)},Me.setChildrenWidthAndResize=function(){if(Me.props.mode!=="horizontal")return;var pe=Me.childRef.current;if(!pe)return;var Ce=pe.children;if(!Ce||Ce.length===0)return;var ye=pe.children[Ce.length-1];fe(ye,"display","inline-block");var Pe=Me.getMenuItemNodes(),Fe=Pe.filter(function(We){return We.className.split(" ").indexOf(Li)>=0});Fe.forEach(function(We){fe(We,"display","inline-block")}),Me.menuItemSizes=Pe.map(function(We){return me(We,!0)}),Fe.forEach(function(We){fe(We,"display","none")}),Me.overflowedIndicatorWidth=me(pe.children[pe.children.length-1],!0),Me.originalTotalWidth=Me.menuItemSizes.reduce(function(We,He){return We+He},0),Me.handleResize(),fe(ye,"display","none")},Me.handleResize=function(){if(Me.props.mode!=="horizontal")return;var pe=Me.childRef.current;if(!pe)return;var Ce=me(pe);Me.overflowedItems=[];var ye=0,Pe;Me.originalTotalWidth>Ce+Mi&&(Pe=-1,Me.menuItemSizes.forEach(function(Fe){ye+=Fe,ye+Me.overflowedIndicatorWidth<=Ce&&(Pe+=1)})),Me.setState({lastVisibleIndex:Pe})},Me}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){var pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ce=this.childRef.current;if(!Ce)return;this.resizeObserver=new ze.default(function(ye){ye.forEach(function(){var Pe=pe.cancelFrameId;cancelAnimationFrame(Pe),pe.cancelFrameId=requestAnimationFrame(pe.setChildrenWidthAndResize)})}),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){pe.resizeObserver.observe(ye)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){pe.resizeObserver.disconnect(),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){pe.resizeObserver.observe(ye)}),pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ce,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(pe){var Ce=this,ye=this.state.lastVisibleIndex;return(pe||[]).reduce(function(Pe,Fe,We){var He=Fe;if(Ce.props.mode==="horizontal"){var $e=Ce.getOverflowedSubMenuItem(Fe.props.eventKey,[]);ye!==void 0&&Ce.props.className.indexOf("".concat(Ce.props.prefixCls,"-root"))!==-1&&(We>ye&&(He=y.cloneElement(Fe,{style:{display:"none"},eventKey:"".concat(Fe.props.eventKey,"-hidden"),className:"".concat(Li)})),We===ye+1&&(Ce.overflowedItems=pe.slice(ye+1).map(function(gt){return y.cloneElement(gt,{key:gt.props.eventKey,mode:"vertical-left"})}),$e=Ce.getOverflowedSubMenuItem(Fe.props.eventKey,Ce.overflowedItems)));var it=[].concat(Object(d.a)(Pe),[$e,He]);return We===pe.length-1&&it.push(Ce.getOverflowedSubMenuItem(Fe.props.eventKey,[],!0)),it}return[].concat(Object(d.a)(Pe),[He])},[])}},{key:"render",value:function(){var pe=this.props,Ce=pe.visible,ye=pe.prefixCls,Pe=pe.overflowedIndicator,Fe=pe.mode,We=pe.level,He=pe.tag,$e=pe.children,it=pe.theme,gt=Object(O.a)(pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),mt=He;return y.createElement(mt,Object(h.a)({ref:this.childRef},gt),this.renderChildren($e))}}]),Ke}(y.Component);Gn.defaultProps={tag:"div",className:""};var Ni=Gn;function pi(Re){return Re.length?Re.every(function(Be){return!!Be.props.disabled}):!0}function mi(Re,Be,Ke){var Me=Re.getState();Re.setState({activeKey:Object(M.a)(Object(M.a)({},Me.activeKey),{},Object(N.a)({},Be,Ke))})}function Xn(Re){return Re.eventKey||"0-menu-"}function Vn(Re,Be){var Ke=Be,Me=Re.children,pe=Re.eventKey;if(Ke){var Ce;if(J(Me,function(ye,Pe){ye&&ye.props&&!ye.props.disabled&&Ke===Ee(ye,pe,Pe)&&(Ce=!0)}),Ce)return Ke}return Ke=null,Re.defaultActiveFirst&&J(Me,function(ye,Pe){!Ke&&ye&&!ye.props.disabled&&(Ke=Ee(ye,pe,Pe))}),Ke}function ki(Re){if(!Re)return;var Be=this.instanceArray.indexOf(Re);Be!==-1?this.instanceArray[Be]=Re:this.instanceArray.push(Re)}var ni=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;return Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onKeyDown=function(Ce,ye){var Pe=Ce.keyCode,Fe;if(pe.getFlatInstanceArray().forEach(function(He){He&&He.props.active&&He.onKeyDown&&(Fe=He.onKeyDown(Ce))}),Fe)return 1;var We=null;return(Pe===s.a.UP||Pe===s.a.DOWN)&&(We=pe.step(Pe===s.a.UP?-1:1)),We?(Ce.preventDefault(),mi(pe.props.store,Xn(pe.props),We.props.eventKey),typeof ye=="function"&&ye(We),1):void 0},pe.onItemHover=function(Ce){var ye=Ce.key,Pe=Ce.hover;mi(pe.props.store,Xn(pe.props),Pe?ye:null)},pe.onDeselect=function(Ce){pe.props.onDeselect(Ce)},pe.onSelect=function(Ce){pe.props.onSelect(Ce)},pe.onClick=function(Ce){pe.props.onClick(Ce)},pe.onOpenChange=function(Ce){pe.props.onOpenChange(Ce)},pe.onDestroy=function(Ce){pe.props.onDestroy(Ce)},pe.getFlatInstanceArray=function(){return pe.instanceArray},pe.step=function(Ce){var ye=pe.getFlatInstanceArray(),Pe=pe.props.store.getState().activeKey[Xn(pe.props)],Fe=ye.length;if(!Fe)return null;Ce<0&&(ye=ye.concat().reverse());var We=-1;if(ye.every(function(gt,mt){return gt&>.props.eventKey===Pe?(We=mt,!1):!0}),!pe.props.defaultActiveFirst&&We!==-1&&pi(ye.slice(We,Fe-1)))return;var He=(We+1)%Fe,$e=He;do{var it=ye[$e];if(!it||it.props.disabled)$e=($e+1)%Fe;else return it}while($e!==He);return null},pe.renderCommonMenuItem=function(Ce,ye,Pe){var Fe=pe.props.store.getState(),We=Object(g.a)(pe),He=We.props,$e=Ee(Ce,He.eventKey,ye),it=Ce.props;if(!it||typeof Ce.type=="string")return Ce;var gt=$e===Fe.activeKey,mt=Object(M.a)(Object(M.a)({mode:it.mode||He.mode,level:He.level,inlineIndent:He.inlineIndent,renderMenuItem:pe.renderMenuItem,rootPrefixCls:He.prefixCls,index:ye,parentMenu:He.parentMenu,manualRef:it.disabled?void 0:Object(L.a)(Ce.ref,ki.bind(Object(g.a)(pe))),eventKey:$e,active:!it.disabled&>,multiple:He.multiple,onClick:function(Wt){(it.onClick||ie)(Wt),pe.onClick(Wt)},onItemHover:pe.onItemHover,motion:He.motion,subMenuOpenDelay:He.subMenuOpenDelay,subMenuCloseDelay:He.subMenuCloseDelay,forceSubMenuRender:He.forceSubMenuRender,onOpenChange:pe.onOpenChange,onDeselect:pe.onDeselect,onSelect:pe.onSelect,builtinPlacements:He.builtinPlacements,itemIcon:it.itemIcon||pe.props.itemIcon,expandIcon:it.expandIcon||pe.props.expandIcon},Pe),{},{direction:He.direction});return(He.mode==="inline"||Te())&&(mt.triggerSubMenuAction="click"),y.cloneElement(Ce,Object(M.a)(Object(M.a)({},mt),{},{key:$e||ye}))},pe.renderMenuItem=function(Ce,ye,Pe){if(!Ce)return null;var Fe=pe.props.store.getState(),We={openKeys:Fe.openKeys,selectedKeys:Fe.selectedKeys,triggerSubMenuAction:pe.props.triggerSubMenuAction,subMenuKey:Pe};return pe.renderCommonMenuItem(Ce,ye,We)},Me.store.setState({activeKey:Object(M.a)(Object(M.a)({},Me.store.getState().activeKey),{},Object(N.a)({},Me.eventKey,Vn(Me,Me.activeKey)))}),pe.instanceArray=[],pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(pe){return this.props.visible||pe.visible||this.props.className!==pe.className||!G()(this.props.style,pe.style)}},{key:"componentDidUpdate",value:function(pe){var Ce=this.props,ye="activeKey"in Ce?Ce.activeKey:Ce.store.getState().activeKey[Xn(Ce)],Pe=Vn(Ce,ye);if(Pe!==ye)mi(Ce.store,Xn(Ce),Pe);else if("activeKey"in pe){var Fe=Vn(pe,pe.activeKey);Pe!==Fe&&mi(Ce.store,Xn(Ce),Pe)}}},{key:"render",value:function(){var pe=this,Ce=Object(h.a)({},this.props);this.instanceArray=[];var ye=S()(Ce.prefixCls,Ce.className,"".concat(Ce.prefixCls,"-").concat(Ce.mode)),Pe={className:ye,role:Ce.role||"menu"};Ce.id&&(Pe.id=Ce.id),Ce.focusable&&(Pe.tabIndex=0,Pe.onKeyDown=this.onKeyDown);var Fe=Ce.prefixCls,We=Ce.eventKey,He=Ce.visible,$e=Ce.level,it=Ce.mode,gt=Ce.overflowedIndicator,mt=Ce.theme;return Q.forEach(function(xt){return delete Ce[xt]}),delete Ce.onClick,y.createElement(Ni,Object(h.a)({},Ce,{prefixCls:Fe,mode:it,tag:"ul",level:$e,theme:mt,visible:He,overflowedIndicator:gt},Pe),Object(b.a)(Ce.children).map(function(xt,Wt){return pe.renderMenuItem(xt,Wt,We||"0-menu-")}))}}]),Ke}(y.Component);ni.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ie};var gi=Object(T.b)()(ni),ji=gi,ii=j("Kwbf");function Pr(Re,Be,Ke){var Me=Re.prefixCls,pe=Re.motion,Ce=Re.defaultMotions,ye=Ce===void 0?{}:Ce,Pe=Re.openAnimation,Fe=Re.openTransitionName,We=Be.switchingModeFromInline;if(pe)return pe;if(Object(K.a)(Pe)==="object"&&Pe)Object(ii.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Pe=="string")return{motionName:"".concat(Me,"-open-").concat(Pe)};if(Fe)return{motionName:Fe};var He=ye[Ke];return He||(We?null:ye.other)}var Nt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onSelect=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props;if(We.selectable){var He=pe.store.getState(),$e=He.selectedKeys,it=Pe.key;We.multiple?$e=$e.concat([it]):$e=[it],"selectedKeys"in We||pe.store.setState({selectedKeys:$e}),We.onSelect(Object(M.a)(Object(M.a)({},Pe),{},{selectedKeys:$e}))}},pe.onClick=function(Pe){var Fe=pe.getRealMenuMode(),We=Object(g.a)(pe),He=We.store,$e=We.props.onOpenChange;Fe!=="inline"&&!("openKeys"in pe.props)&&(He.setState({openKeys:[]}),$e([])),pe.props.onClick(Pe)},pe.onKeyDown=function(Pe,Fe){pe.innerMenu.getWrappedInstance().onKeyDown(Pe,Fe)},pe.onOpenChange=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props,He=pe.store.getState().openKeys.concat(),$e=!1,it=function(mt){var xt=!1;if(mt.open)xt=He.indexOf(mt.key)===-1,xt&&He.push(mt.key);else{var Wt=He.indexOf(mt.key);xt=Wt!==-1,xt&&He.splice(Wt,1)}$e=$e||xt};Array.isArray(Pe)?Pe.forEach(it):it(Pe),$e&&("openKeys"in pe.props||pe.store.setState({openKeys:He}),We.onOpenChange(He))},pe.onDeselect=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props;if(We.selectable){var He=pe.store.getState().selectedKeys.concat(),$e=Pe.key,it=He.indexOf($e);it!==-1&&He.splice(it,1),"selectedKeys"in We||pe.store.setState({selectedKeys:He}),We.onDeselect(Object(M.a)(Object(M.a)({},Pe),{},{selectedKeys:He}))}},pe.onMouseEnter=function(Pe){pe.restoreModeVerticalFromInline();var Fe=pe.props.onMouseEnter;Fe&&Fe(Pe)},pe.onTransitionEnd=function(Pe){var Fe=Pe.propertyName==="width"&&Pe.target===Pe.currentTarget,We=Pe.target.className,He=Object.prototype.toString.call(We)==="[object SVGAnimatedString]"?We.animVal:We,$e=Pe.propertyName==="font-size"&&He.indexOf("anticon")>=0;(Fe||$e)&&pe.restoreModeVerticalFromInline()},pe.setInnerMenu=function(Pe){pe.innerMenu=Pe},pe.isRootMenu=!0;var Ce=Me.defaultSelectedKeys,ye=Me.defaultOpenKeys;return"selectedKeys"in Me&&(Ce=Me.selectedKeys||[]),"openKeys"in Me&&(ye=Me.openKeys||[]),pe.store=Object(T.c)({selectedKeys:Ce,openKeys:ye,activeKey:{"0-menu-":Vn(Me,Me.activeKey)}}),pe.state={switchingModeFromInline:!1,prevProps:Me,inlineOpenKeys:[],store:pe.store},pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(pe){var Ce=this.props,ye=Ce.siderCollapsed,Pe=Ce.inlineCollapsed,Fe=Ce.onOpenChange;(!pe.inlineCollapsed&&Pe||!pe.siderCollapsed&&ye)&&Fe([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var pe=this.props.collapsedWidth,Ce=this.store,ye=this.prevOpenKeys,Pe=this.getInlineCollapsed()&&(pe===0||pe==="0"||pe==="0px");Pe?(this.prevOpenKeys=Ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ye&&(this.store.setState({openKeys:ye}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var pe=this.props.mode,Ce=this.state.switchingModeFromInline,ye=this.getInlineCollapsed();return Ce&&ye?"inline":ye?"vertical":pe}},{key:"getInlineCollapsed",value:function(){var pe=this.props,Ce=pe.inlineCollapsed,ye=pe.siderCollapsed;return ye!==void 0?ye:Ce}},{key:"restoreModeVerticalFromInline",value:function(){var pe=this.state.switchingModeFromInline;pe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var pe=Object(M.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ce=this.getRealMenuMode();return pe.className+=" ".concat(pe.prefixCls,"-root"),pe.direction==="rtl"&&(pe.className+=" ".concat(pe.prefixCls,"-rtl")),pe=Object(M.a)(Object(M.a)({},pe),{},{mode:Ce,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Pr(this.props,this.state,Ce)}),delete pe.openAnimation,delete pe.openTransitionName,y.createElement(T.a,{store:this.store},y.createElement(ji,Object(h.a)({},pe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(pe,Ce){var ye=Ce.prevProps,Pe=Ce.store,Fe=Pe.getState(),We={},He={prevProps:pe};return ye.mode==="inline"&&pe.mode!=="inline"&&(He.switchingModeFromInline=!0),"openKeys"in pe?We.openKeys=pe.openKeys||[]:((pe.inlineCollapsed&&!ye.inlineCollapsed||pe.siderCollapsed&&!ye.siderCollapsed)&&(He.switchingModeFromInline=!0,He.inlineOpenKeys=Fe.openKeys,We.openKeys=[]),(!pe.inlineCollapsed&&ye.inlineCollapsed||!pe.siderCollapsed&&ye.siderCollapsed)&&(We.openKeys=Ce.inlineOpenKeys,He.inlineOpenKeys=[])),Object.keys(We).length&&Pe.setState(We),He}}]),Ke}(y.Component);Nt.defaultProps={selectable:!0,onClick:ie,onSelect:ie,onOpenChange:ie,onDeselect:ie,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:y.createElement("span",null,"\xB7\xB7\xB7")};var Yt=Nt,Ut=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.onKeyDown=function(pe){var Ce=pe.keyCode;return Ce===s.a.ENTER?(Me.onClick(pe),!0):void 0},Me.onMouseLeave=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.onItemHover,Fe=Ce.onMouseLeave;Pe({key:ye,hover:!1}),Fe({key:ye,domEvent:pe})},Me.onMouseEnter=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.onItemHover,Fe=Ce.onMouseEnter;Pe({key:ye,hover:!0}),Fe({key:ye,domEvent:pe})},Me.onClick=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.multiple,Fe=Ce.onClick,We=Ce.onSelect,He=Ce.onDeselect,$e=Ce.isSelected,it={key:ye,keyPath:[ye],item:Object(g.a)(Me),domEvent:pe};Fe(it),Pe?$e?He(it):We(it):$e||We(it)},Me.saveNode=function(pe){Me.node=pe},Me}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var pe=this.props;pe.onDestroy&&pe.onDestroy(pe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var pe,Ce=Object(M.a)({},this.props),ye=S()(this.getPrefixCls(),Ce.className,(pe={},Object(N.a)(pe,this.getActiveClassName(),!Ce.disabled&&Ce.active),Object(N.a)(pe,this.getSelectedClassName(),Ce.isSelected),Object(N.a)(pe,this.getDisabledClassName(),Ce.disabled),pe)),Pe=Object(M.a)(Object(M.a)({},Ce.attribute),{},{title:typeof Ce.title=="string"?Ce.title:void 0,className:ye,role:Ce.role||"menuitem","aria-disabled":Ce.disabled});Ce.role==="option"?Pe=Object(M.a)(Object(M.a)({},Pe),{},{role:"option","aria-selected":Ce.isSelected}):(Ce.role===null||Ce.role==="none")&&(Pe.role="none");var Fe={onClick:Ce.disabled?null:this.onClick,onMouseLeave:Ce.disabled?null:this.onMouseLeave,onMouseEnter:Ce.disabled?null:this.onMouseEnter},We=Object(M.a)({},Ce.style);Ce.mode==="inline"&&(Ce.direction==="rtl"?We.paddingRight=Ce.inlineIndent*Ce.level:We.paddingLeft=Ce.inlineIndent*Ce.level),Q.forEach(function($e){return delete Ce[$e]}),delete Ce.direction;var He=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(He=y.createElement(this.props.itemIcon,this.props)),y.createElement("li",Object(h.a)({},Object(k.a)(Ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Pe,Fe,{style:We,ref:this.saveNode}),Ce.children,He)}}]),Ke}(y.Component);Ut.isMenuItem=!0,Ut.defaultProps={onSelect:ie,onMouseEnter:ie,onMouseLeave:ie,manualRef:ie};var nr=Object(T.b)(function(Re,Be){var Ke=Re.activeKey,Me=Re.selectedKeys,pe=Be.eventKey,Ce=Be.subMenuKey;return{active:Ke[Ce]===pe,isSelected:Array.isArray(Me)?Me.indexOf(pe)!==-1:Me===pe}})(Ut),gr=nr,Rr=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.renderInnerMenuItem=function(pe){var Ce=Me.props,ye=Ce.renderMenuItem,Pe=Ce.index;return ye(pe,Pe,Me.props.subMenuKey)},Me}return Object(C.a)(Ke,[{key:"render",value:function(){var pe=Object(h.a)({},this.props),Ce=pe.className,ye=Ce===void 0?"":Ce,Pe=pe.rootPrefixCls,Fe="".concat(Pe,"-item-group-title"),We="".concat(Pe,"-item-group-list"),He=pe.title,$e=pe.children;return Q.forEach(function(it){return delete pe[it]}),delete pe.direction,y.createElement("li",Object(h.a)({},pe,{onClick:function(gt){return gt.stopPropagation()},className:"".concat(ye," ").concat(Pe,"-item-group")}),y.createElement("div",{className:Fe,title:typeof He=="string"?He:void 0},He),y.createElement("ul",{className:We},y.Children.map($e,this.renderInnerMenuItem)))}}]),Ke}(y.Component);Rr.isMenuItemGroup=!0,Rr.defaultProps={disabled:!0};var dr=Rr,qr=function(Be){var Ke=Be.className,Me=Be.rootPrefixCls,pe=Be.style;return y.createElement("li",{className:"".concat(Ke," ").concat(Me,"-item-divider"),style:pe})};qr.defaultProps={disabled:!0,className:"",style:{}};var Un=qr,sr=Yt,vi=j("eDIo");function Ir(Re,Be){var Ke=Re.prefixCls,Me=Re.editable,pe=Re.locale,Ce=Re.style;return!Me||Me.showAdd===!1?null:y.createElement("button",{ref:Be,type:"button",className:"".concat(Ke,"-nav-add"),style:Ce,"aria-label":(pe==null?void 0:pe.addAriaLabel)||"Add tab",onClick:function(Pe){Me.onEdit("add",{event:Pe})}},Me.addIcon||"+")}var On=y.forwardRef(Ir);function Rn(Re,Be){var Ke=Re.prefixCls,Me=Re.id,pe=Re.tabs,Ce=Re.locale,ye=Re.mobile,Pe=Re.moreIcon,Fe=Pe===void 0?"More":Pe,We=Re.moreTransitionName,He=Re.style,$e=Re.className,it=Re.editable,gt=Re.tabBarGutter,mt=Re.rtl,xt=Re.onTabClick,Wt=Object(y.useState)(!1),ar=Object(v.a)(Wt,2),or=ar[0],ur=ar[1],vr=Object(y.useState)(null),pr=Object(v.a)(vr,2),cr=pr[0],Lr=pr[1],xr="".concat(Me,"-more-popup"),gn="".concat(Ke,"-dropdown"),wr=cr!==null?"".concat(xr,"-").concat(cr):null,Jt=Ce==null?void 0:Ce.dropdownAriaLabel,zt=y.createElement(sr,{onClick:function(en){var Jr=en.key,Dn=en.domEvent;xt(Jr,Dn),ur(!1)},id:xr,tabIndex:-1,role:"listbox","aria-activedescendant":wr,selectedKeys:[cr],"aria-label":Jt!==void 0?Jt:"expanded dropdown"},pe.map(function(Ur){return y.createElement(gr,{key:Ur.key,id:"".concat(xr,"-").concat(Ur.key),role:"option","aria-controls":Me&&"".concat(Me,"-panel-").concat(Ur.key),disabled:Ur.disabled},Ur.tab)}));function Or(Ur){for(var en=pe.filter(function(yi){return!yi.disabled}),Jr=en.findIndex(function(yi){return yi.key===cr})||0,Dn=en.length,Yn=0;YnNr?(Mr=zt,xr.current="x"):(Mr=Or,xr.current="y");var vn=Date.now();vn-cr.current>100&&(Lr.current=!1),(Be(-Mr,-Mr)||Lr.current)&&(Jt.preventDefault(),Lr.current=!0),cr.current=vn}var wr=Object(y.useRef)(null);wr.current={onTouchStart:ur,onTouchMove:vr,onTouchEnd:pr,onWheel:gn},y.useEffect(function(){function Jt(Ht){wr.current.onTouchStart(Ht)}function zt(Ht){wr.current.onTouchMove(Ht)}function Or(Ht){wr.current.onTouchEnd(Ht)}function Mr(Ht){wr.current.onWheel(Ht)}return document.addEventListener("touchmove",zt,{passive:!1}),document.addEventListener("touchend",Or,{passive:!1}),Re.current.addEventListener("touchstart",Jt,{passive:!1}),Re.current.addEventListener("wheel",Mr),function(){document.removeEventListener("touchmove",zt),document.removeEventListener("touchend",Or)}},[])}function $t(){var Re=Object(y.useRef)(new Map);function Be(Me){return Re.current.has(Me)||Re.current.set(Me,y.createRef()),Re.current.get(Me)}function Ke(Me){Re.current.delete(Me)}return[Be,Ke]}function Ot(Re,Be){var Ke=y.useRef(Re),Me=y.useState({}),pe=Object(v.a)(Me,2),Ce=pe[1];function ye(Pe){var Fe=typeof Pe=="function"?Pe(Ke.current):Pe;Fe!==Ke.current&&Be(Fe,Ke.current),Ke.current=Fe,Ce({})}return[Ke.current,ye]}var tr=function(Be){var Ke=Be.position,Me=Be.prefixCls,pe=Be.extra;if(!pe)return null;var Ce,ye=pe;return Ke==="right"&&(Ce=ye.right||!ye.left&&ye||null),Ke==="left"&&(Ce=ye.left||null),Ce?y.createElement("div",{className:"".concat(Me,"-extra-content")},Ce):null};function ir(Re,Be){var Ke,Me=y.useContext(ua),pe=Me.prefixCls,Ce=Me.tabs,ye=Re.className,Pe=Re.style,Fe=Re.id,We=Re.animated,He=Re.activeKey,$e=Re.rtl,it=Re.extra,gt=Re.editable,mt=Re.locale,xt=Re.tabPosition,Wt=Re.tabBarGutter,ar=Re.children,or=Re.onTabClick,ur=Re.onTabScroll,vr=Object(y.useRef)(),pr=Object(y.useRef)(),cr=Object(y.useRef)(),Lr=Object(y.useRef)(),xr=$t(),gn=Object(v.a)(xr,2),wr=gn[0],Jt=gn[1],zt=xt==="top"||xt==="bottom",Or=Ot(0,function(Xr,Ar){zt&&ur&&ur({direction:Xr>Ar?"left":"right"})}),Mr=Object(v.a)(Or,2),Ht=Mr[0],Nr=Mr[1],vn=Ot(0,function(Xr,Ar){!zt&&ur&&ur({direction:Xr>Ar?"top":"bottom"})}),Ur=Object(v.a)(vn,2),en=Ur[0],Jr=Ur[1],Dn=Object(y.useState)(0),Yn=Object(v.a)(Dn,2),En=Yn[0],yi=Yn[1],Fi=Object(y.useState)(0),Ei=Object(v.a)(Fi,2),$n=Ei[0],un=Ei[1],tn=Object(y.useState)(0),xn=Object(v.a)(tn,2),yn=xn[0],Ui=xn[1],ea=Object(y.useState)(0),ta=Object(v.a)(ea,2),Qr=ta[0],Vi=ta[1],ra=Object(y.useState)(null),on=Object(v.a)(ra,2),Yr=on[0],Jn=on[1],So=Object(y.useState)(null),eo=Object(v.a)(So,2),na=eo[0],va=eo[1],ka=Object(y.useState)(0),to=Object(v.a)(ka,2),Pa=to[0],Vo=to[1],Yo=Object(y.useState)(0),Oo=Object(v.a)(Yo,2),ro=Oo[0],no=Oo[1],ya=o(new Map),ba=Object(v.a)(ya,2),$o=ba[0],Na=ba[1],Ca=f(Ce,$o,En),_a="".concat(pe,"-nav-operations-hidden"),Ea=0,Bi=0;zt?$e?(Ea=0,Bi=Math.max(0,En-Yr)):(Ea=Math.min(0,Yr-En),Bi=0):(Ea=Math.min(0,na-$n),Bi=0);function ca(Xr){return XrBi?[Bi,!1]:[Xr,!0]}var ia=Object(y.useRef)(),Aa=Object(y.useState)(),da=Object(v.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(ia.current)}Gi(vr,function(Xr,Ar){var Qn=!1;function wi(xa,Ji){xa(function(Da){var oa=ca(Da+Ji),Zn=Object(v.a)(oa,2),Ha=Zn[0],so=Zn[1];return Qn=so,Ha})}if(zt){if(Yr>=En)return Qn;wi(Nr,Xr)}else{if(na>=$n)return Qn;wi(Jr,Ar)}return ao(),Fa(),Qn}),Object(y.useEffect)(function(){return ao(),ja&&(ia.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function aa(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:He,Ar=Ca.get(Xr);if(!Ar)return;if(zt){var Qn=Ht;$e?Ar.rightHt+Yr&&(Qn=Ar.right+Ar.width-Yr):Ar.left<-Ht?Qn=-Ar.left:Ar.left+Ar.width>-Ht+Yr&&(Qn=-(Ar.left+Ar.width-Yr)),Jr(0),Nr(ca(Qn)[0])}else{var wi=en;Ar.top<-en?wi=-Ar.top:Ar.top+Ar.height>-en+na&&(wi=-(Ar.top+Ar.height-na)),Nr(0),Jr(ca(wi)[0])}}var fa=_(Ca,{width:Yr,height:na,left:Ht,top:en},{width:yn,height:Qr},{width:Pa,height:ro},Object(M.a)(Object(M.a)({},Re),{},{tabs:Ce})),Co=Object(v.a)(fa,2),Jo=Co[0],Qo=Co[1],Zo=Ce.map(function(Xr){var Ar=Xr.key;return y.createElement(a,{id:Fe,prefixCls:pe,key:Ar,rtl:$e,tab:Xr,closable:Xr.closable,editable:gt,active:Ar===He,tabPosition:xt,tabBarGutter:Wt,renderWrapper:ar,removeAriaLabel:mt==null?void 0:mt.removeAriaLabel,ref:wr(Ar),onClick:function(wi){or(Ar,wi)},onRemove:function(){Jt(Ar)},onFocus:function(){aa(Ar),Fa(),$e||(vr.current.scrollLeft=0),vr.current.scrollTop=0}})}),oo=i(function(){var Xr,Ar,Qn,wi,xa,Ji,Da,oa,Zn,Ha=((Xr=vr.current)===null||Xr===void 0?void 0:Xr.offsetWidth)||0,so=((Ar=vr.current)===null||Ar===void 0?void 0:Ar.offsetHeight)||0,lo=((Qn=Lr.current)===null||Qn===void 0?void 0:Qn.offsetWidth)||0,Ti=((wi=Lr.current)===null||wi===void 0?void 0:wi.offsetHeight)||0,Kr=((xa=cr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Wi=((Ji=cr.current)===null||Ji===void 0?void 0:Ji.offsetHeight)||0;Jn(Ha),va(so),Vo(lo),no(Ti);var Qi=(((Da=pr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,Zi=(((oa=pr.current)===null||oa===void 0?void 0:oa.offsetHeight)||0)-Ti;yi(Qi),un(Zi);var uo=(Zn=cr.current)===null||Zn===void 0?void 0:Zn.className.includes(_a);Ui(Qi-(uo?0:Kr)),Vi(Zi-(uo?0:Wi)),Na(function(){var Wa=new Map;return Ce.forEach(function(Lo){var Mo=Lo.key,pa=wr(Mo).current;pa&&Wa.set(Mo,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Ce.slice(0,Jo),xi=Ce.slice(Qo+1),Pn=[].concat(Object(d.a)(qo),Object(d.a)(xi)),ui=Object(y.useState)(),Nn=Object(v.a)(ui,2),Ra=Nn[0],es=Nn[1],Hi=Ca.get(He),Ao=Object(y.useRef)();function Ro(){l.a.cancel(Ao.current)}Object(y.useEffect)(function(){var Xr={};return Hi&&(zt?($e?Xr.right=Hi.right:Xr.left=Hi.left,Xr.width=Hi.width):(Xr.top=Hi.top,Xr.height=Hi.height)),Ro(),Ao.current=l()(function(){es(Xr)}),Ro},[Hi,zt,$e]),Object(y.useEffect)(function(){aa()},[He,Hi,Ca,zt]),Object(y.useEffect)(function(){oo()},[$e,Wt,He,Ce.map(function(Xr){return Xr.key}).join("_")]);var Io=!!Pn.length,ha="".concat(pe,"-nav-wrap"),Ua,Ia,Do,Ba;return zt?$e?(Ia=Ht>0,Ua=Ht+Yr>>7)^(R<<14|R>>>18)^R>>>3,g=d[h-2],x=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[h]=C+d[h-7]+x+d[h-16]}var E=c&f^~c&w,T=o&s^o&u^s&u,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),L=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),A=_+L+E+p[h]+d[h],G=k+T;_=w,w=f,f=c,c=a+A|0,a=u,u=s,s=o,o=A+G|0}i[0]=i[0]+o|0,i[1]=i[1]+s|0,i[2]=i[2]+u|0,i[3]=i[3]+a|0,i[4]=i[4]+c|0,i[5]=i[5]+f|0,i[6]=i[6]+w|0,i[7]=i[7]+_|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,o=l.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=v.floor(i/4294967296),r[(o+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=m.clone.call(this);return l._hash=this._hash.clone(),l}});O.SHA256=m._createHelper(t),O.HmacSHA256=m._createHmacHelper(t)}(Math),N.SHA256})},lZu9:function(F,$,j){(function(N){N(j("VrN/"),j("1eCo"),j("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(v,O){var M=N.getMode(v,"text/html"),y=M.name=="null";function m(U){if(N.findModeByName){var P=N.findModeByName(U);P&&(U=P.mime||P.mimes[0])}var H=N.getMode(v,U);return H.name=="null"?null:H}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var S={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 b in S)S.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(S[b]=O.tokenTypeOverrides[b]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,t=/^\[(x| )\](?=\s)/i,l=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,s=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,a=" ";function c(U,P,H){return P.f=P.inline=H,H(U,P)}function f(U,P,H){return P.f=P.block=H,H(U,P)}function w(U){return!U||!/\S/.test(U.string)}function _(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var P=y;if(!P){var H=N.innerMode(M,U.htmlState);P=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}P&&(U.f=E,U.block=h,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function h(U,P){var H=U.column()===P.indentation,V=w(P.prevLine.stream),q=P.indentedCode,Z=P.prevLine.hr,ce=P.list!==!1,he=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var ae=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,ce)){for(P.list=null;ae=4&&(q||P.prevLine.fencedCodeEnd||P.prevLine.header||V))return U.skipToEnd(),P.indentedCode=!0,S.code;if(U.eatSpace())return null;if(H&&P.indentation<=he&&(oe=U.match(l))&&oe[1].length<=6)return P.quote=0,P.header=oe[1].length,P.thisLine.header=!0,O.highlightFormatting&&(P.formatting="header"),P.f=P.inline,g(P);if(P.indentation<=he&&U.eat(">"))return P.quote=H?1:P.quote+1,O.highlightFormatting&&(P.formatting="quote"),U.eatSpace(),g(P);if(!ge&&!P.setext&&H&&P.indentation<=he&&(oe=U.match(d))){var se=oe[1]?"ol":"ul";return P.indentation=ae+U.current().length,P.list=!0,P.quote=0,P.listStack.push(P.indentation),P.em=!1,P.strong=!1,P.code=!1,P.strikethrough=!1,O.taskLists&&U.match(t,!1)&&(P.taskList=!0),P.f=P.inline,O.highlightFormatting&&(P.formatting=["list","list-"+se]),g(P)}else{if(H&&P.indentation<=he&&(oe=U.match(o,!0)))return P.quote=0,P.fencedEndRE=new RegExp(oe[1]+"+ *$"),P.localMode=O.fencedCodeBlockHighlighting&&m(oe[2]||O.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=N.startState(P.localMode)),P.f=P.block=C,O.highlightFormatting&&(P.formatting="code-block"),P.code=-1,g(P);if(P.setext||(!xe||!ce)&&!P.quote&&P.list===!1&&!P.code&&!ge&&!s.test(U.string)&&(oe=U.lookAhead(1))&&(oe=oe.match(r)))return P.setext?(P.header=P.setext,P.setext=0,U.skipToEnd(),O.highlightFormatting&&(P.formatting="header")):(P.header=oe[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,g(P);if(ge)return U.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,S.hr;if(U.peek()==="[")return c(U,P,G)}return c(U,P,P.inline)}function R(U,P){var H=M.token(U,P.htmlState);if(!y){var V=N.innerMode(M,P.htmlState);(V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText||P.md_inside&&U.current().indexOf(">")>-1)&&(P.f=E,P.block=h,P.htmlState=null)}return H}function C(U,P){var H=P.listStack[P.listStack.length-1]||0,V=P.indentation=U.quote?P.push(S.formatting+"-"+U.formatting[H]+"-"+U.quote):P.push("error"))}if(U.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(U.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(U.linkHref?P.push(S.linkHref,"url"):(U.strong&&P.push(S.strong),U.em&&P.push(S.em),U.strikethrough&&P.push(S.strikethrough),U.emoji&&P.push(S.emoji),U.linkText&&P.push(S.linkText),U.code&&P.push(S.code),U.image&&P.push(S.image),U.imageAltText&&P.push(S.imageAltText,"link"),U.imageMarker&&P.push(S.imageMarker)),U.header&&P.push(S.header,S.header+"-"+U.header),U.quote&&(P.push(S.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=U.quote?P.push(S.quote+"-"+U.quote):P.push(S.quote+"-"+O.maxBlockquoteDepth)),U.list!==!1){var V=(U.listStack.length-1)%3;V?V===1?P.push(S.list2):P.push(S.list3):P.push(S.list1)}return U.trailingSpaceNewLine?P.push("trailing-space-new-line"):U.trailingSpace&&P.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function x(U,P){return U.match(i,!0)?g(P):void 0}function E(U,P){var H=P.text(U,P);if(typeof H!="undefined")return H;if(P.list)return P.list=null,g(P);if(P.taskList){var V=U.match(t,!0)[1]===" ";return V?P.taskOpen=!0:P.taskClosed=!0,O.highlightFormatting&&(P.formatting="task"),P.taskList=!1,g(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&U.match(/^#+$/,!0))return O.highlightFormatting&&(P.formatting="header"),g(P);var q=U.next();if(P.linkTitle){P.linkTitle=!1;var Z=q;q==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ce="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(U.match(new RegExp(ce),!0))return S.linkHref}if(q==="`"){var he=P.formatting;O.highlightFormatting&&(P.formatting="code"),U.eatWhile("`");var ae=U.current().length;if(P.code==0&&(!P.quote||ae==1))return P.code=ae,g(P);if(ae==P.code){var xe=g(P);return P.code=0,xe}else return P.formatting=he,g(P)}else if(P.code)return g(P);if(q==="\\"&&(U.next(),O.highlightFormatting)){var ge=g(P),oe=S.formatting+"-escape";return ge?ge+" "+oe:oe}if(q==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,O.highlightFormatting&&(P.formatting="image"),g(P);if(q==="["&&P.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,O.highlightFormatting&&(P.formatting="image"),g(P);if(q==="]"&&P.imageAltText){O.highlightFormatting&&(P.formatting="image");var ge=g(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=k,ge}if(q==="["&&!P.image)return P.linkText&&U.match(/^.*?\]/)||(P.linkText=!0,O.highlightFormatting&&(P.formatting="link")),g(P);if(q==="]"&&P.linkText){O.highlightFormatting&&(P.formatting="link");var ge=g(P);return P.linkText=!1,P.inline=P.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?k:E,ge}if(q==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,O.highlightFormatting&&(P.formatting="link");var ge=g(P);return ge?ge+=" ":ge="",ge+S.linkInline}if(q==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,O.highlightFormatting&&(P.formatting="link");var ge=g(P);return ge?ge+=" ":ge="",ge+S.linkEmail}if(O.xml&&q==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=U.string.indexOf(">",U.pos);if(se!=-1){var te=U.string.substring(U.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(P.md_inside=!0)}return U.backUp(1),P.htmlState=N.startState(M),f(U,P,R)}if(O.xml&&q==="<"&&U.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var be=1,ee=U.pos==1?" ":U.string.charAt(U.pos-2);be<3&&U.eat(q);)be++;var ie=U.peek()||" ",Ee=!/\s/.test(ie)&&(!u.test(ie)||/\s/.test(ee)||u.test(ee)),ne=!/\s/.test(ee)&&(!u.test(ee)||/\s/.test(ie)||u.test(ie)),J=null,X=null;if(be%2&&(!P.em&&Ee&&(q==="*"||!ne||u.test(ee))?J=!0:P.em==q&&ne&&(q==="*"||!Ee||u.test(ie))&&(J=!1)),be>1&&(!P.strong&&Ee&&(q==="*"||!ne||u.test(ee))?X=!0:P.strong==q&&ne&&(q==="*"||!Ee||u.test(ie))&&(X=!1)),X!=null||J!=null){O.highlightFormatting&&(P.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(P.em=q),X===!0&&(P.strong=q);var xe=g(P);return J===!1&&(P.em=!1),X===!1&&(P.strong=!1),xe}}else if(q===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return g(P);U.backUp(1)}if(O.strikethrough){if(q==="~"&&U.eatWhile(q)){if(P.strikethrough){O.highlightFormatting&&(P.formatting="strikethrough");var xe=g(P);return P.strikethrough=!1,xe}else if(U.match(/^[^\s]/,!1))return P.strikethrough=!0,O.highlightFormatting&&(P.formatting="strikethrough"),g(P)}else if(q===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return g(P);U.backUp(2)}}if(O.emoji&&q===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,O.highlightFormatting&&(P.formatting="emoji");var Q=g(P);return P.emoji=!1,Q}return q===" "&&(U.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),g(P)}function T(U,P){var H=U.next();if(H===">"){P.f=P.inline=E,O.highlightFormatting&&(P.formatting="link");var V=g(P);return V?V+=" ":V="",V+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function k(U,P){if(U.eatSpace())return null;var H=U.next();return H==="("||H==="["?(P.f=P.inline=A(H==="("?")":"]"),O.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,g(P)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(P,H){var V=P.next();if(V===U){H.f=H.inline=E,O.highlightFormatting&&(H.formatting="link-string");var q=g(H);return H.linkHref=!1,q}return P.match(L[U]),H.linkHref=!0,g(H)}}function G(U,P){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=K,U.next(),O.highlightFormatting&&(P.formatting="link"),P.linkText=!0,g(P)):c(U,P,E)}function K(U,P){if(U.match(/^\]:/,!0)){P.f=P.inline=W,O.highlightFormatting&&(P.formatting="link");var H=g(P);return P.linkText=!1,H}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function W(U,P){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?P.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=E,S.linkHref+" url")}var z={startState:function(){return{f:h,prevLine:{stream:null},thisLine:{stream:null},block:h,htmlState:null,indentation:0,inline:E,text:x,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&&N.copyState(M,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.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,P){if(P.formatting=!1,U!=P.thisLine.stream){if(P.header=0,P.hr=!1,U.match(/^\s*$/,!0))return _(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:U},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=R)){var H=U.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(P.indentation=H,P.indentationDiff=null,H>0)return null}}return P.f(U,P)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:M}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:z}},indent:function(U,P,H){return U.block==R&&M.indent?M.indent(U.htmlState,P,H):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,P,H):N.Pass},blankLine:_,getType:g,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(F){if(!0)module.exports=F();else var $})(function(){var define,module,exports;return function(){function F($,j,N){function v(y,m){if(!j[y]){if(!$[y]){var S=typeof require=="function"&&require;if(!m&&S)return require(y,!0);if(O)return O(y,!0);var b=new Error("Cannot find module '"+y+"'");throw b.code="MODULE_NOT_FOUND",b}var p=j[y]={exports:{}};$[y][0].call(p.exports,function(d){var t=$[y][1][d];return v(t||d)},p,p.exports,F,$,j,N)}return j[y].exports}for(var O=typeof require=="function"&&require,M=0;M0&&r(k).to(A),G=this._divideParts(x,E),K=G.length,W=!1,z=function(xe,ge){var oe=this;return new y.default(function(te,be){var ee,ie,Ee,ne;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,xe.isCancel()){X.next=18;break}return ee=G[ge-1],ie={stream:xe._createStream(g,ee.start,ee.end),size:ee.end-ee.start},X.next=6,S.default.awrap(xe._uploadPart(L,T,ge,ie));case 6:if(Ee=X.sent,!(!xe.isCancel()&&!W)){X.next=15;break}if(h.doneParts.push({number:ge,etag:Ee.res.headers.etag}),!R.progress){X.next=12;break}return X.next=12,S.default.awrap(R.progress(k.length/K,h,Ee.res));case 12:te({number:ge,etag:Ee.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ne=new Error,ne.name=X.t0.name,ne.message=X.t0.message,ne.stack=X.t0.stack,ne.partNum=ge,r(X.t0).to(ne),be(ne);case 30:case"end":return X.stop()}},null,oe,[[0,21]])})},U=(0,O.default)(new Array(K),function(ae,xe){return xe+1}),P=A.map(function(ae){return ae.number}),H=U.filter(function(ae){return P.indexOf(ae)<0}),V=5,q=R.parallel||V,he.next=17,S.default.awrap(this._parallel(H,q,function(ae){return new y.default(function(xe,ge){z(C,ae).then(function(oe){oe&&A.push(oe),xe()}).catch(function(oe){ge(oe)})})}));case 17:if(Z=he.sent,W=!0,!this.isCancel()){he.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(Z&&Z.length>0)){he.next=25;break}throw Z[0].message="Failed to upload some parts with error: "+Z[0].toString()+" part_num: "+Z[0].partNum,Z[0];case 25:return he.next=27,S.default.awrap(this.completeMultipartUpload(L,T,A,R));case 27:return he.abrupt("return",he.sent);case 28:case"end":return he.stop()}},null,this)},a._getFileSize=function(h){return S.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!p.buffer(h)){C.next=4;break}return C.abrupt("return",h.length);case 4:if(!(o(h)||u(h))){C.next=6;break}return C.abrupt("return",h.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var c=F("stream"),f=c.Readable;function w(_,h){if(!(this instanceof w))return new w(_,h);f.call(this,h),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(w,f),w.prototype.readFileAndPush=function(h){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:g,this.start=g,R=this.push(this.fileBuffer.slice(C,g))}},w.prototype._read=function(h){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 R=16*1024;h=h||R;var C=this;this.reader.onload=function(x){C.fileBuffer=N.from(new Uint8Array(x.target.result)),C.file=null,C.readFileAndPush(h)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(h)},a._createStream=function(h,R,C){if(o(h)||u(h))return new w(h.slice(R,C));throw new Error("_createStream requires File/Blob.")},a._getPartSize=function(h,R){var C=10*1e3,g=1024*1024;return R?Math.max(Math.ceil(h/C),R):g},a._divideParts=function(h,R){for(var C=Math.ceil(h/R),g=[],x=0;x255)throw new Error("ID is composed of 255 bytes at most");if(h.prefix===""||h.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(h.status))throw new Error("Status must be Enabled or Disabled");if(h.transition){if(!["IA","Archive"].includes(h.transition.storageClass))throw new Error("StorageClass must be IA or Archive");f(h.transition,"Transition")}if(h.expiration){if(!h.expiration.expiredObjectDeleteMarker)f(h.expiration,"Expiration");else if(h.expiration.days||h.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(h.abortMultipartUpload&&f(h.abortMultipartUpload,"AbortMultipartUpload"),!h.expiration&&!h.abortMultipartUpload&&!h.transition&&!h.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(h.tag){if(h.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(h.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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=j;b.putBucketVersioning=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(y(d),["Enabled","Suspended"].includes(t)){u.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",d,"versioning",l),i={VersioningConfiguration:{Status:t}},r.mime="xml",r.content=S(i,{headers:!0}),u.next=9,v.default.awrap(this.request(r));case 9:return o=u.sent,u.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=F("../utils/isArray"),p=b.isArray,d=j;d.putBucketWebsite=function(l){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],o,s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(y(l),o=this._bucketRequestParams("PUT",l,"website",i),s={Suffix:r.index||"index.html"},u={IndexDocument:s},a={WebsiteConfiguration:u},r.supportSubDir&&(s.SupportSubDir=r.supportSubDir),r.type&&(s.Type=r.type),r.error&&(u.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){w.next=12;break}if(p(r.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:u.RoutingRules={RoutingRule:r.routingRules};case 12:return a=S(a),o.content=a,o.mime="xml",o.successStatuses=[200],w.next=18,v.default.awrap(this.request(o));case 18:return c=w.sent,w.abrupt("return",{res:c.res});case 20:case"end":return w.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/keys"),O=m(v),M=F("babel-runtime/core-js/json/stringify"),y=m(M);function m(S){return S&&S.__esModule?S:{default:S}}j.encodeCallback=function(b,p){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&p.callback){var d={callbackUrl:encodeURI(p.callback.url),callbackBody:p.callback.body};p.callback.host&&(d.callbackHost=p.callback.host),p.callback.contentType&&(d.callbackBodyType=p.callback.contentType);var t=N.from((0,y.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=t,p.callback.customValue){var l={};(0,O.default)(p.callback.customValue).forEach(function(r){l["x:"+r]=p.callback.customValue[r]}),b.headers["x-oss-callback-var"]=N.from((0,y.default)(l)).toString("base64")}}}}).call(this,F("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/assign"),v=O(N);function O(d){return d&&d.__esModule?d:{default:d}}var M=F("humanize-ms"),y=F("url"),m=F("../utils/checkBucketName"),S=m.checkBucketName;function b(d,t){var l=y.parse(d);if(l.protocol||(l=y.parse("http"+(t?"s":"")+"://"+d)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function p(d,t,l){var r=l?"https://":"http://",i=t?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return d.substr(0,o.length)===o&&(i=".aliyuncs.com"),y.parse(r+d+i)}$.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&S(d.bucket);var t=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=M(t.timeout)),t.endpoint)t.endpoint=b(t.endpoint,t.secure);else if(t.region)t.endpoint=p(t.region,t.internal,t.secure);else throw new Error("require options.endpoint or options.region");return t.inited=!0,t}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(F,$,j){"use strict";var N=F("merge-descriptors"),v=j;N(v,F("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("querystring"),S=F("js-base64"),b=S.Base64.encode,p=j;p.processObjectSave=function(l,r,i,o){var s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return d(l,"sourceObject"),d(r,"targetObject"),d(i,"process"),r=this._objectName(r),o&&y(o),s=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),u=o?",b_"+b(o):"",r=b(r),a={"x-oss-process":i+"|sys/saveas,o_"+r+u},s.content=m.stringify(a),w.next=12,v.default.awrap(this.request(s));case 12:return c=w.sent,w.abrupt("return",{res:c.res,status:c.res.status});case 14:case"end":return w.stop()}},null,this)};function d(t,l){if(!t)throw new Error(l+" is required");if(typeof t!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("copy-to"),y=F("./callback"),m=F("./utils/deepCopy"),S=m.deepCopy,b=j;b.listUploads=function(d,t){var l,r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return t=t||{},l={},M(t).to(l),l.subres="uploads",r=this._objectRequestParams("GET","",l),r.query=d,r.xmlResponse=!0,r.successStatuses=[200],u.next=10,v.default.awrap(this.request(r));case 10:return i=u.sent,o=i.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(a){return{name:a.Key,uploadId:a.UploadId,initiated:a.Initiated}}),u.abrupt("return",{res:i.res,uploads:o,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return u.stop()}},null,this)},b.listParts=function(d,t,l,r){var i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=r||{},i={},M(r).to(i),i.subres={uploadId:t},o=this._objectRequestParams("GET",d,i),o.query=l,o.xmlResponse=!0,o.successStatuses=[200],a.next=10,v.default.awrap(this.request(o));case 10:return s=a.sent,a.abrupt("return",{res:s.res,uploadId:s.data.UploadId,bucket:s.data.Bucket,name:s.data.Key,partNumberMarker:s.data.PartNumberMarker,nextPartNumberMarker:s.data.NextPartNumberMarker,maxParts:s.data.MaxParts,isTruncated:s.data.IsTruncated,parts:s.data.Part||[]});case 12:case"end":return a.stop()}},null,this)},b.abortMultipartUpload=function(d,t,l){var r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return this._stop(),l=l||{},r={},M(l).to(r),r.subres={uploadId:t},i=this._objectRequestParams("DELETE",d,r),i.successStatuses=[204],u.next=9,v.default.awrap(this.request(i));case 9:return o=u.sent,u.abrupt("return",{res:o.res});case 11:case"end":return u.stop()}},null,this)},b.initMultipartUpload=function(d,t){var l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=t||{},l={},M(t).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(t.meta,l.headers),l.subres="uploads",r=this._objectRequestParams("POST",d,l),r.mime=t.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,v.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}},null,this)},b.uploadPart=function(d,t,l,r,i,o,s){var u;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u={stream:this._createStream(r,i,o),size:o-i},c.next=3,v.default.awrap(this._uploadPart(d,t,l,u,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}},null,this)},b.completeMultipartUpload=function(d,t,l,r){var i,o,s,u,a,c,f,w;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:for(i=l.concat().sort(function(R,C){return R.number-C.number}).filter(function(R,C,g){return!C||R.number!==g[C-1].number}),o=` `,s=0;s `,o+=""+u.number+` `,o+=""+u.etag+` `,o+=` `;return o+="",r=r||{},a={},a=S(r),a.headers&&delete a.headers["x-oss-server-side-encryption"],a.subres={uploadId:t},c=this._objectRequestParams("POST",d,a),y.encodeCallback(c,a),c.mime="xml",c.content=o,c.headers&&c.headers["x-oss-callback"]||(c.xmlResponse=!0),c.successStatuses=[200],h.next=17,v.default.awrap(this.request(c));case 17:return f=h.sent,w={res:f.res,bucket:c.bucket,name:d,etag:f.res.headers.etag},c.headers&&c.headers["x-oss-callback"]&&(w.data=JSON.parse(f.data.toString())),h.abrupt("return",w);case 21:case"end":return h.stop()}},null,this)},b._uploadPart=function(d,t,l,r,i){var o,s,u;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return i=i||{},o={},M(i).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:l,uploadId:t},s=this._objectRequestParams("PUT",d,o),s.mime=o.mime,s.stream=r.stream,s.successStatuses=[200],c.next=11,v.default.awrap(this.request(s));case 11:if(u=c.sent,u.res.headers.etag){c.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 r.stream=null,s.stream=null,c.abrupt("return",{name:d,etag:u.res.headers.etag,res:u.res});case 17:case"end":return c.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(t){return t&&t.__esModule?t:{default:t}}var b=F("../utils/checkBucketName"),p=b.checkBucketName,d=j;d.copy=function(l,r,i,o){var s,u,a;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return(typeof i=="undefined"?"undefined":(0,m.default)(i))==="object"&&(o=i),o=o||{},o.headers=o.headers||{},(0,M.default)(o.headers).forEach(function(w){o.headers["x-oss-copy-source-"+w.toLowerCase()]=o.headers[w]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,i),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,s=this._objectRequestParams("PUT",l,o),s.xmlResponse=!0,s.successStatuses=[200,304],f.next=14,v.default.awrap(this.request(s));case 14:return u=f.sent,a=u.data,a&&(a={etag:a.ETag,lastModified:a.LastModified}),f.abrupt("return",{data:a,res:u.res});case 18:case"end":return f.stop()}},null,this)},d._getSourceName=function(l,r){return typeof r=="string"?l=this._objectName(l):l[0]!=="/"?r=this.options.bucket:(r=l.replace(/\/(.+?)(\/.*)/,"$1"),l=l.replace(/(\/.+?\/)(.*)/,"$2")),p(r),l=encodeURI(l),l="/"+r+"/"+l,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.delete=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=6,v.default.awrap(this.request(d));case 6:return t=r.sent,r.abrupt("return",{res:t.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(d){return d&&d.__esModule?d:{default:d}}var m=F("utility"),S=F("../utils/obj2xml"),b=S.obj2xml,p=j;p.deleteMulti=function(t){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,u,a,c,f,w,_,h,R;return v.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:if(r=[],!(!t||!t.length)){g.next=3;break}throw new Error("names is required");case 3:for(i=0;i1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=7,v.default.awrap(this.request(d));case 7:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(p){return p&&p.__esModule?p:{default:p}}var m=F("fs"),S=F("is-type-of"),b=j;b.get=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=null,i=!1,S.writableStream(t)?r=t:S.string(t)?(r=m.createWriteStream(t),i=!0):l=t,l=l||{},l.subres=(0,M.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.process&&(l.subres["x-oss-process"]=l.process),o=void 0,a.prev=8,s=this._objectRequestParams("GET",d,l),s.writeStream=r,s.successStatuses=[200,206,304],a.next=14,v.default.awrap(this.request(s));case 14:o=a.sent,i&&r.destroy(),a.next=25;break;case 18:if(a.prev=18,a.t0=a.catch(8),!i){a.next=24;break}return r.destroy(),a.next=24,v.default.awrap(this._deleteFileSafe(t));case 24:throw a.t0;case 25:return a.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return a.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getACL=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({acl:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],d.xmlResponse=!0,r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{acl:t.data.AccessControlList.Grant,owner:{id:t.data.Owner.ID,displayName:t.data.Owner.DisplayName},res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=S(N),O=F("babel-runtime/regenerator"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(s){return s&&s.__esModule?s:{default:s}}var b=j,p=F("../utils/isObject"),d=p.isObject,t=F("../utils/isArray"),l=t.isArray;b.getBucketVersions=r,b.listObjectVersions=r;function r(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,c,f,w,_,h;return M.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(s.versionIdMarker&&s.keyMarker===void 0)){C.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return u.subres=(0,m.default)({versions:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),a=this._objectRequestParams("GET","",u),a.xmlResponse=!0,a.successStatuses=[200],a.query=o(s),C.next=10,M.default.awrap(this.request(a));case 10:return c=C.sent,f=c.data.Version||[],w=c.data.DeleteMarker||[],_=this,f&&(Array.isArray(f)||(f=[f]),f=f.map(function(g){return{name:g.Key,url:_._objectUrl(g.Key),lastModified:g.LastModified,isLatest:g.IsLatest==="true",versionId:g.VersionId,etag:g.ETag,type:g.Type,size:Number(g.Size),storageClass:g.StorageClass,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),w&&(l(w)||(w=[w]),w=w.map(function(g){return{name:g.Key,lastModified:g.LastModified,versionId:g.VersionId,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),h=c.data.CommonPrefixes||null,h&&(l(h)||(h=[h]),h=h.map(function(g){return g.Prefix})),C.abrupt("return",{res:c.res,objects:f,deleteMarker:w,prefixes:h,nextMarker:c.data.NextMarker||null,NextVersionIdMarker:c.data.NextVersionIdMarker||null,isTruncated:c.data.IsTruncated==="true"});case 19:case"end":return C.stop()}},null,this)}function i(s){return s.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u={};return d(s)&&(0,v.default)(s).forEach(function(a){u[i(a)]=s[a]}),u}},{"../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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getObjectMeta=function(b,p){var d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p=p||{},b=this._objectName(b),p.subres=(0,M.default)({objectMeta:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("HEAD",b,p),d.successStatuses=[200],r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(p){return p&&p.__esModule?p:{default:p}}var m=j,S=F("../utils/isObject"),b=S.isObject;m.getObjectTagging=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,M.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,t),l.successStatuses=[200],a.next=7,v.default.awrap(this.request(l));case 7:return r=a.sent,a.next=10,v.default.awrap(this.parseXML(r.data));case 10:return i=a.sent,o=i.TagSet.Tag,o=o&&b(o)?[o]:o||[],s={},o.forEach(function(c){s[c.Key]=c.Value}),a.abrupt("return",{status:r.status,res:r.res,tag:s});case 16:case"end":return a.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getSymlink=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return p.subres=(0,M.default)({symlink:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],i.next=7,v.default.awrap(this.request(d));case 7:return t=i.sent,l=t.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(l),res:t.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(p){return p&&p.__esModule?p:{default:p}}var b=j;b.head=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t.subres=(0,m.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),l=this._objectRequestParams("HEAD",d,t),l.successStatuses=[200,304],s.next=6,v.default.awrap(this.request(l));case 6:return r=s.sent,i={meta:null,res:r.res,status:r.status},r.status===200&&(0,M.default)(r.headers).forEach(function(u){u.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[u.substring(11)]=r.headers[u])}),s.abrupt("return",i);case 10:case"end":return s.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putACL=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.subres=(0,M.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=p,b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=10,v.default.awrap(this.request(t));case 10:return l=i.sent,i.abrupt("return",{res:l.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(r){return r&&r.__esModule?r:{default:r}}var b=F("../utils/obj2xml"),p=b.obj2xml,d=F("../utils/checkObjectTag"),t=d.checkObjectTag,l=j;l.putObjectTagging=function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return t(o),s.subres=(0,m.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),i=this._objectName(i),u=this._objectRequestParams("PUT",i,s),u.successStatuses=[200],o=(0,M.default)(o).map(function(_){return{Key:_,Value:o[_]}}),a={Tagging:{TagSet:{Tag:o}}},u.mime="xml",u.content=p(a),w.next=12,v.default.awrap(this.request(u));case 12:return c=w.sent,w.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return w.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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putSymlink=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.headers=d.headers||{},p=this._escape(this._objectName(p)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=p,d.subres=(0,M.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=13,v.default.awrap(this.request(t));case 13:return l=i.sent,i.abrupt("return",{res:l.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/promise"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m._parallelNode=function(b,p,d,t){var l,r,i,o,s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:l=this,r=[],i=[],o=b.length/p,s=b.length%p,u=s===0?o:(b.length-s)/p+1,a=1,c=0;case 8:if(!(c0){u=!0,a<=0&&l(r);return}a+=1,w(h.value,i(f))}c=!1}_()})},m.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/json/stringify"),O=m(v),M=F("babel-runtime/core-js/object/keys"),y=m(M);function m(p){return p&&p.__esModule?p:{default:p}}var S=F("./../../shims/crypto/crypto.js"),b=F("is-type-of");j.buildCanonicalizedResource=function(d,t){var l=""+d,r="?";if(b.string(t)&&t.trim()!=="")l+=r+t;else if(b.array(t))t.sort(),l+=r+t.join("&");else if(t){var i=function(u,a){return u[0]>a[0]?1:u[0]1&&arguments[1]!==void 0?arguments[1]:{},l=arguments[2],r=arguments[3],i={},o=t.subResource,s=o===void 0?{}:o;if(t.process){var u="x-oss-process";s[u]=t.process}if(t.trafficLimit){var a="x-oss-traffic-limit";s[a]=t.trafficLimit}if(t.response&&(0,y.default)(t.response).forEach(function(_){var h="response-"+_.toLowerCase();s[h]=t.response[_]}),(0,y.default)(t).forEach(function(_){var h=_.toLowerCase(),R=t[_];h.indexOf("x-oss-")===0?i[h]=R:(h.indexOf("content-md5")===0||h.indexOf("content-type")===0)&&(i[_]=R)}),Object.prototype.hasOwnProperty.call(t,"security-token")&&(s["security-token"]=t["security-token"]),Object.prototype.hasOwnProperty.call(t,"callback")){var c={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};if(t.callback.host&&(c.callbackHost=t.callback.host),t.callback.contentType&&(c.callbackBodyType=t.callback.contentType),s.callback=N.from((0,O.default)(c)).toString("base64"),t.callback.customValue){var f={};(0,y.default)(t.callback.customValue).forEach(function(_){f["x:"+_]=t.callback.customValue[_]}),s["callback-var"]=N.from((0,O.default)(f)).toString("base64")}}var w=this.buildCanonicalString(t.method,l,{headers:i,parameters:s},r.toString());return{Signature:this.computeSignature(d,w),subResource:s}}}).call(this,F("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(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(N,v){var O=v?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/entries"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var M=F("./checkValid"),y=M.checkValid,m=F("./isObject"),S=m.isObject,b=[{validator:function(l){if(typeof l!="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 (/)"}],p={key:[].concat(b,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(b,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(t){if(!S(t))throw new Error("tag must be Object");var l=(0,v.default)(t);if(l.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];l.forEach(function(i){i.forEach(function(o,s){y(o,p[r[s]])})})}j.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function N(v,O){O.forEach(function(M){if(M.validator)M.validator(v);else if(M.pattern&&!M.pattern.test(v))throw new Error(M.msg)})}j.checkValid=N},{}],38:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/assign"),O=M(v);function M(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var y=F("./../../../shims/crypto/crypto.js"),m=F("debug")("ali-oss"),S=F("mime"),b=F("dateformat"),p=F("copy-to"),d=F("path");function t(i,o){return i[o]||i[o.toLowerCase()]}function l(i,o){delete i[o],delete i[o.toLowerCase()]}function r(i){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var s={"x-oss-date":b(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(s["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(s,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(s["x-oss-security-token"]=this.options.stsToken),p(i.headers).to(s),t(s,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?s["Content-Type"]=i.mime:s["Content-Type"]=S.getType(i.mime||d.extname(i.object||""))),t(s,"Content-Type")||l(s,"Content-Type"),i.content&&(s["Content-Md5"]=y.createHash("md5").update(N.from(i.content,"utf8")).digest("base64"),s["Content-Length"]||(s["Content-Length"]=i.content.length));var u=this._getResource(i);s.authorization=this.authorization(i.method,u,i.subres,s);var a=this._getReqUrl(i);m("request %s %s, with headers %j, !!stream: %s",i.method,a,s,!!i.stream);var c=i.timeout||this.options.timeout,f={method:i.method,content:i.content,stream:i.stream,headers:s,timeout:c,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(f.agent=this.agent),this.httpsAgent&&(f.httpsAgent=this.httpsAgent),{url:a,params:f}}j.createRequest=r}).call(this,F("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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/helpers/typeof"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopy=void 0,j.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,M.default)(m))!=="object")return m;var S=Array.isArray(m)?[]:{};return(0,v.default)(m).forEach(function(b){S[b]=j.deepCopy(m[b])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/helpers/typeof"),M=y(O);function y(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function m(b,p){if(b===null||(typeof b=="undefined"?"undefined":(0,M.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var t=0;t `),b&&b.firstUpperCase&&(S=M.formatObjKey(S,"firstUpperCase")),y(S)==="object"?(0,v.default)(S).forEach(function(d){y(S[d])==="string"||y(S[d])==="number"?p+="<"+d+">"+S[d]+"":y(S[d])==="object"?p+="<"+d+">"+m(S[d])+"":y(S[d])==="array"?p+=S[d].map(function(t){return"<"+d+">"+m(t)+""}).join(""):p+="<"+d+">"+S[d].toString()+""}):p+=S.toString(),p}j.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(F,$,j){$.exports=N,$.exports.HttpsAgent=N;function N(){}},{}],49:[function(F,$,j){$.exports=F("./register")().Promise},{"./register":51}],50:[function(F,$,j){"use strict";var N="@@any-promise/REGISTRATION",v=null;$.exports=function(O,M){return function(m,S){m=m||null,S=S||{};var b=S.global!==!1;if(v===null&&b&&(v=O[N]||null),v!==null&&m!==null&&v.implementation!==m)throw new Error('any-promise already defined as "'+v.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return v===null&&(m!==null&&typeof S.Promise!="undefined"?v={Promise:S.Promise,implementation:m}:v=M(m),b&&(O[N]=v)),v}}},{}],51:[function(F,$,j){"use strict";$.exports=F("./loader")(window,N);function N(){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(F,$,j){$.exports={default:F("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(F,$,j){$.exports={default:F("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(F,$,j){$.exports={default:F("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(F,$,j){$.exports={default:F("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(F,$,j){$.exports={default:F("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(F,$,j){"use strict";j.__esModule=!0;var N=F("../core-js/symbol/iterator"),v=m(N),O=F("../core-js/symbol"),M=m(O),y=typeof M.default=="function"&&typeof v.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S};function m(S){return S&&S.__esModule?S:{default:S}}j.default=typeof M.default=="function"&&y(v.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":y(S)}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S=="undefined"?"undefined":y(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(F,$,j){$.exports=F("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(F,$,j){"use strict";j.byteLength=b,j.toByteArray=d,j.fromByteArray=r;for(var N=[],v=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=M.length;y0)throw new Error("Invalid string. Length must be a multiple of 4");var s=i.indexOf("=");s===-1&&(s=o);var u=s===o?0:4-s%4;return[s,u]}function b(i){var o=S(i),s=o[0],u=o[1];return(s+u)*3/4-u}function p(i,o,s){return(o+s)*3/4-s}function d(i){var o,s=S(i),u=s[0],a=s[1],c=new O(p(i,u,a)),f=0,w=a>0?u-4:u,_;for(_=0;_>16&255,c[f++]=o>>8&255,c[f++]=o&255;return a===2&&(o=v[i.charCodeAt(_)]<<2|v[i.charCodeAt(_+1)]>>4,c[f++]=o&255),a===1&&(o=v[i.charCodeAt(_)]<<10|v[i.charCodeAt(_+1)]<<4|v[i.charCodeAt(_+2)]>>2,c[f++]=o>>8&255,c[f++]=o&255),c}function t(i){return N[i>>18&63]+N[i>>12&63]+N[i>>6&63]+N[i&63]}function l(i,o,s){for(var u,a=[],c=o;cw?w:f+c));return u===1?(o=i[s-1],a.push(N[o>>2]+N[o<<4&63]+"==")):u===2&&(o=(i[s-2]<<8)+i[s-1],a.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),a.join("")}},{}],70:[function(F,$,j){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(N,v,O){typeof $!="undefined"&&$.exports?$.exports=O():typeof define=="function"&&define.amd?define(v,O):N[v]=O()}(this,"bowser",function(){var N=!0;function v(p){function d(z){var U=p.match(z);return U&&U.length>1&&U[1]||""}function t(z){var U=p.match(z);return U&&U.length>1&&U[2]||""}var l=d(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(p),i=!r&&/android/i.test(p),o=/nexus\s*[0-6]\s*/i.test(p),s=!o&&/nexus\s*[0-9]+/i.test(p),u=/CrOS/.test(p),a=/silk/i.test(p),c=/sailfish/i.test(p),f=/tizen/i.test(p),w=/(web|hpw)(o|0)s/i.test(p),_=/windows phone/i.test(p),h=/SamsungBrowser/i.test(p),R=!_&&/windows/i.test(p),C=!l&&!a&&/macintosh/i.test(p),g=!i&&!c&&!f&&!w&&/linux/i.test(p),x=t(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=d(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(p)&&!/tablet pc/i.test(p),k=!T&&/[^-]mobi/i.test(p),L=/xbox/i.test(p),A;/opera/i.test(p)?A={name:"Opera",opera:N,version:E||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(p)?A={name:"Opera",opera:N,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(p)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:E||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(p)?A={name:"NAVER Whale browser",whale:N,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(p)?A={name:"MZ Browser",mzbrowser:N,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(p)?A={name:"Opera Coast",coast:N,version:E||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(p)?A={name:"Focus",focus:N,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(p)?A={name:"Yandex Browser",yandexbrowser:N,version:E||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(p)?A={name:"UC Browser",ucbrowser:N,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(p)?A={name:"Maxthon",maxthon:N,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(p)?A={name:"Epiphany",epiphany:N,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(p)?A={name:"Puffin",puffin:N,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(p)?A={name:"Sleipnir",sleipnir:N,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(p)?A={name:"K-Meleon",kMeleon:N,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:_?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(p)?A={name:"Internet Explorer",msie:N,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(p)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(p)?A={name:"Vivaldi",vivaldi:N,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||E}:c?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(p)?A={name:"SeaMonkey",seamonkey:N,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(p)?(A={name:"Firefox",firefox:N,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(p)&&(A.firefoxos=N,A.osname="Firefox OS")):a?A={name:"Amazon Silk",silk:N,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(p)?A={name:"PhantomJS",phantom:N,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(p)?A={name:"SlimerJS",slimer:N,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(p)||/rim\stablet/i.test(p)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:E||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(A={name:"WebOS",osname:"WebOS",webos:N,version:E||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(p)&&(A.touchpad=N)):/bada/i.test(p)?A={name:"Bada",osname:"Bada",bada:N,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:f?A={name:"Tizen",osname:"Tizen",tizen:N,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(p)?A={name:"QupZilla",qupzilla:N,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(p)?A={name:"Chromium",chromium:N,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(p)?A={name:"Chrome",chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?A={name:"Android",version:E}:/safari|applewebkit/i.test(p)?(A={name:"Safari",safari:N},E&&(A.version=E)):l?(A={name:l=="iphone"?"iPhone":l=="ipad"?"iPad":"iPod"},E&&(A.version=E)):/googlebot/i.test(p)?A={name:"Googlebot",googlebot:N,version:d(/googlebot\/(\d+(\.\d+))/i)||E}:A={name:d(/^(.*)\/(.*) /),version:t(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(p)?(/(apple)?webkit\/537\.36/i.test(p)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&E&&(A.version=E)):!A.opera&&/gecko\//i.test(p)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||d(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(i||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&l?(A[l]=N,A.ios=N,A.osname="iOS"):C?(A.mac=N,A.osname="macOS"):L?(A.xbox=N,A.osname="Xbox"):R?(A.windows=N,A.osname="Windows"):g&&(A.linux=N,A.osname="Linux");function G(z){switch(z){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var K="";A.windows?K=G(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?K=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(K=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):l?(K=d(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):i?K=d(/android[ \/-](\d+(\.\d+)*)/i):A.webos?K=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?K=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?K=d(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(K=d(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(A.osversion=K);var W=!A.windows&&K.split(".")[0];return T||s||l=="ipad"||i&&(W==3||W>=4&&!k)||A.silk?A.tablet=N:(k||l=="iphone"||l=="ipod"||i||o||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var O=v(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(p){for(var d=0;d=0;){if(t[0][d]>t[1][d])return 1;if(t[0][d]===t[1][d]){if(d===0)return 0}else return-1}}function S(p,d,t){var l=O;typeof d=="string"&&(t=d,d=void 0),d===void 0&&(d=!1),t&&(l=v(t));var r=""+l.version;for(var i in p)if(p.hasOwnProperty(i)&&l[i]){if(typeof p[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(p));return m([r,p[i]])<0}return d}function b(p,d,t){return!S(p,d,t)}return O.isUnsupportedBrowser=S,O.compareVersions=m,O.check=b,O._detect=v,O.detect=v,O})},{}],71:[function(F,$,j){},{}],72:[function(F,$,j){var N=F("buffer").Buffer,v=N.isEncoding||function(b){switch(b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(b){if(b&&!v(b))throw new Error("Unknown encoding: "+b)}var M=j.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),O(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=y;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};M.prototype.write=function(b){for(var p="";this.charLength;){var d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived=55296&&l<=56319){this.charLength+=this.surrogateSize,p="";continue}if(this.charReceived=this.charLength=0,b.length===0)return p;break}this.detectIncompleteChar(b);var t=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,t),t-=this.charReceived),p+=b.toString(this.encoding,0,t);var t=p.length-1,l=p.charCodeAt(t);if(l>=55296&&l<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),b.copy(this.charBuffer,0,0,r),p.substring(0,t)}return p},M.prototype.detectIncompleteChar=function(b){for(var p=b.length>=3?3:b.length;p>0;p--){var d=b[b.length-p];if(p==1&&d>>5==6){this.charLength=2;break}if(p<=2&&d>>4==14){this.charLength=3;break}if(p<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=p},M.prototype.end=function(b){var p="";if(b&&b.length&&(p=this.write(b)),this.charReceived){var d=this.charReceived,t=this.charBuffer,l=this.encoding;p+=t.slice(0,d).toString(l)}return p};function y(b){return b.toString(this.encoding)}function m(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function S(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(F,$,j){(function(N,v){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var O=F("base64-js"),M=F("ieee754"),y=F("isarray");j.Buffer=v,j.SlowBuffer=a,j.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),j.kMaxLength=S();function m(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(J){return!1}}function S(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(ne,J){if(S()=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ne|0}function a(ne){return+ne!=ne&&(ne=0),v.alloc(+ne)}v.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},v.compare=function(J,X){if(!v.isBuffer(J)||!v.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,me=X.length,fe=0,Te=Math.min(Q,me);fe>>1;case"base64":return ee(ne).length;default:if(Q)return se(ne).length;J=(""+J).toLowerCase(),Q=!0}}v.byteLength=c;function f(ne,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(ne||(ne="utf8");;)switch(ne){case"hex":return z(this,J,X);case"utf8":case"utf-8":return L(this,J,X);case"ascii":return K(this,J,X);case"latin1":case"binary":return W(this,J,X);case"base64":return k(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: "+ne);ne=(ne+"").toLowerCase(),Q=!0}}v.prototype._isBuffer=!0;function w(ne,J,X){var Q=ne[J];ne[J]=ne[X],ne[X]=Q}v.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;X0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),""},v.prototype.compare=function(J,X,Q,me,fe){if(!v.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),me===void 0&&(me=0),fe===void 0&&(fe=this.length),X<0||Q>J.length||me<0||fe>this.length)throw new RangeError("out of range index");if(me>=fe&&X>=Q)return 0;if(me>=fe)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,me>>>=0,fe>>>=0,this===J)return 0;for(var Te=fe-me,ze=Q-X,Je=Math.min(Te,ze),qe=this.slice(me,fe),Xe=J.slice(X,Q),et=0;et2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=me?0:ne.length-1),X<0&&(X=ne.length+X),X>=ne.length){if(me)return-1;X=ne.length-1}else if(X<0)if(me)X=0;else return-1;if(typeof J=="string"&&(J=v.from(J,Q)),v.isBuffer(J))return J.length===0?-1:h(ne,J,X,Q,me);if(typeof J=="number")return J=J&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(ne,J,X):Uint8Array.prototype.lastIndexOf.call(ne,J,X):h(ne,[J],X,Q,me);throw new TypeError("val must be string, number or Buffer")}function h(ne,J,X,Q,me){var fe=1,Te=ne.length,ze=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ne.length<2||J.length<2)return-1;fe=2,Te/=2,ze/=2,X/=2}function Je(Le,Oe){return fe===1?Le[Oe]:Le.readUInt16BE(Oe*fe)}var qe;if(me){var Xe=-1;for(qe=X;qeTe&&(X=Te-ze),qe=X;qe>=0;qe--){for(var et=!0,rt=0;rtme&&(Q=me)):Q=me;var fe=J.length;if(fe%2!==0)throw new TypeError("Invalid hex string");Q>fe/2&&(Q=fe/2);for(var Te=0;Tefe)&&(Q=fe),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var Te=!1;;)switch(me){case"hex":return R(this,J,X,Q);case"utf8":case"utf-8":return C(this,J,X,Q);case"ascii":return g(this,J,X,Q);case"latin1":case"binary":return x(this,J,X,Q);case"base64":return E(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,J,X,Q);default:if(Te)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),Te=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(ne,J,X){return J===0&&X===ne.length?O.fromByteArray(ne):O.fromByteArray(ne.slice(J,X))}function L(ne,J,X){X=Math.min(ne.length,X);for(var Q=[],me=J;me239?4:fe>223?3:fe>191?2:1;if(me+ze<=X){var Je,qe,Xe,et;switch(ze){case 1:fe<128&&(Te=fe);break;case 2:Je=ne[me+1],(Je&192)===128&&(et=(fe&31)<<6|Je&63,et>127&&(Te=et));break;case 3:Je=ne[me+1],qe=ne[me+2],(Je&192)===128&&(qe&192)===128&&(et=(fe&15)<<12|(Je&63)<<6|qe&63,et>2047&&(et<55296||et>57343)&&(Te=et));break;case 4:Je=ne[me+1],qe=ne[me+2],Xe=ne[me+3],(Je&192)===128&&(qe&192)===128&&(Xe&192)===128&&(et=(fe&15)<<18|(Je&63)<<12|(qe&63)<<6|Xe&63,et>65535&&et<1114112&&(Te=et))}}Te===null?(Te=65533,ze=1):Te>65535&&(Te-=65536,Q.push(Te>>>10&1023|55296),Te=56320|Te&1023),Q.push(Te),me+=ze}return G(Q)}var A=4096;function G(ne){var J=ne.length;if(J<=A)return String.fromCharCode.apply(String,ne);for(var X="",Q=0;QQ)&&(X=Q);for(var me="",fe=J;feQ&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),XX)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=this[J],fe=1,Te=0;++Te0&&(fe*=256);)me+=this[J+--X]*fe;return me},v.prototype.readUInt8=function(J,X){return X||P(J,1,this.length),this[J]},v.prototype.readUInt16LE=function(J,X){return X||P(J,2,this.length),this[J]|this[J+1]<<8},v.prototype.readUInt16BE=function(J,X){return X||P(J,2,this.length),this[J]<<8|this[J+1]},v.prototype.readUInt32LE=function(J,X){return X||P(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},v.prototype.readUInt32BE=function(J,X){return X||P(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},v.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=this[J],fe=1,Te=0;++Te=fe&&(me-=Math.pow(2,8*X)),me},v.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=X,fe=1,Te=this[J+--me];me>0&&(fe*=256);)Te+=this[J+--me]*fe;return fe*=128,Te>=fe&&(Te-=Math.pow(2,8*X)),Te},v.prototype.readInt8=function(J,X){return X||P(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},v.prototype.readInt16LE=function(J,X){X||P(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},v.prototype.readInt16BE=function(J,X){X||P(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},v.prototype.readInt32LE=function(J,X){return X||P(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},v.prototype.readInt32BE=function(J,X){return X||P(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},v.prototype.readFloatLE=function(J,X){return X||P(J,4,this.length),M.read(this,J,!0,23,4)},v.prototype.readFloatBE=function(J,X){return X||P(J,4,this.length),M.read(this,J,!1,23,4)},v.prototype.readDoubleLE=function(J,X){return X||P(J,8,this.length),M.read(this,J,!0,52,8)},v.prototype.readDoubleBE=function(J,X){return X||P(J,8,this.length),M.read(this,J,!1,52,8)};function H(ne,J,X,Q,me,fe){if(!v.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>me||Jne.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(J,X,Q,me){if(J=+J,X=X|0,Q=Q|0,!me){var fe=Math.pow(2,8*Q)-1;H(this,J,X,Q,fe,0)}var Te=1,ze=0;for(this[X]=J&255;++ze=0&&(ze*=256);)this[X+Te]=J/ze&255;return X+Q},v.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,1,255,0),v.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function V(ne,J,X,Q){J<0&&(J=65535+J+1);for(var me=0,fe=Math.min(ne.length-X,2);me>>(Q?me:1-me)*8}v.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):V(this,J,X,!0),X+2},v.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):V(this,J,X,!1),X+2};function q(ne,J,X,Q){J<0&&(J=4294967295+J+1);for(var me=0,fe=Math.min(ne.length-X,4);me>>(Q?me:3-me)*8&255}v.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):q(this,J,X,!0),X+4},v.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):q(this,J,X,!1),X+4},v.prototype.writeIntLE=function(J,X,Q,me){if(J=+J,X=X|0,!me){var fe=Math.pow(2,8*Q-1);H(this,J,X,Q,fe-1,-fe)}var Te=0,ze=1,Je=0;for(this[X]=J&255;++Te>0)-Je&255;return X+Q},v.prototype.writeIntBE=function(J,X,Q,me){if(J=+J,X=X|0,!me){var fe=Math.pow(2,8*Q-1);H(this,J,X,Q,fe-1,-fe)}var Te=Q-1,ze=1,Je=0;for(this[X+Te]=J&255;--Te>=0&&(ze*=256);)J<0&&Je===0&&this[X+Te+1]!==0&&(Je=1),this[X+Te]=(J/ze>>0)-Je&255;return X+Q},v.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,1,127,-128),v.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},v.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):V(this,J,X,!0),X+2},v.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):V(this,J,X,!1),X+2},v.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):q(this,J,X,!0),X+4},v.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):q(this,J,X,!1),X+4};function Z(ne,J,X,Q,me,fe){if(X+Q>ne.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function ce(ne,J,X,Q,me){return me||Z(ne,J,X,4,34028234663852886e22,-34028234663852886e22),M.write(ne,J,X,Q,23,4),X+4}v.prototype.writeFloatLE=function(J,X,Q){return ce(this,J,X,!0,Q)},v.prototype.writeFloatBE=function(J,X,Q){return ce(this,J,X,!1,Q)};function he(ne,J,X,Q,me){return me||Z(ne,J,X,8,17976931348623157e292,-17976931348623157e292),M.write(ne,J,X,Q,52,8),X+8}v.prototype.writeDoubleLE=function(J,X,Q){return he(this,J,X,!0,Q)},v.prototype.writeDoubleBE=function(J,X,Q){return he(this,J,X,!1,Q)},v.prototype.copy=function(J,X,Q,me){if(Q||(Q=0),!me&&me!==0&&(me=this.length),X>=J.length&&(X=J.length),X||(X=0),me>0&&me=this.length)throw new RangeError("sourceStart out of bounds");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),J.length-X=0;--Te)J[Te+X]=this[Te+Q];else if(fe<1e3||!v.TYPED_ARRAY_SUPPORT)for(Te=0;Te>>0,Q=Q===void 0?this.length:Q>>>0,J||(J=0);var Te;if(typeof J=="number")for(Te=X;Te55295&&X<57344){if(!me){if(X>56319){(J-=3)>-1&&fe.push(239,191,189);continue}else if(Te+1===Q){(J-=3)>-1&&fe.push(239,191,189);continue}me=X;continue}if(X<56320){(J-=3)>-1&&fe.push(239,191,189),me=X;continue}X=(me-55296<<10|X-56320)+65536}else me&&((J-=3)>-1&&fe.push(239,191,189));if(me=null,X<128){if((J-=1)<0)break;fe.push(X)}else if(X<2048){if((J-=2)<0)break;fe.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;fe.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;fe.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return fe}function te(ne){for(var J=[],X=0;X>8,me=X%256,fe.push(me),fe.push(Q);return fe}function ee(ne){return O.toByteArray(xe(ne))}function ie(ne,J,X,Q){for(var me=0;me=J.length||me>=ne.length);++me)J[me+X]=ne[me];return me}function Ee(ne){return ne!==ne}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(F,$,j){$.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(F,$,j){$.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(F,$,j){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=Array.prototype.slice;$.exports=v;function v(M,y){if(!(this instanceof v))return new v(M,y);this.src=M,this._withAccess=y}v.prototype.withAccess=function(M){return this._withAccess=M!==!1,this},v.prototype.pick=function(M){return Array.isArray(M)||(M=N.call(arguments)),M.length&&(this.keys=M),this},v.prototype.to=function(M){if(M=M||{},!this.src)return M;var y=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;md;)if(t=b[d++],t!=t)return!0}else for(;p>d;d++)if((M||d in b)&&b[d]===m)return M||d||0;return!M&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(F,$,j){var N=F("./_cof"),v=F("./_wks")("toStringTag"),O=N(function(){return arguments}())=="Arguments",M=function(y,m){try{return y[m]}catch(S){}};$.exports=function(y){var m,S,b;return y===void 0?"Undefined":y===null?"Null":typeof(S=M(m=Object(y),v))=="string"?S:O?N(m):(b=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(F,$,j){var N={}.toString;$.exports=function(v){return N.call(v).slice(8,-1)}},{}],99:[function(F,$,j){var N=$.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(F,$,j){"use strict";var N=F("./_object-dp"),v=F("./_property-desc");$.exports=function(O,M,y){M in O?N.f(O,M,v(0,y)):O[M]=y}},{"./_object-dp":132,"./_property-desc":146}],101:[function(F,$,j){var N=F("./_a-function");$.exports=function(v,O,M){if(N(v),O===void 0)return v;switch(M){case 1:return function(y){return v.call(O,y)};case 2:return function(y,m){return v.call(O,y,m)};case 3:return function(y,m,S){return v.call(O,y,m,S)}}return function(){return v.apply(O,arguments)}}},{"./_a-function":92}],102:[function(F,$,j){$.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(F,$,j){$.exports=!F("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(F,$,j){var N=F("./_is-object"),v=F("./_global").document,O=N(v)&&N(v.createElement);$.exports=function(M){return O?v.createElement(M):{}}},{"./_global":110,"./_is-object":119}],105:[function(F,$,j){$.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(F,$,j){var N=F("./_object-keys"),v=F("./_object-gops"),O=F("./_object-pie");$.exports=function(M){var y=N(M),m=v.f;if(m)for(var S=m(M),b=O.f,p=0,d;S.length>p;)b.call(M,d=S[p++])&&y.push(d);return y}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(F,$,j){var N=F("./_global"),v=F("./_core"),O=F("./_ctx"),M=F("./_hide"),y=F("./_has"),m="prototype",S=function(b,p,d){var t=b&S.F,l=b&S.G,r=b&S.S,i=b&S.P,o=b&S.B,s=b&S.W,u=l?v:v[p]||(v[p]={}),a=u[m],c=l?N:r?N[p]:(N[p]||{})[m],f,w,_;l&&(d=p);for(f in d){if(w=!t&&c&&c[f]!==void 0,w&&y(u,f))continue;_=w?c[f]:d[f],u[f]=l&&typeof c[f]!="function"?d[f]:o&&w?O(_,N):s&&c[f]==_?function(h){var R=function(C,g,x){if(this instanceof h){switch(arguments.length){case 0:return new h;case 1:return new h(C);case 2:return new h(C,g)}return new h(C,g,x)}return h.apply(this,arguments)};return R[m]=h[m],R}(_):i&&typeof _=="function"?O(Function.call,_):_,i&&((u.virtual||(u.virtual={}))[f]=_,b&S.R&&a&&!a[f]&&M(a,f,_))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,$.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(F,$,j){$.exports=function(N){try{return!!N()}catch(v){return!0}}},{}],109:[function(F,$,j){var N=F("./_ctx"),v=F("./_iter-call"),O=F("./_is-array-iter"),M=F("./_an-object"),y=F("./_to-length"),m=F("./core.get-iterator-method"),S={},b={},j=$.exports=function(p,d,t,l,r){var i=r?function(){return p}:m(p),o=N(t,l,d?2:1),s=0,u,a,c,f;if(typeof i!="function")throw TypeError(p+" is not iterable!");if(O(i)){for(u=y(p.length);u>s;s++)if(f=d?o(M(a=p[s])[0],a[1]):o(p[s]),f===S||f===b)return f}else for(c=i.call(p);!(a=c.next()).done;)if(f=v(c,o,a.value,d),f===S||f===b)return f};j.BREAK=S,j.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(F,$,j){var N=$.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(F,$,j){var N={}.hasOwnProperty;$.exports=function(v,O){return N.call(v,O)}},{}],112:[function(F,$,j){var N=F("./_object-dp"),v=F("./_property-desc");$.exports=F("./_descriptors")?function(O,M,y){return N.f(O,M,v(1,y))}:function(O,M,y){return O[M]=y,O}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(F,$,j){var N=F("./_global").document;$.exports=N&&N.documentElement},{"./_global":110}],114:[function(F,$,j){$.exports=!F("./_descriptors")&&!F("./_fails")(function(){return Object.defineProperty(F("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(F,$,j){$.exports=function(N,v,O){var M=O===void 0;switch(v.length){case 0:return M?N():N.call(O);case 1:return M?N(v[0]):N.call(O,v[0]);case 2:return M?N(v[0],v[1]):N.call(O,v[0],v[1]);case 3:return M?N(v[0],v[1],v[2]):N.call(O,v[0],v[1],v[2]);case 4:return M?N(v[0],v[1],v[2],v[3]):N.call(O,v[0],v[1],v[2],v[3])}return N.apply(O,v)}},{}],116:[function(F,$,j){var N=F("./_cof");$.exports=Object("z").propertyIsEnumerable(0)?Object:function(v){return N(v)=="String"?v.split(""):Object(v)}},{"./_cof":98}],117:[function(F,$,j){var N=F("./_iterators"),v=F("./_wks")("iterator"),O=Array.prototype;$.exports=function(M){return M!==void 0&&(N.Array===M||O[v]===M)}},{"./_iterators":125,"./_wks":166}],118:[function(F,$,j){var N=F("./_cof");$.exports=Array.isArray||function(O){return N(O)=="Array"}},{"./_cof":98}],119:[function(F,$,j){$.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(F,$,j){var N=F("./_an-object");$.exports=function(v,O,M,y){try{return y?O(N(M)[0],M[1]):O(M)}catch(S){var m=v.return;throw m!==void 0&&N(m.call(v)),S}}},{"./_an-object":95}],121:[function(F,$,j){"use strict";var N=F("./_object-create"),v=F("./_property-desc"),O=F("./_set-to-string-tag"),M={};F("./_hide")(M,F("./_wks")("iterator"),function(){return this}),$.exports=function(y,m,S){y.prototype=N(M,{next:v(1,S)}),O(y,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(F,$,j){"use strict";var N=F("./_library"),v=F("./_export"),O=F("./_redefine"),M=F("./_hide"),y=F("./_iterators"),m=F("./_iter-create"),S=F("./_set-to-string-tag"),b=F("./_object-gpo"),p=F("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),t="@@iterator",l="keys",r="values",i=function(){return this};$.exports=function(o,s,u,a,c,f,w){m(u,s,a);var _=function(K){if(!d&&K in g)return g[K];switch(K){case l:return function(){return new u(this,K)};case r:return function(){return new u(this,K)}}return function(){return new u(this,K)}},h=s+" Iterator",R=c==r,C=!1,g=o.prototype,x=g[p]||g[t]||c&&g[c],E=x||_(c),T=c?R?_("entries"):E:void 0,k=s=="Array"&&g.entries||x,L,A,G;if(k&&(G=b(k.call(new o)),G!==Object.prototype&&G.next&&(S(G,h,!0),!N&&typeof G[p]!="function"&&M(G,p,i))),R&&x&&x.name!==r&&(C=!0,E=function(){return x.call(this)}),(!N||w)&&(d||C||!g[p])&&M(g,p,E),y[s]=E,y[h]=i,c)if(L={values:R?E:_(r),keys:f?E:_(l),entries:T},w)for(A in L)A in g||O(g,A,L[A]);else v(v.P+v.F*(d||C),s,L);return L}},{"./_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(F,$,j){var N=F("./_wks")("iterator"),v=!1;try{var O=[7][N]();O.return=function(){v=!0},Array.from(O,function(){throw 2})}catch(M){}$.exports=function(M,y){if(!y&&!v)return!1;var m=!1;try{var S=[7],b=S[N]();b.next=function(){return{done:m=!0}},S[N]=function(){return b},M(S)}catch(p){}return m}},{"./_wks":166}],124:[function(F,$,j){$.exports=function(N,v){return{value:v,done:!!N}}},{}],125:[function(F,$,j){$.exports={}},{}],126:[function(F,$,j){$.exports=!0},{}],127:[function(F,$,j){var N=F("./_uid")("meta"),v=F("./_is-object"),O=F("./_has"),M=F("./_object-dp").f,y=0,m=Object.isExtensible||function(){return!0},S=!F("./_fails")(function(){return m(Object.preventExtensions({}))}),b=function(r){M(r,N,{value:{i:"O"+ ++y,w:{}}})},p=function(r,i){if(!v(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!O(r,N)){if(!m(r))return"F";if(!i)return"E";b(r)}return r[N].i},d=function(r,i){if(!O(r,N)){if(!m(r))return!0;if(!i)return!1;b(r)}return r[N].w},t=function(r){return S&&l.NEED&&m(r)&&!O(r,N)&&b(r),r},l=$.exports={KEY:N,NEED:!1,fastKey:p,getWeak:d,onFreeze:t}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(F,$,j){var N=F("./_global"),v=F("./_task").set,O=N.MutationObserver||N.WebKitMutationObserver,M=N.process,y=N.Promise,m=F("./_cof")(M)=="process";$.exports=function(){var S,b,p,d=function(){var i,o;for(m&&(i=M.domain)&&i.exit();S;){o=S.fn,S=S.next;try{o()}catch(s){throw S?p():b=void 0,s}}b=void 0,i&&i.enter()};if(m)p=function(){M.nextTick(d)};else if(O&&!(N.navigator&&N.navigator.standalone)){var t=!0,l=document.createTextNode("");new O(d).observe(l,{characterData:!0}),p=function(){l.data=t=!t}}else if(y&&y.resolve){var r=y.resolve(void 0);p=function(){r.then(d)}}else p=function(){v.call(N,d)};return function(i){var o={fn:i,next:void 0};b&&(b.next=o),S||(S=o,p()),b=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(F,$,j){"use strict";var N=F("./_a-function");function v(O){var M,y;this.promise=new O(function(m,S){if(M!==void 0||y!==void 0)throw TypeError("Bad Promise constructor");M=m,y=S}),this.resolve=N(M),this.reject=N(y)}$.exports.f=function(O){return new v(O)}},{"./_a-function":92}],130:[function(F,$,j){"use strict";var N=F("./_descriptors"),v=F("./_object-keys"),O=F("./_object-gops"),M=F("./_object-pie"),y=F("./_to-object"),m=F("./_iobject"),S=Object.assign;$.exports=!S||F("./_fails")(function(){var b={},p={},d=Symbol(),t="abcdefghijklmnopqrst";return b[d]=7,t.split("").forEach(function(l){p[l]=l}),S({},b)[d]!=7||Object.keys(S({},p)).join("")!=t})?function(p,d){for(var t=y(p),l=arguments.length,r=1,i=O.f,o=M.f;l>r;)for(var s=m(arguments[r++]),u=i?v(s).concat(i(s)):v(s),a=u.length,c=0,f;a>c;)f=u[c++],(!N||o.call(s,f))&&(t[f]=s[f]);return t}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(F,$,j){var N=F("./_an-object"),v=F("./_object-dps"),O=F("./_enum-bug-keys"),M=F("./_shared-key")("IE_PROTO"),y=function(){},m="prototype",S=function(){var b=F("./_dom-create")("iframe"),p=O.length,d="<",t=">",l;for(b.style.display="none",F("./_html").appendChild(b),b.src="javascript:",l=b.contentWindow.document,l.open(),l.write(d+"script"+t+"document.F=Object"+d+"/script"+t),l.close(),S=l.F;p--;)delete S[m][O[p]];return S()};$.exports=Object.create||function(p,d){var t;return p!==null?(y[m]=N(p),t=new y,y[m]=null,t[M]=p):t=S(),d===void 0?t:v(t,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(F,$,j){var N=F("./_an-object"),v=F("./_ie8-dom-define"),O=F("./_to-primitive"),M=Object.defineProperty;j.f=F("./_descriptors")?Object.defineProperty:function(m,S,b){if(N(m),S=O(S,!0),N(b),v)try{return M(m,S,b)}catch(p){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(m[S]=b.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(F,$,j){var N=F("./_object-dp"),v=F("./_an-object"),O=F("./_object-keys");$.exports=F("./_descriptors")?Object.defineProperties:function(y,m){v(y);for(var S=O(m),b=S.length,p=0,d;b>p;)N.f(y,d=S[p++],m[d]);return y}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(F,$,j){var N=F("./_object-pie"),v=F("./_property-desc"),O=F("./_to-iobject"),M=F("./_to-primitive"),y=F("./_has"),m=F("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;j.f=F("./_descriptors")?S:function(p,d){if(p=O(p),d=M(d,!0),m)try{return S(p,d)}catch(t){}if(y(p,d))return v(!N.f.call(p,d),p[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(F,$,j){var N=F("./_to-iobject"),v=F("./_object-gopn").f,O={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y=function(m){try{return v(m)}catch(S){return M.slice()}};$.exports.f=function(S){return M&&O.call(S)=="[object Window]"?y(S):v(N(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(F,$,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys").concat("length","prototype");j.f=Object.getOwnPropertyNames||function(M){return N(M,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(F,$,j){j.f=Object.getOwnPropertySymbols},{}],138:[function(F,$,j){var N=F("./_has"),v=F("./_to-object"),O=F("./_shared-key")("IE_PROTO"),M=Object.prototype;$.exports=Object.getPrototypeOf||function(y){return y=v(y),N(y,O)?y[O]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?M:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(F,$,j){var N=F("./_has"),v=F("./_to-iobject"),O=F("./_array-includes")(!1),M=F("./_shared-key")("IE_PROTO");$.exports=function(y,m){var S=v(y),b=0,p=[],d;for(d in S)d!=M&&(N(S,d)&&p.push(d));for(;m.length>b;)N(S,d=m[b++])&&(~O(p,d)||p.push(d));return p}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(F,$,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys");$.exports=Object.keys||function(M){return N(M,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(F,$,j){j.f={}.propertyIsEnumerable},{}],142:[function(F,$,j){var N=F("./_export"),v=F("./_core"),O=F("./_fails");$.exports=function(M,y){var m=(v.Object||{})[M]||Object[M],S={};S[M]=y(m),N(N.S+N.F*O(function(){m(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(F,$,j){var N=F("./_descriptors"),v=F("./_object-keys"),O=F("./_to-iobject"),M=F("./_object-pie").f;$.exports=function(y){return function(m){for(var S=O(m),b=v(S),p=b.length,d=0,t=[],l;p>d;)l=b[d++],(!N||M.call(S,l))&&t.push(y?[l,S[l]]:S[l]);return t}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(F,$,j){$.exports=function(N){try{return{e:!1,v:N()}}catch(v){return{e:!0,v}}}},{}],145:[function(F,$,j){var N=F("./_an-object"),v=F("./_is-object"),O=F("./_new-promise-capability");$.exports=function(M,y){if(N(M),v(y)&&y.constructor===M)return y;var m=O.f(M),S=m.resolve;return S(y),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(F,$,j){$.exports=function(N,v){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:v}}},{}],147:[function(F,$,j){var N=F("./_hide");$.exports=function(v,O,M){for(var y in O)M&&v[y]?v[y]=O[y]:N(v,y,O[y]);return v}},{"./_hide":112}],148:[function(F,$,j){$.exports=F("./_hide")},{"./_hide":112}],149:[function(F,$,j){"use strict";var N=F("./_global"),v=F("./_core"),O=F("./_object-dp"),M=F("./_descriptors"),y=F("./_wks")("species");$.exports=function(m){var S=typeof v[m]=="function"?v[m]:N[m];M&&S&&!S[y]&&O.f(S,y,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(F,$,j){var N=F("./_object-dp").f,v=F("./_has"),O=F("./_wks")("toStringTag");$.exports=function(M,y,m){M&&!v(M=m?M:M.prototype,O)&&N(M,O,{configurable:!0,value:y})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(F,$,j){var N=F("./_shared")("keys"),v=F("./_uid");$.exports=function(O){return N[O]||(N[O]=v(O))}},{"./_shared":152,"./_uid":162}],152:[function(F,$,j){var N=F("./_core"),v=F("./_global"),O="__core-js_shared__",M=v[O]||(v[O]={});($.exports=function(y,m){return M[y]||(M[y]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:F("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(F,$,j){var N=F("./_an-object"),v=F("./_a-function"),O=F("./_wks")("species");$.exports=function(M,y){var m=N(M).constructor,S;return m===void 0||(S=N(m)[O])==null?y:v(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(F,$,j){var N=F("./_to-integer"),v=F("./_defined");$.exports=function(O){return function(M,y){var m=String(v(M)),S=N(y),b=m.length,p,d;return S<0||S>=b?O?"":void 0:(p=m.charCodeAt(S),p<55296||p>56319||S+1===b||(d=m.charCodeAt(S+1))<56320||d>57343?O?m.charAt(S):p:O?m.slice(S,S+2):(p-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(F,$,j){var N=F("./_ctx"),v=F("./_invoke"),O=F("./_html"),M=F("./_dom-create"),y=F("./_global"),m=y.process,S=y.setImmediate,b=y.clearImmediate,p=y.MessageChannel,d=y.Dispatch,t=0,l={},r="onreadystatechange",i,o,s,u=function(){var c=+this;if(l.hasOwnProperty(c)){var f=l[c];delete l[c],f()}},a=function(c){u.call(c.data)};(!S||!b)&&(S=function(f){for(var w=[],_=1;arguments.length>_;)w.push(arguments[_++]);return l[++t]=function(){v(typeof f=="function"?f:Function(f),w)},i(t),t},b=function(f){delete l[f]},F("./_cof")(m)=="process"?i=function(c){m.nextTick(N(u,c,1))}:d&&d.now?i=function(c){d.now(N(u,c,1))}:p?(o=new p,s=o.port2,o.port1.onmessage=a,i=N(s.postMessage,s,1)):y.addEventListener&&typeof postMessage=="function"&&!y.importScripts?(i=function(c){y.postMessage(c+"","*")},y.addEventListener("message",a,!1)):r in M("script")?i=function(c){O.appendChild(M("script"))[r]=function(){O.removeChild(this),u.call(c)}}:i=function(c){setTimeout(N(u,c,1),0)}),$.exports={set:S,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(F,$,j){var N=F("./_to-integer"),v=Math.max,O=Math.min;$.exports=function(M,y){return M=N(M),M<0?v(M+y,0):O(M,y)}},{"./_to-integer":157}],157:[function(F,$,j){var N=Math.ceil,v=Math.floor;$.exports=function(O){return isNaN(O=+O)?0:(O>0?v:N)(O)}},{}],158:[function(F,$,j){var N=F("./_iobject"),v=F("./_defined");$.exports=function(O){return N(v(O))}},{"./_defined":102,"./_iobject":116}],159:[function(F,$,j){var N=F("./_to-integer"),v=Math.min;$.exports=function(O){return O>0?v(N(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(F,$,j){var N=F("./_defined");$.exports=function(v){return Object(N(v))}},{"./_defined":102}],161:[function(F,$,j){var N=F("./_is-object");$.exports=function(v,O){if(!N(v))return v;var M,y;if(O&&typeof(M=v.toString)=="function"&&!N(y=M.call(v)))return y;if(typeof(M=v.valueOf)=="function"&&!N(y=M.call(v)))return y;if(!O&&typeof(M=v.toString)=="function"&&!N(y=M.call(v)))return y;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(F,$,j){var N=0,v=Math.random();$.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++N+v).toString(36))}},{}],163:[function(F,$,j){var N=F("./_global"),v=N.navigator;$.exports=v&&v.userAgent||""},{"./_global":110}],164:[function(F,$,j){var N=F("./_global"),v=F("./_core"),O=F("./_library"),M=F("./_wks-ext"),y=F("./_object-dp").f;$.exports=function(m){var S=v.Symbol||(v.Symbol=O?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in S)&&y(S,m,{value:M.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(F,$,j){j.f=F("./_wks")},{"./_wks":166}],166:[function(F,$,j){var N=F("./_shared")("wks"),v=F("./_uid"),O=F("./_global").Symbol,M=typeof O=="function",y=$.exports=function(m){return N[m]||(N[m]=M&&O[m]||(M?O:v)("Symbol."+m))};y.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(F,$,j){var N=F("./_classof"),v=F("./_wks")("iterator"),O=F("./_iterators");$.exports=F("./_core").getIteratorMethod=function(M){if(M!=null)return M[v]||M["@@iterator"]||O[N(M)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(F,$,j){"use strict";var N=F("./_ctx"),v=F("./_export"),O=F("./_to-object"),M=F("./_iter-call"),y=F("./_is-array-iter"),m=F("./_to-length"),S=F("./_create-property"),b=F("./core.get-iterator-method");v(v.S+v.F*!F("./_iter-detect")(function(p){Array.from(p)}),"Array",{from:function(d){var t=O(d),l=typeof this=="function"?this:Array,r=arguments.length,i=r>1?arguments[1]:void 0,o=i!==void 0,s=0,u=b(t),a,c,f,w;if(o&&(i=N(i,r>2?arguments[2]:void 0,2)),u!=null&&!(l==Array&&y(u)))for(w=u.call(t),c=new l;!(f=w.next()).done;s++)S(c,s,o?M(w,i,[f.value,s],!0):f.value);else for(a=m(t.length),c=new l(a);a>s;s++)S(c,s,o?i(t[s],s):t[s]);return c.length=s,c}})},{"./_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(F,$,j){"use strict";var N=F("./_add-to-unscopables"),v=F("./_iter-step"),O=F("./_iterators"),M=F("./_to-iobject");$.exports=F("./_iter-define")(Array,"Array",function(y,m){this._t=M(y),this._i=0,this._k=m},function(){var y=this._t,m=this._k,S=this._i++;return!y||S>=y.length?(this._t=void 0,v(1)):m=="keys"?v(0,S):m=="values"?v(0,y[S]):v(0,[S,y[S]])},"values"),O.Arguments=O.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(F,$,j){"use strict";var N=F("./_is-object"),v=F("./_object-gpo"),O=F("./_wks")("hasInstance"),M=Function.prototype;O in M||F("./_object-dp").f(M,O,{value:function(y){if(typeof this!="function"||!N(y))return!1;if(!N(this.prototype))return y instanceof this;for(;y=v(y);)if(this.prototype===y)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(F,$,j){var N=F("./_export");N(N.S+N.F,"Object",{assign:F("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(F,$,j){var N=F("./_export");N(N.S,"Object",{create:F("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(F,$,j){var N=F("./_export");N(N.S+N.F*!F("./_descriptors"),"Object",{defineProperty:F("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(F,$,j){F("./_object-sap")("getOwnPropertyNames",function(){return F("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(F,$,j){var N=F("./_to-object"),v=F("./_object-gpo");F("./_object-sap")("getPrototypeOf",function(){return function(M){return v(N(M))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(F,$,j){var N=F("./_to-object"),v=F("./_object-keys");F("./_object-sap")("keys",function(){return function(M){return v(N(M))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(F,$,j){arguments[4][71][0].apply(j,arguments)},{dup:71}],178:[function(F,$,j){"use strict";var N=F("./_library"),v=F("./_global"),O=F("./_ctx"),M=F("./_classof"),y=F("./_export"),m=F("./_is-object"),S=F("./_a-function"),b=F("./_an-instance"),p=F("./_for-of"),d=F("./_species-constructor"),t=F("./_task").set,l=F("./_microtask")(),r=F("./_new-promise-capability"),i=F("./_perform"),o=F("./_user-agent"),s=F("./_promise-resolve"),u="Promise",a=v.TypeError,c=v.process,f=c&&c.versions,w=f&&f.v8||"",_=v[u],h=M(c)=="process",R=function(){},C,g,x,E,T=g=r.f,k=!!function(){try{var P=_.resolve(1),H=(P.constructor={})[F("./_wks")("species")]=function(V){V(R,R)};return(h||typeof PromiseRejectionEvent=="function")&&P.then(R)instanceof H&&w.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(V){}}(),L=function(P){var H;return m(P)&&typeof(H=P.then)=="function"?H:!1},A=function(P,H){if(P._n)return;P._n=!0;var V=P._c;l(function(){for(var q=P._v,Z=P._s==1,ce=0,he=function(ae){var xe=Z?ae.ok:ae.fail,ge=ae.resolve,oe=ae.reject,se=ae.domain,te,be,ee;try{xe?(Z||(P._h==2&&W(P),P._h=1),xe===!0?te=q:(se&&se.enter(),te=xe(q),se&&(se.exit(),ee=!0)),te===ae.promise?oe(a("Promise-chain cycle")):(be=L(te))?be.call(te,ge,oe):ge(te)):oe(q)}catch(ie){se&&!ee&&se.exit(),oe(ie)}};V.length>ce;)he(V[ce++]);P._c=[],P._n=!1,H&&!P._h&&G(P)})},G=function(P){t.call(v,function(){var H=P._v,V=K(P),q,Z,ce;if(V&&(q=i(function(){h?c.emit("unhandledRejection",H,P):(Z=v.onunhandledrejection)?Z({promise:P,reason:H}):(ce=v.console)&&ce.error&&ce.error("Unhandled promise rejection",H)}),P._h=h||K(P)?2:1),P._a=void 0,V&&q.e)throw q.v})},K=function(P){return P._h!==1&&(P._a||P._c).length===0},W=function(P){t.call(v,function(){var H;h?c.emit("rejectionHandled",P):(H=v.onrejectionhandled)&&H({promise:P,reason:P._v})})},z=function(P){var H=this;if(H._d)return;H._d=!0,H=H._w||H,H._v=P,H._s=2,H._a||(H._a=H._c.slice()),A(H,!0)},U=function(P){var H=this,V;if(H._d)return;H._d=!0,H=H._w||H;try{if(H===P)throw a("Promise can't be resolved itself");(V=L(P))?l(function(){var q={_w:H,_d:!1};try{V.call(P,O(U,q,1),O(z,q,1))}catch(Z){z.call(q,Z)}}):(H._v=P,H._s=1,A(H,!1))}catch(q){z.call({_w:H,_d:!1},q)}};k||(_=function(H){b(this,_,u,"_h"),S(H),C.call(this);try{H(O(U,this,1),O(z,this,1))}catch(V){z.call(this,V)}},C=function(H){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=F("./_redefine-all")(_.prototype,{then:function(H,V){var q=T(d(this,_));return q.ok=typeof H=="function"?H:!0,q.fail=typeof V=="function"&&V,q.domain=h?c.domain:void 0,this._c.push(q),this._a&&this._a.push(q),this._s&&A(this,!1),q.promise},catch:function(P){return this.then(void 0,P)}}),x=function(){var P=new C;this.promise=P,this.resolve=O(U,P,1),this.reject=O(z,P,1)},r.f=T=function(P){return P===_||P===E?new x(P):g(P)}),y(y.G+y.W+y.F*!k,{Promise:_}),F("./_set-to-string-tag")(_,u),F("./_set-species")(u),E=F("./_core")[u],y(y.S+y.F*!k,u,{reject:function(H){var V=T(this),q=V.reject;return q(H),V.promise}}),y(y.S+y.F*(N||!k),u,{resolve:function(H){return s(N&&this===E?_:this,H)}}),y(y.S+y.F*!(k&&F("./_iter-detect")(function(P){_.all(P).catch(R)})),u,{all:function(H){var V=this,q=T(V),Z=q.resolve,ce=q.reject,he=i(function(){var ae=[],xe=0,ge=1;p(H,!1,function(oe){var se=xe++,te=!1;ae.push(void 0),ge++,V.resolve(oe).then(function(be){if(te)return;te=!0,ae[se]=be,--ge||Z(ae)},ce)}),--ge||Z(ae)});return he.e&&ce(he.v),q.promise},race:function(H){var V=this,q=T(V),Z=q.reject,ce=i(function(){p(H,!1,function(he){V.resolve(he).then(q.resolve,Z)})});return ce.e&&Z(ce.v),q.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(F,$,j){var N=F("./_export"),v=F("./_to-absolute-index"),O=String.fromCharCode,M=String.fromCodePoint;N(N.S+N.F*(!!M&&M.length!=1),"String",{fromCodePoint:function(m){for(var S=[],b=arguments.length,p=0,d;b>p;){if(d=+arguments[p++],v(d,1114111)!==d)throw RangeError(d+" is not a valid code point");S.push(d<65536?O(d):O(((d-=65536)>>10)+55296,d%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(F,$,j){"use strict";var N=F("./_string-at")(!0);F("./_iter-define")(String,"String",function(v){this._t=String(v),this._i=0},function(){var v=this._t,O=this._i,M;return O>=v.length?{value:void 0,done:!0}:(M=N(v,O),this._i+=M.length,{value:M,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(F,$,j){"use strict";var N=F("./_global"),v=F("./_has"),O=F("./_descriptors"),M=F("./_export"),y=F("./_redefine"),m=F("./_meta").KEY,S=F("./_fails"),b=F("./_shared"),p=F("./_set-to-string-tag"),d=F("./_uid"),t=F("./_wks"),l=F("./_wks-ext"),r=F("./_wks-define"),i=F("./_enum-keys"),o=F("./_is-array"),s=F("./_an-object"),u=F("./_is-object"),a=F("./_to-object"),c=F("./_to-iobject"),f=F("./_to-primitive"),w=F("./_property-desc"),_=F("./_object-create"),h=F("./_object-gopn-ext"),R=F("./_object-gopd"),C=F("./_object-gops"),g=F("./_object-dp"),x=F("./_object-keys"),E=R.f,T=g.f,k=h.f,L=N.Symbol,A=N.JSON,G=A&&A.stringify,K="prototype",W=t("_hidden"),z=t("toPrimitive"),U={}.propertyIsEnumerable,P=b("symbol-registry"),H=b("symbols"),V=b("op-symbols"),q=Object[K],Z=typeof L=="function"&&!!C.f,ce=N.QObject,he=!ce||!ce[K]||!ce[K].findChild,ae=O&&S(function(){return _(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(fe,Te,ze){var Je=E(q,Te);Je&&delete q[Te],T(fe,Te,ze),Je&&fe!==q&&T(q,Te,Je)}:T,xe=function(fe){var Te=H[fe]=_(L[K]);return Te._k=fe,Te},ge=Z&&typeof L.iterator=="symbol"?function(fe){return typeof fe=="symbol"}:function(fe){return fe instanceof L},oe=function(Te,ze,Je){return Te===q&&oe(V,ze,Je),s(Te),ze=f(ze,!0),s(Je),v(H,ze)?(Je.enumerable?(v(Te,W)&&Te[W][ze]&&(Te[W][ze]=!1),Je=_(Je,{enumerable:w(0,!1)})):(v(Te,W)||T(Te,W,w(1,{})),Te[W][ze]=!0),ae(Te,ze,Je)):T(Te,ze,Je)},se=function(Te,ze){s(Te);for(var Je=i(ze=c(ze)),qe=0,Xe=Je.length,et;Xe>qe;)oe(Te,et=Je[qe++],ze[et]);return Te},te=function(Te,ze){return ze===void 0?_(Te):se(_(Te),ze)},be=function(Te){var ze=U.call(this,Te=f(Te,!0));return this===q&&v(H,Te)&&!v(V,Te)?!1:ze||!v(this,Te)||!v(H,Te)||v(this,W)&&this[W][Te]?ze:!0},ee=function(Te,ze){if(Te=c(Te),ze=f(ze,!0),Te===q&&v(H,ze)&&!v(V,ze))return;var Je=E(Te,ze);return Je&&v(H,ze)&&!(v(Te,W)&&Te[W][ze])&&(Je.enumerable=!0),Je},ie=function(Te){for(var ze=k(c(Te)),Je=[],qe=0,Xe;ze.length>qe;)!v(H,Xe=ze[qe++])&&Xe!=W&&Xe!=m&&Je.push(Xe);return Je},Ee=function(Te){for(var ze=Te===q,Je=k(ze?V:c(Te)),qe=[],Xe=0,et;Je.length>Xe;)v(H,et=Je[Xe++])&&(ze?v(q,et):!0)&&qe.push(H[et]);return qe};Z||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var Te=d(arguments.length>0?arguments[0]:void 0),ze=function(Je){this===q&&ze.call(V,Je),v(this,W)&&v(this[W],Te)&&(this[W][Te]=!1),ae(this,Te,w(1,Je))};return O&&he&&ae(q,Te,{configurable:!0,set:ze}),xe(Te)},y(L[K],"toString",function(){return this._k}),R.f=ee,g.f=oe,F("./_object-gopn").f=h.f=ie,F("./_object-pie").f=be,C.f=Ee,O&&!F("./_library")&&y(q,"propertyIsEnumerable",be,!0),l.f=function(fe){return xe(t(fe))}),M(M.G+M.W+M.F*!Z,{Symbol:L});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;ne.length>J;)t(ne[J++]);for(var X=x(t.store),Q=0;X.length>Q;)r(X[Q++]);M(M.S+M.F*!Z,"Symbol",{for:function(fe){return v(P,fe+="")?P[fe]:P[fe]=L(fe)},keyFor:function(Te){if(!ge(Te))throw TypeError(Te+" is not a symbol!");for(var ze in P)if(P[ze]===Te)return ze},useSetter:function(){he=!0},useSimple:function(){he=!1}}),M(M.S+M.F*!Z,"Object",{create:te,defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:ee,getOwnPropertyNames:ie,getOwnPropertySymbols:Ee});var me=S(function(){C.f(1)});M(M.S+M.F*me,"Object",{getOwnPropertySymbols:function(Te){return C.f(a(Te))}}),A&&M(M.S+M.F*(!Z||S(function(){var fe=L();return G([fe])!="[null]"||G({a:fe})!="{}"||G(Object(fe))!="{}"})),"JSON",{stringify:function(Te){for(var ze=[Te],Je=1,qe,Xe;arguments.length>Je;)ze.push(arguments[Je++]);return Xe=qe=ze[1],!u(qe)&&Te===void 0||ge(Te)?void 0:(o(qe)||(qe=function(et,rt){if(typeof Xe=="function"&&(rt=Xe.call(this,et,rt)),!ge(rt))return rt}),ze[1]=qe,G.apply(A,ze))}}),L[K][z]||F("./_hide")(L[K],z,L[K].valueOf),p(L,"Symbol"),p(Math,"Math",!0),p(N.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(F,$,j){var N=F("./_export"),v=F("./_object-to-array")(!0);N(N.S,"Object",{entries:function(M){return v(M)}})},{"./_export":107,"./_object-to-array":143}],183:[function(F,$,j){"use strict";var N=F("./_export"),v=F("./_core"),O=F("./_global"),M=F("./_species-constructor"),y=F("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var S=M(this,v.Promise||O.Promise),b=typeof m=="function";return this.then(b?function(p){return y(S,m()).then(function(){return p})}:m,b?function(p){return y(S,m()).then(function(){throw p})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(F,$,j){"use strict";var N=F("./_export"),v=F("./_new-promise-capability"),O=F("./_perform");N(N.S,"Promise",{try:function(M){var y=v.f(this),m=O(M);return(m.e?y.reject:y.resolve)(m.v),y.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(F,$,j){F("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(F,$,j){F("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(F,$,j){F("./es6.array.iterator");for(var N=F("./_global"),v=F("./_hide"),O=F("./_iterators"),M=F("./_wks")("toStringTag"),y="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][c%10>3?0:(c%100-c%10!=10)*c%10],W:E,N:T};return i.replace(d,function(L){return L in k?k[L]:L.slice(1,L.length-1)})}}();y.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"},y.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(d,t){for(d=String(d),t=t||2;d.length]/;$.exports=v;function v(O){var M=""+O,y=N.exec(M);if(!y)return M;var m,S="",b=0,p=0;for(b=y.index;b0&&this._events[m].length>b&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,S){if(!v(S))throw TypeError("listener must be a function");var b=!1;function p(){this.removeListener(m,p),b||(b=!0,S.apply(this,arguments))}return p.listener=S,this.on(m,p),this},N.prototype.removeListener=function(m,S){var b,p,d,t;if(!v(S))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(b=this._events[m],d=b.length,p=-1,b===S||v(b.listener)&&b.listener===S)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,S);else if(M(b)){for(t=d;t-- >0;)if(b[t]===S||b[t].listener&&b[t].listener===S){p=t;break}if(p<0)return this;b.length===1?(b.length=0,delete this._events[m]):b.splice(p,1),this._events.removeListener&&this.emit("removeListener",m,S)}return this},N.prototype.removeAllListeners=function(m){var S,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(b=this._events[m],v(b))this.removeListener(m,b);else if(b)for(;b.length;)this.removeListener(m,b[b.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var S;return!this._events||!this._events[m]?S=[]:v(this._events[m])?S=[this._events[m]]:S=this._events[m].slice(),S},N.prototype.listenerCount=function(m){if(this._events){var S=this._events[m];if(v(S))return 1;if(S)return S.length}return 0},N.listenerCount=function(m,S){return m.listenerCount(S)};function v(m){return typeof m=="function"}function O(m){return typeof m=="number"}function M(m){return typeof m=="object"&&m!==null}function y(m){return m===void 0}},{}],193:[function(F,$,j){var N=F("http"),v=$.exports;for(var O in N)N.hasOwnProperty(O)&&(v[O]=N[O]);v.request=function(M,y){return M||(M={}),M.scheme="https",M.protocol="https:",N.request.call(this,M,y)}},{http:231}],194:[function(F,$,j){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=F("util"),v=F("ms");$.exports=function(O){if(typeof O=="number")return O;var M=v(O);if(M===void 0){var y=new Error(N.format("humanize-ms(%j) result undefined",O));console.warn(y.stack)}return M}},{ms:204,util:243}],195:[function(F,$,j){j.read=function(N,v,O,M,y){var m,S,b=y*8-M-1,p=(1<>1,t=-7,l=O?y-1:0,r=O?-1:1,i=N[v+l];for(l+=r,m=i&(1<<-t)-1,i>>=-t,t+=b;t>0;m=m*256+N[v+l],l+=r,t-=8);for(S=m&(1<<-t)-1,m>>=-t,t+=M;t>0;S=S*256+N[v+l],l+=r,t-=8);if(m===0)m=1-d;else{if(m===p)return S?NaN:(i?-1:1)*Infinity;S=S+Math.pow(2,M),m=m-d}return(i?-1:1)*S*Math.pow(2,m-M)},j.write=function(N,v,O,M,y,m){var S,b,p,d=m*8-y-1,t=(1<>1,r=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=M?0:m-1,o=M?1:-1,s=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===Infinity?(b=isNaN(v)?1:0,S=t):(S=Math.floor(Math.log(v)/Math.LN2),v*(p=Math.pow(2,-S))<1&&(S--,p*=2),S+l>=1?v+=r/p:v+=r*Math.pow(2,1-l),v*p>=2&&(S++,p/=2),S+l>=t?(b=0,S=t):S+l>=1?(b=(v*p-1)*Math.pow(2,y),S=S+l):(b=v*Math.pow(2,l-1)*Math.pow(2,y),S=0));y>=8;N[O+i]=b&255,i+=o,b/=256,y-=8);for(S=S<0;N[O+i]=S&255,i+=o,S/=256,d-=8);N[O+i-o]|=s*128}},{}],196:[function(F,$,j){typeof Object.create=="function"?$.exports=function(v,O){O&&(v.super_=O,v.prototype=Object.create(O.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(v,O){if(O){v.super_=O;var M=function(){};M.prototype=O.prototype,v.prototype=new M,v.prototype.constructor=v}}},{}],197:[function(F,$,j){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */$.exports=function(O){return O!=null&&(N(O)||v(O)||!!O._isBuffer)};function N(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function v(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&N(O.slice(0,0))}},{}],198:[function(F,$,j){var N={}.toString;$.exports=Array.isArray||function(v){return N.call(v)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(F,$){typeof exports=="object"&&typeof module!="undefined"?module.exports=$(F):typeof define=="function"&&define.amd?define($):$(F)})(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(F){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(F){for(var $={},j=0,N=F.length;j>>6)+fromCharCode(128|$&63):fromCharCode(224|$>>>12&15)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}else{var $=65536+(F.charCodeAt(0)-55296)*1024+(F.charCodeAt(1)-56320);return fromCharCode(240|$>>>18&7)+fromCharCode(128|$>>>12&63)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(F){return F.replace(re_utob,cb_utob)},cb_encode=function(F){var $=[0,2,1][F.length%3],j=F.charCodeAt(0)<<16|(F.length>1?F.charCodeAt(1):0)<<8|(F.length>2?F.charCodeAt(2):0),N=[b64chars.charAt(j>>>18),b64chars.charAt(j>>>12&63),$>=2?"=":b64chars.charAt(j>>>6&63),$>=1?"=":b64chars.charAt(j&63)];return N.join("")},btoa=global.btoa?function(F){return global.btoa(F)}:function(F){return F.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(F){var $=Object.prototype.toString.call(F)==="[object Uint8Array]";return $?F.toString("base64"):btoa(utob(String(F)))},encode=function(F,$){return $?_encode(String(F)).replace(/[+\/]/g,function(j){return j=="+"?"-":"_"}).replace(/=/g,""):_encode(F)},encodeURI=function(F){return encode(F,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(F){switch(F.length){case 4:var $=(7&F.charCodeAt(0))<<18|(63&F.charCodeAt(1))<<12|(63&F.charCodeAt(2))<<6|63&F.charCodeAt(3),j=$-65536;return fromCharCode((j>>>10)+55296)+fromCharCode((j&1023)+56320);case 3:return fromCharCode((15&F.charCodeAt(0))<<12|(63&F.charCodeAt(1))<<6|63&F.charCodeAt(2));default:return fromCharCode((31&F.charCodeAt(0))<<6|63&F.charCodeAt(1))}},btou=function(F){return F.replace(re_btou,cb_btou)},cb_decode=function(F){var $=F.length,j=$%4,N=($>0?b64tab[F.charAt(0)]<<18:0)|($>1?b64tab[F.charAt(1)]<<12:0)|($>2?b64tab[F.charAt(2)]<<6:0)|($>3?b64tab[F.charAt(3)]:0),v=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return v.length-=[0,0,2,1][j],v.join("")},_atob=global.atob?function(F){return global.atob(F)}:function(F){return F.replace(/\S{1,4}/g,cb_decode)},atob=function(F){return _atob(String(F).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(F){return(F.constructor===buffer.constructor?F:buffer.from(F,"base64")).toString()}:function(F){return(F.constructor===buffer.constructor?F:new buffer(F,"base64")).toString()}:function(F){return btou(_atob(F))},decode=function(F){return _decode(String(F).replace(/[-_]/g,function($){return $=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var F=global.Base64;return global.Base64=_Base64,F};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(F){return{value:F,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(F){return encode(this,F)})),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(F,$,j){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";$.exports=v;var N=Object.prototype.hasOwnProperty;function v(O,M,y){if(!O)throw new TypeError("argument dest is required");if(!M)throw new TypeError("argument src is required");return y===void 0&&(y=!0),Object.getOwnPropertyNames(M).forEach(function(S){if(!y&&N.call(O,S))return;var b=Object.getOwnPropertyDescriptor(M,S);Object.defineProperty(O,S,b)}),O}},{}],201:[function(F,$,j){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var v=0;v0)return S(t);if(r==="number"&&isFinite(t))return l.long?p(t):b(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function S(t){if(t=String(t),t.length>100)return;var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!l)return;var r=parseFloat(l[1]),i=(l[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*m;case"weeks":case"week":case"w":return r*y;case"days":case"day":case"d":return r*M;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function b(t){var l=Math.abs(t);return l>=M?Math.round(t/M)+"d":l>=O?Math.round(t/O)+"h":l>=v?Math.round(t/v)+"m":l>=N?Math.round(t/N)+"s":t+"ms"}function p(t){var l=Math.abs(t);return l>=M?d(t,l,M,"day"):l>=O?d(t,l,O,"hour"):l>=v?d(t,l,v,"minute"):l>=N?d(t,l,N,"second"):t+" ms"}function d(t,l,r,i){var o=l>=r*1.5;return Math.round(t/r)+" "+i+(o?"s":"")}},{}],205:[function(F,$,j){(function(N){function v(m,S){for(var b=0,p=m.length-1;p>=0;p--){var d=m[p];d==="."?m.splice(p,1):d===".."?(m.splice(p,1),b++):b&&(m.splice(p,1),b--)}if(S)for(;b--;b)m.unshift("..");return m}j.resolve=function(){for(var m="",S=!1,b=arguments.length-1;b>=-1&&!S;b--){var p=b>=0?arguments[b]:N.cwd();if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;m=p+"/"+m,S=p.charAt(0)==="/"}return m=v(M(m.split("/"),function(d){return!!d}),!S).join("/"),(S?"/":"")+m||"."},j.normalize=function(m){var S=j.isAbsolute(m),b=y(m,-1)==="/";return m=v(M(m.split("/"),function(p){return!!p}),!S).join("/"),!m&&!S&&(m="."),m&&b&&(m+="/"),(S?"/":"")+m},j.isAbsolute=function(m){return m.charAt(0)==="/"},j.join=function(){var m=Array.prototype.slice.call(arguments,0);return j.normalize(M(m,function(S,b){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},j.relative=function(m,S){m=j.resolve(m).substr(1),S=j.resolve(S).substr(1);function b(o){for(var s=0;s=0&&!(o[u]!=="");u--);return s>u?[]:o.slice(s,u-s+1)}for(var p=b(m.split("/")),d=b(S.split("/")),t=Math.min(p.length,d.length),l=t,r=0;r=1;--t)if(S=m.charCodeAt(t),S===47){if(!d){p=t;break}}else d=!1;return p===-1?b?"/":".":b&&p===1?"/":m.slice(0,p)};function O(m){typeof m!="string"&&(m=m+"");var S=0,b=-1,p=!0,d;for(d=m.length-1;d>=0;--d)if(m.charCodeAt(d)===47){if(!p){S=d+1;break}}else b===-1&&(p=!1,b=d+1);return b===-1?"":m.slice(S,b)}j.basename=function(m,S){var b=O(m);return S&&b.substr(-1*S.length)===S&&(b=b.substr(0,b.length-S.length)),b},j.extname=function(m){typeof m!="string"&&(m=m+"");for(var S=-1,b=0,p=-1,d=!0,t=0,l=m.length-1;l>=0;--l){var r=m.charCodeAt(l);if(r===47){if(!d){b=l+1;break}continue}p===-1&&(d=!1,p=l+1),r===46?S===-1?S=l:t!==1&&(t=1):S!==-1&&(t=-1)}return S===-1||p===-1||t===0||t===1&&S===p-1&&S===b+1?"":m.slice(S,p)};function M(m,S){if(m.filter)return m.filter(S);for(var b=[],p=0;p * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var v={function:!0,object:!0},O=v[typeof window]&&window||this,M=O,y=v[typeof j]&&j,m=v[typeof $]&&$&&!$.nodeType&&$,S=y&&m&&typeof N=="object"&&N;S&&(S.global===S||S.window===S||S.self===S)&&(O=S);var b=Math.pow(2,53)-1,p=/\bOpera/,d=this,t=Object.prototype,l=t.hasOwnProperty,r=t.toString;function i(g){return g=String(g),g.charAt(0).toUpperCase()+g.slice(1)}function o(g,x,E){var T={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&E&&/^Win/i.test(g)&&!/^Windows Phone /i.test(g)&&(T=T[/[\d.]+$/.exec(g)])&&(g="Windows "+T),g=String(g),x&&E&&(g=g.replace(RegExp(x,"i"),E)),g=u(g.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]),g}function s(g,x){var E=-1,T=g?g.length:0;if(typeof T=="number"&&T>-1&&T<=b)for(;++E3&&"WebKit"||/\bOpera\b/.test(ie)&&(/\bOPR\b/.test(g)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(g)&&!/^(?:Trident|EdgeHTML)$/.test(ee)&&"WebKit"||!ee&&/\bMSIE\b/i.test(g)&&(J=="Mac OS"?"Tasman":"Trident")||ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ie)&&"NetFront")&&(ee=[ae]),ie=="IE"&&(ae=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(g)||0)[1])?(ie+=" Mobile",J="Windows Phone "+(/\+$/.test(ae)?ae:ae+".x"),ge.unshift("desktop mode")):/\bWPDesktop\b/i.test(g)?(ie="IE Mobile",J="Windows Phone 8.x",ge.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(g)||0)[1])):ie!="IE"&&ee=="Trident"&&(ae=/\brv:([\d.]+)/.exec(g))&&(ie&&ge.push("identifying as "+ie+(te?" "+te:"")),ie="IE",te=ae[1]),se){if(f(x,"global"))if(P&&(ae=P.lang.System,xe=ae.getProperty("os.arch"),J=J||ae.getProperty("os.name")+" "+ae.getProperty("os.version")),H){try{te=x.require("ringo/engine").version.join("."),ie="RingoJS"}catch(Xe){(ae=x.system)&&ae.global.system==x.system&&(ie="Narwhal",J||(J=ae[0].os||null))}ie||(ie="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ae=x.process)&&(typeof ae.versions=="object"&&(typeof ae.versions.electron=="string"?(ge.push("Node "+ae.versions.node),ie="Electron",te=ae.versions.electron):typeof ae.versions.nw=="string"&&(ge.push("Chromium "+te,"Node "+ae.versions.node),ie="NW.js",te=ae.versions.nw)),ie||(ie="Node.js",xe=ae.arch,J=ae.platform,te=/[\d.]+/.exec(ae.version),te=te?te[0]:null));else c(ae=x.runtime)==K?(ie="Adobe AIR",J=ae.flash.system.Capabilities.os):c(ae=x.phantom)==U?(ie="PhantomJS",te=(ae=ae.version||null)&&ae.major+"."+ae.minor+"."+ae.patch):typeof Z.documentMode=="number"&&(ae=/\bTrident\/(\d+)/i.exec(g))?(te=[te,Z.documentMode],(ae=+ae[1]+4)!=te[1]&&(ge.push("IE "+te[1]+" mode"),ee&&(ee[1]=""),te[1]=ae),te=ie=="IE"?String(te[1].toFixed(1)):te[0]):typeof Z.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ie)&&(ge.push("masking as "+ie+" "+te),ie="IE",te="11.0",ee=["Trident"],J="Windows");J=J&&u(J)}if(te&&(ae=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(g+";"+(se&&T.appMinorVersion))||/\bMinefield\b/i.test(g)&&"a")&&(oe=/b/i.test(ae)?"beta":"alpha",te=te.replace(RegExp(ae+"\\+?$"),"")+(oe=="beta"?q:V)+(/\d+\+?/.exec(ae)||"")),ie=="Fennec"||ie=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ie="Firefox Mobile";else if(ie=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ee))Ee=="Xbox 360"&&(J=null),Ee=="Xbox 360"&&/\bIEMobile\b/.test(g)&&ge.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ie)||ie&&!Ee&&!/Browser|Mobi/.test(ie))&&(J=="Windows CE"||/Mobi/i.test(g)))ie+=" Mobile";else if(ie=="IE"&&se)try{x.external===null&&ge.unshift("platform preview")}catch(Xe){ge.unshift("embedded")}else(/\bBlackBerry\b/.test(Ee)||/\bBB10\b/.test(g))&&(ae=(RegExp(Ee.replace(/ +/g," *")+"/([.\\d]+)","i").exec(g)||0)[1]||te)?(ae=[ae,/BB10/.test(g)],J=(ae[1]?(Ee=null,ne="BlackBerry"):"Device Software")+" "+ae[0],te=null):this!=a&&Ee!="Wii"&&(se&&ce||/Opera/.test(ie)&&/\b(?:MSIE|Firefox)\b/i.test(g)||ie=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ie=="IE"&&(J&&!/^Win/.test(J)&&te>5.5||/\bWindows XP\b/.test(J)&&te>8||te==8&&!/\bTrident\b/.test(g)))&&!p.test(ae=R.call(a,g.replace(p,"")+";"))&&ae.name&&(ae="ing as "+ae.name+((ae=ae.version)?" "+ae:""),p.test(ie)?(/\bIE\b/.test(ae)&&J=="Mac OS"&&(J=null),ae="identify"+ae):(ae="mask"+ae,he?ie=u(he.replace(/([a-z])([A-Z])/g,"$1 $2")):ie="Opera",/\bIE\b/.test(ae)&&(J=null),se||(te=null)),ee=["Presto"],ge.push(ae));(ae=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(g)||0)[1])&&(ae=[parseFloat(ae.replace(/\.(\d)$/,".0$1")),ae],ie=="Safari"&&ae[1].slice(-1)=="+"?(ie="WebKit Nightly",oe="alpha",te=ae[1].slice(0,-1)):(te==ae[1]||te==(ae[2]=(/\bSafari\/([\d.]+\+?)/i.exec(g)||0)[1]))&&(te=null),ae[1]=(/\bChrome\/([\d.]+)/i.exec(g)||0)[1],ae[0]==537.36&&ae[2]==537.36&&parseFloat(ae[1])>=28&&ee=="WebKit"&&(ee=["Blink"]),!se||!A&&!ae[1]?(ee&&(ee[1]="like Safari"),ae=(ae=ae[0],ae<400?1:ae<500?2:ae<526?3:ae<533?4:ae<534?"4+":ae<535?5:ae<537?6:ae<538?7:ae<601?8:"8")):(ee&&(ee[1]="like Chrome"),ae=ae[1]||(ae=ae[0],ae<530?1:ae<532?2:ae<532.05?3:ae<533?4:ae<534.03?5:ae<534.07?6:ae<534.1?7:ae<534.13?8:ae<534.16?9:ae<534.24?10:ae<534.3?11:ae<535.01?12:ae<535.02?"13+":ae<535.07?15:ae<535.11?16:ae<535.19?17:ae<536.05?18:ae<536.1?19:ae<537.01?20:ae<537.11?"21+":ae<537.13?23:ae<537.18?24:ae<537.24?25:ae<537.36?26:ee!="Blink"?"27":"28")),ee&&(ee[1]+=" "+(ae+=typeof ae=="number"?".x":/[.+]/.test(ae)?"":"+")),ie=="Safari"&&(!te||parseInt(te)>45)&&(te=ae)),ie=="Opera"&&(ae=/\bzbov|zvav$/.exec(J))?(ie+=" ",ge.unshift("desktop mode"),ae=="zvav"?(ie+="Mini",te=null):ie+="Mobile",J=J.replace(RegExp(" *"+ae+"$"),"")):ie=="Safari"&&/\bChrome\b/.exec(ee&&ee[1])&&(ge.unshift("desktop mode"),ie="Chrome Mobile",te=null,/\bOS X\b/.test(J)?(ne="Apple",J="iOS 4.3+"):J=null),te&&te.indexOf(ae=/[\d.]+$/.exec(J))==0&&g.indexOf("/"+ae+"-")>-1&&(J=h(J.replace(ae,""))),ee&&!/\b(?:Avant|Nook)\b/.test(ie)&&(/Browser|Lunascape|Maxthon/.test(ie)||ie!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ie)&&ee[1])&&((ae=ee[ee.length-1])&&ge.push(ae)),ge.length&&(ge=["("+ge.join("; ")+")"]),ne&&Ee&&Ee.indexOf(ne)<0&&ge.push("on "+ne),Ee&&ge.push((/^on /.test(ge[ge.length-1])?"":"on ")+Ee),J&&(ae=/ ([\d.+]+)$/.exec(J),be=ae&&J.charAt(J.length-ae[0].length-1)=="/",J={architecture:32,family:ae&&!be?J.replace(ae[0],""):J,version:ae?ae[1]:null,toString:function(){var Xe=this.version;return this.family+(Xe&&!be?" "+Xe:"")+(this.architecture==64?" 64-bit":"")}}),(ae=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(xe))&&!/\bi686\b/i.test(xe)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+ae),"")),ie&&(/\bWOW64\b/i.test(g)||se&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(g))&&ge.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ie=="Chrome"&&parseFloat(te)>=39&&(J.architecture=64),g||(g=null);var qe={};return qe.description=g,qe.layout=ee&&ee[0],qe.manufacturer=ne,qe.name=ie,qe.prerelease=oe,qe.product=Ee,qe.ua=g,qe.version=ie&&te,qe.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},qe.parse=R,qe.toString=Je,qe.version&&ge.unshift(te),qe.name&&ge.unshift(ie),J&&ie&&!(J==String(J).split(" ")[0]&&(J==ie.split(" ")[0]||Ee))&&ge.push(Ee?"("+J+")":"on "+J),ge.length&&(qe.description=ge.join(" ")),qe}var C=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=C,define(function(){return C})):y&&m?a(C,function(g,x){y[x]=g}):O.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(F,$,j){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?$.exports={nextTick:v}:$.exports=N;function v(O,M,y,m){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,b,p;switch(S){case 0:case 1:return N.nextTick(O);case 2:return N.nextTick(function(){O.call(null,M)});case 3:return N.nextTick(function(){O.call(null,M,y)});case 4:return N.nextTick(function(){O.call(null,M,y,m)});default:for(b=new Array(S-1),p=0;p1)for(var a=1;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=b-p,w=Math.floor,_=String.fromCharCode,h;function R(z){throw new RangeError(c[z])}function C(z,U){for(var P=z.length,H=[];P--;)H[P]=U(z[P]);return H}function g(z,U){var P=z.split("@"),H="";P.length>1&&(H=P[0]+"@",z=P[1]),z=z.replace(a,".");var V=z.split("."),q=C(V,U).join(".");return H+q}function x(z){for(var U=[],P=0,H=z.length,V,q;P=55296&&V<=56319&&P65535&&(U-=65536,P+=_(U>>>10&1023|55296),U=56320|U&1023),P+=_(U),P}).join("")}function T(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:b}function k(z,U){return z+22+75*(z<26)-((U!=0)<<5)}function L(z,U,P){var H=0;for(z=P?w(z/l):z>>1,z+=w(z/U);z>f*d>>1;H+=b)z=w(z/f);return w(H+(f+1)*z/(z+t))}function A(z){var U=[],P=z.length,H,V=0,q=i,Z=r,ce,he,ae,xe,ge,oe,se,te,be;for(ce=z.lastIndexOf(o),ce<0&&(ce=0),he=0;he=128&&R("not-basic"),U.push(z.charCodeAt(he));for(ae=ce>0?ce+1:0;ae=P&&R("invalid-input"),se=T(z.charCodeAt(ae++)),(se>=b||se>w((S-V)/ge))&&R("overflow"),V+=se*ge,te=oe<=Z?p:oe>=Z+d?d:oe-Z,sew(S/be)&&R("overflow"),ge*=be;H=U.length+1,Z=L(V-xe,H,xe==0),w(V/H)>S-q&&R("overflow"),q+=w(V/H),V%=H,U.splice(V++,0,q)}return E(U)}function G(z){var U,P,H,V,q,Z,ce,he,ae,xe,ge,oe=[],se,te,be,ee;for(z=x(z),se=z.length,U=i,P=0,q=r,Z=0;Z=U&&gew((S-P)/te)&&R("overflow"),P+=(ce-U)*te,U=ce,Z=0;ZS&&R("overflow"),ge==U){for(he=P,ae=b;!(xe=ae<=q?p:ae>=q+d?d:ae-q,he0&&d>p&&(d=p);for(var t=0;t=0?(i=l.substr(0,r),o=l.substr(r+1)):(i=l,o=""),s=decodeURIComponent(i),u=decodeURIComponent(o),N(S,s)?v(S[s])?S[s].push(u):S[s]=[S[s],u]:S[s]=u}return S};var v=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(F,$,j){"use strict";var N=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};$.exports=function(y,m,S,b){return m=m||"&",S=S||"=",y===null&&(y=void 0),typeof y=="object"?O(M(y),function(p){var d=encodeURIComponent(N(p))+S;return v(y[p])?O(y[p],function(t){return d+encodeURIComponent(N(t))}).join(m):d+encodeURIComponent(N(y[p]))}).join(m):b?encodeURIComponent(N(b))+S+encodeURIComponent(N(y)):""};var v=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"};function O(y,m){if(y.map)return y.map(m);for(var S=[],b=0;b0?(typeof ie!="string"&&!X.objectMode&&(0,M.default)(ie)!==i.prototype&&(ie=s(ie)),ne?X.endEmitted?ee.emit("error",new Error("stream.unshift() after end event")):T(ee,X,ie,!0):X.ended?ee.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ee?(ie=X.decoder.write(ie),X.objectMode||ie.length!==0?T(ee,X,ie,!1):P(ee,X)):T(ee,X,ie,!1))):ne||(X.reading=!1)}return L(X)}function T(ee,ie,Ee,ne){ie.flowing&&ie.length===0&&!ie.sync?(ee.emit("data",Ee),ee.read(0)):(ie.length+=ie.objectMode?1:Ee.length,ne?ie.buffer.unshift(Ee):ie.buffer.push(Ee),ie.needReadable&&z(ee)),P(ee,ie)}function k(ee,ie){var Ee;return!u(ie)&&typeof ie!="string"&&ie!==void 0&&!ee.objectMode&&(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee}function L(ee){return!ee.ended&&(ee.needReadable||ee.length=A?ee=A:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function K(ee,ie){return ee<=0||ie.length===0&&ie.ended?0:ie.objectMode?1:ee!==ee?ie.flowing&&ie.length?ie.buffer.head.data.length:ie.length:(ee>ie.highWaterMark&&(ie.highWaterMark=G(ee)),ee<=ie.length?ee:ie.ended?ie.length:(ie.needReadable=!0,0))}x.prototype.read=function(ee){f("read",ee),ee=parseInt(ee,10);var ie=this._readableState,Ee=ee;if(ee!==0&&(ie.emittedReadable=!1),ee===0&&ie.needReadable&&(ie.length>=ie.highWaterMark||ie.ended))return f("read: emitReadable",ie.length,ie.ended),ie.length===0&&ie.ended?se(this):z(this),null;if(ee=K(ee,ie),ee===0&&ie.ended)return ie.length===0&&se(this),null;var ne=ie.needReadable;f("need readable",ne),(ie.length===0||ie.length-ee0?J=ae(ee,ie):J=null,J===null?(ie.needReadable=!0,ee=0):ie.length-=ee,ie.length===0&&(ie.ended||(ie.needReadable=!0),Ee!==ee&&ie.ended&&se(this)),J!==null&&this.emit("data",J),J};function W(ee,ie){if(ie.ended)return;if(ie.decoder){var Ee=ie.decoder.end();Ee&&Ee.length&&(ie.buffer.push(Ee),ie.length+=ie.objectMode?1:Ee.length)}ie.ended=!0,z(ee)}function z(ee){var ie=ee._readableState;ie.needReadable=!1,ie.emittedReadable||(f("emitReadable",ie.flowing),ie.emittedReadable=!0,ie.sync?b.nextTick(U,ee):U(ee))}function U(ee){f("emit readable"),ee.emit("readable"),he(ee)}function P(ee,ie){ie.readingMore||(ie.readingMore=!0,b.nextTick(H,ee,ie))}function H(ee,ie){for(var Ee=ie.length;!ie.reading&&!ie.flowing&&!ie.ended&&ie.length1&&be(ne.pipes,ee)!==-1)&&!Te&&(f("false write response, pause",Ee._readableState.awaitDrain),Ee._readableState.awaitDrain++,Je=!0),Ee.pause())}function Xe(Oe){f("onerror",Oe),Le(),ee.removeListener("error",Xe),l(ee,"error")===0&&ee.emit("error",Oe)}C(ee,"error",Xe);function et(){ee.removeListener("finish",rt),Le()}ee.once("close",et);function rt(){f("onfinish"),ee.removeListener("close",et),Le()}ee.once("finish",rt);function Le(){f("unpipe"),Ee.unpipe(ee)}return ee.emit("pipe",Ee),ne.flowing||(f("pipe resume"),Ee.resume()),ee};function V(ee){return function(){var ie=ee._readableState;f("pipeOnDrain",ie.awaitDrain),ie.awaitDrain&&ie.awaitDrain--,ie.awaitDrain===0&&l(ee,"data")&&(ie.flowing=!0,he(ee))}}x.prototype.unpipe=function(ee){var ie=this._readableState,Ee={hasUnpiped:!1};if(ie.pipesCount===0)return this;if(ie.pipesCount===1)return ee&&ee!==ie.pipes?this:(ee||(ee=ie.pipes),ie.pipes=null,ie.pipesCount=0,ie.flowing=!1,ee&&ee.emit("unpipe",this,Ee),this);if(!ee){var ne=ie.pipes,J=ie.pipesCount;ie.pipes=null,ie.pipesCount=0,ie.flowing=!1;for(var X=0;X=ie.length?(ie.decoder?Ee=ie.buffer.join(""):ie.buffer.length===1?Ee=ie.buffer.head.data:Ee=ie.buffer.concat(ie.length),ie.buffer.clear()):Ee=xe(ee,ie.buffer,ie.decoder),Ee}function xe(ee,ie,Ee){var ne;return eeX.length?X.length:ee;if(Q===X.length?J+=X:J+=X.slice(0,ee),ee-=Q,ee===0){Q===X.length?(++ne,Ee.next?ie.head=Ee.next:ie.head=ie.tail=null):(ie.head=Ee,Ee.data=X.slice(Q));break}++ne}return ie.length-=ne,J}function oe(ee,ie){var Ee=i.allocUnsafe(ee),ne=ie.head,J=1;for(ne.data.copy(Ee),ee-=ne.data.length;ne=ne.next;){var X=ne.data,Q=ee>X.length?X.length:ee;if(X.copy(Ee,Ee.length-ee,0,Q),ee-=Q,ee===0){Q===X.length?(++J,ne.next?ie.head=ne.next:ie.head=ie.tail=null):(ie.head=ne,ne.data=X.slice(Q));break}++J}return ie.length-=J,Ee}function se(ee){var ie=ee._readableState;if(ie.length>0)throw new Error('"endReadable()" called on non-empty stream');ie.endEmitted||(ie.ended=!0,b.nextTick(te,ie,ee))}function te(ee,ie){!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,ie.readable=!1,ie.emit("end"))}function be(ee,ie){for(var Ee=0,ne=ee.length;Ee-1?l.default:i.nextTick,a;k.WritableState=E;var c=(0,d.default)(F("core-util-is"));c.inherits=F("inherits");var f={deprecate:F("util-deprecate")},w=F("./internal/streams/stream"),_=F("safe-buffer").Buffer,h=v.Uint8Array||function(){};function R(oe){return _.from(oe)}function C(oe){return _.isBuffer(oe)||oe instanceof h}var g=F("./internal/streams/destroy");c.inherits(k,w);function x(){}function E(oe,se){a=a||F("./_stream_duplex"),oe=oe||{};var te=se instanceof a;this.objectMode=!!oe.objectMode,te&&(this.objectMode=this.objectMode||!!oe.writableObjectMode);var be=oe.highWaterMark,ee=oe.writableHighWaterMark,ie=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:te&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=ie,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ee=oe.decodeStrings===!1;this.decodeStrings=!Ee,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){P(se,ne)},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 s(this)}E.prototype.getBuffer=function(){for(var se=this.bufferedRequest,te=[];se;)te.push(se),se=se.next;return te},function(){try{Object.defineProperty(E.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(oe){}}();var T;typeof b.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,M.default)(k,m.default,{value:function(se){return T.call(this,se)?!0:this!==k?!1:se&&se._writableState instanceof E}})):T=function(se){return se instanceof this};function k(oe){if(a=a||F("./_stream_duplex"),!T.call(k,this)&&!(this instanceof a))return new k(oe);this._writableState=new E(oe,this),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),w.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function L(oe,se){var te=new Error("write after end");oe.emit("error",te),i.nextTick(se,te)}function A(oe,se,te,be){var ee=!0,ie=!1;return te===null?ie=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!se.objectMode&&(ie=new TypeError("Invalid non-string/buffer chunk")),ie&&(oe.emit("error",ie),i.nextTick(be,ie),ee=!1),ee}k.prototype.write=function(oe,se,te){var be=this._writableState,ee=!1,ie=!be.objectMode&&C(oe);return ie&&!_.isBuffer(oe)&&(oe=R(oe)),typeof se=="function"&&(te=se,se=null),ie?se="buffer":se||(se=be.defaultEncoding),typeof te!="function"&&(te=x),be.ended?L(this,te):(ie||A(this,be,oe,te))&&(be.pendingcb++,ee=K(this,be,ie,oe,se,te)),ee},k.prototype.cork=function(){var oe=this._writableState;oe.corked++},k.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.finished&&!oe.bufferProcessing&&oe.bufferedRequest&&q(this,oe))},k.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function G(oe,se,te){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof se=="string"&&(se=_.from(se,te)),se}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(oe,se,te,be,ee,ie){if(!te){var Ee=G(se,be,ee);be!==Ee&&(te=!0,ee="buffer",be=Ee)}var ne=se.objectMode?1:be.length;se.length+=ne;var J=se.length0?this.tail.next=b:this.head=b,this.tail=b,++this.length},y.prototype.unshift=function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},y.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(S){if(this.length===0)return"";for(var b=this.head,p=""+b.data;b=b.next;)p+=S+b.data;return p},y.prototype.concat=function(S){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var b=v.allocUnsafe(S>>>0),p=this.head,d=0;p;)M(p.data,b,d),d+=p.data.length,p=p.next;return b},y}(),O&&O.inspect&&O.inspect.custom&&($.exports.prototype[O.inspect.custom]=function(){var y=O.inspect({length:this.length});return this.constructor.name+" "+y})},{"safe-buffer":228,util:71}],220:[function(F,$,j){"use strict";var N=F("process-nextick-args");function v(y,m){var S=this,b=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return b||p?(m?m(y):y&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(M,this,y),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(y||null,function(d){!m&&d?(N.nextTick(M,S,d),S._writableState&&(S._writableState.errorEmitted=!0)):m&&m(d)}),this)}function O(){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 M(y,m){y.emit("error",m)}$.exports={destroy:v,undestroy:O}},{"process-nextick-args":207}],221:[function(F,$,j){"use strict";$.exports=F("events").EventEmitter},{events:192}],222:[function(F,$,j){$.exports=F("./readable").PassThrough},{"./readable":223}],223:[function(F,$,j){j=$.exports=F("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=F("./lib/_stream_writable.js"),j.Duplex=F("./lib/_stream_duplex.js"),j.Transform=F("./lib/_stream_transform.js"),j.PassThrough=F("./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(F,$,j){$.exports=F("./readable").Transform},{"./readable":223}],225:[function(F,$,j){$.exports=F("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(F,$,j){var N=function(){return this}()||Function("return this")(),v=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,O=v&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,$.exports=F("./runtime"),v)N.regeneratorRuntime=O;else try{delete N.regeneratorRuntime}catch(M){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(F,$,j){!function(N){"use strict";var v=Object.prototype,O=v.hasOwnProperty,M,y=typeof Symbol=="function"?Symbol:{},m=y.iterator||"@@iterator",S=y.asyncIterator||"@@asyncIterator",b=y.toStringTag||"@@toStringTag",p=typeof $=="object",d=N.regeneratorRuntime;if(d){p&&($.exports=d);return}d=N.regeneratorRuntime=p?$.exports:{};function t(K,W,z,U){var P=W&&W.prototype instanceof a?W:a,H=Object.create(P.prototype),V=new L(U||[]);return H._invoke=x(K,z,V),H}d.wrap=t;function l(K,W,z){try{return{type:"normal",arg:K.call(W,z)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",o="executing",s="completed",u={};function a(){}function c(){}function f(){}var w={};w[m]=function(){return this};var _=Object.getPrototypeOf,h=_&&_(_(A([])));h&&h!==v&&O.call(h,m)&&(w=h);var R=f.prototype=a.prototype=Object.create(w);c.prototype=R.constructor=f,f.constructor=c,f[b]=c.displayName="GeneratorFunction";function C(K){["next","throw","return"].forEach(function(W){K[W]=function(z){return this._invoke(W,z)}})}d.isGeneratorFunction=function(K){var W=typeof K=="function"&&K.constructor;return W?W===c||(W.displayName||W.name)==="GeneratorFunction":!1},d.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,f):(K.__proto__=f,b in K||(K[b]="GeneratorFunction")),K.prototype=Object.create(R),K},d.awrap=function(K){return{__await:K}};function g(K){function W(P,H,V,q){var Z=l(K[P],K,H);if(Z.type==="throw")q(Z.arg);else{var ce=Z.arg,he=ce.value;return he&&typeof he=="object"&&O.call(he,"__await")?Promise.resolve(he.__await).then(function(ae){W("next",ae,V,q)},function(ae){W("throw",ae,V,q)}):Promise.resolve(he).then(function(ae){ce.value=ae,V(ce)},q)}}var z;function U(P,H){function V(){return new Promise(function(q,Z){W(P,H,q,Z)})}return z=z?z.then(V,V):V()}this._invoke=U}C(g.prototype),g.prototype[S]=function(){return this},d.AsyncIterator=g,d.async=function(K,W,z,U){var P=new g(t(K,W,z,U));return d.isGeneratorFunction(W)?P:P.next().then(function(H){return H.done?H.value:P.next()})};function x(K,W,z){var U=r;return function(H,V){if(U===o)throw new Error("Generator is already running");if(U===s){if(H==="throw")throw V;return G()}for(z.method=H,z.arg=V;;){var q=z.delegate;if(q){var Z=E(q,z);if(Z){if(Z===u)continue;return Z}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(U===r)throw U=s,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);U=o;var ce=l(K,W,z);if(ce.type==="normal"){if(U=z.done?s:i,ce.arg===u)continue;return{value:ce.arg,done:z.done}}else ce.type==="throw"&&(U=s,z.method="throw",z.arg=ce.arg)}}}function E(K,W){var z=K.iterator[W.method];if(z===M){if(W.delegate=null,W.method==="throw"){if(K.iterator.return&&(W.method="return",W.arg=M,E(K,W),W.method==="throw"))return u;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var U=l(z,K.iterator,W.arg);if(U.type==="throw")return W.method="throw",W.arg=U.arg,W.delegate=null,u;var P=U.arg;if(!P)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,u;if(P.done)W[K.resultName]=P.value,W.next=K.nextLoc,W.method!=="return"&&(W.method="next",W.arg=M);else return P;return W.delegate=null,u}C(R),R[b]="Generator",R[m]=function(){return this},R.toString=function(){return"[object Generator]"};function T(K){var W={tryLoc:K[0]};1 in K&&(W.catchLoc=K[1]),2 in K&&(W.finallyLoc=K[2],W.afterLoc=K[3]),this.tryEntries.push(W)}function k(K){var W=K.completion||{};W.type="normal",delete W.arg,K.completion=W}function L(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(T,this),this.reset(!0)}d.keys=function(K){var W=[];for(var z in K)W.push(z);return W.reverse(),function U(){for(;W.length;){var P=W.pop();if(P in K)return U.value=P,U.done=!1,U}return U.done=!0,U}};function A(K){if(K){var W=K[m];if(W)return W.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var z=-1,U=function P(){for(;++z=0;--U){var P=this.tryEntries[U],H=P.completion;if(P.tryLoc==="root")return z("end");if(P.tryLoc<=this.prev){var V=O.call(P,"catchLoc"),q=O.call(P,"finallyLoc");if(V&&q){if(this.prev=0;--z){var U=this.tryEntries[z];if(U.tryLoc<=this.prev&&O.call(U,"finallyLoc")&&this.prev=0;--W){var z=this.tryEntries[W];if(z.finallyLoc===K)return this.complete(z.completion,z.afterLoc),k(z),u}},catch:function(K){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.tryLoc===K){var U=z.completion;if(U.type==="throw"){var P=U.arg;k(z)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(K,W,z){return this.delegate={iterator:A(K),resultName:W,nextLoc:z},this.method==="next"&&(this.arg=M),u}}}(function(){return this}()||Function("return this")())},{}],228:[function(F,$,j){var N=F("buffer"),v=N.Buffer;function O(y,m){for(var S in y)m[S]=y[S]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?$.exports=N:(O(N,j),j.Buffer=M);function M(y,m,S){return v(y,m,S)}O(v,M),M.from=function(y,m,S){if(typeof y=="number")throw new TypeError("Argument must not be a number");return v(y,m,S)},M.alloc=function(y,m,S){if(typeof y!="number")throw new TypeError("Argument must be a number");var b=v(y);return m!==void 0?typeof S=="string"?b.fill(m,S):b.fill(m):b.fill(0),b},M.allocUnsafe=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return v(y)},M.allocUnsafeSlow=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(y)}},{buffer:73}],229:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/string/from-code-point"),O=i(v),M=F("babel-runtime/core-js/json/stringify"),y=i(M),m=F("babel-runtime/helpers/typeof"),S=i(m),b=F("babel-runtime/core-js/object/define-property"),p=i(b),d=F("babel-runtime/core-js/object/keys"),t=i(d),l=F("babel-runtime/core-js/object/create"),r=i(l);function i(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(X,Q){return new u(X,Q)},o.SAXParser=u,o.SAXStream=R,o.createStream=h,o.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function u(X,Q){if(!(this instanceof u))return new u(X,Q);var me=this;c(me),me.q=me.c="",me.bufferCheckPosition=o.MAX_BUFFER_LENGTH,me.opt=Q||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!X,me.noscript=!!(X||me.opt.noscript),me.state=H.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,r.default)(T)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),q(me,"onready")}r.default||(Object.create=function(X){function Q(){}Q.prototype=X;var me=new Q;return me}),t.default||(Object.keys=function(X){var Q=[];for(var me in X)X.hasOwnProperty(me)&&Q.push(me);return Q});function a(X){for(var Q=Math.max(o.MAX_BUFFER_LENGTH,10),me=0,fe=0,Te=s.length;feQ)switch(s[fe]){case"textNode":ce(X);break;case"cdata":Z(X,"oncdata",X.cdata),X.cdata="";break;case"script":Z(X,"onscript",X.script),X.script="";break;default:ae(X,"Max buffer length exceeded: "+s[fe])}me=Math.max(me,ze)}var Je=o.MAX_BUFFER_LENGTH-me;X.bufferCheckPosition=Je+X.position}function c(X){for(var Q=0,me=s.length;Q"||K(X)}function U(X,Q){return X.test(Q)}function P(X,Q){return!U(X,Q)}var H=0;o.STATE={BEGIN:H++,BEGIN_WHITESPACE:H++,TEXT:H++,TEXT_ENTITY:H++,OPEN_WAKA:H++,SGML_DECL:H++,SGML_DECL_QUOTED:H++,DOCTYPE:H++,DOCTYPE_QUOTED:H++,DOCTYPE_DTD:H++,DOCTYPE_DTD_QUOTED:H++,COMMENT_STARTING:H++,COMMENT:H++,COMMENT_ENDING:H++,COMMENT_ENDED:H++,CDATA:H++,CDATA_ENDING:H++,CDATA_ENDING_2:H++,PROC_INST:H++,PROC_INST_BODY:H++,PROC_INST_ENDING:H++,OPEN_TAG:H++,OPEN_TAG_SLASH:H++,ATTRIB:H++,ATTRIB_NAME:H++,ATTRIB_NAME_SAW_WHITE:H++,ATTRIB_VALUE:H++,ATTRIB_VALUE_QUOTED:H++,ATTRIB_VALUE_CLOSED:H++,ATTRIB_VALUE_UNQUOTED:H++,ATTRIB_VALUE_ENTITY_Q:H++,ATTRIB_VALUE_ENTITY_U:H++,CLOSE_TAG:H++,CLOSE_TAG_SAW_WHITE:H++,SCRIPT:H++,SCRIPT_ENDING:H++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.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,t.default)(o.ENTITIES).forEach(function(X){var Q=o.ENTITIES[X],me=typeof Q=="number"?String.fromCharCode(Q):Q;o.ENTITIES[X]=me});for(var V in o.STATE)o.STATE[o.STATE[V]]=V;H=o.STATE;function q(X,Q,me){X[Q]&&X[Q](me)}function Z(X,Q,me){X.textNode&&ce(X),q(X,Q,me)}function ce(X){X.textNode=he(X.opt,X.textNode),X.textNode&&q(X,"ontext",X.textNode),X.textNode=""}function he(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function ae(X,Q){return ce(X),X.trackPosition&&(Q+=` Line: `+X.line+` Column: `+X.column+` Char: `+X.c),Q=new Error(Q),X.error=Q,q(X,"onerror",Q),X}function xe(X){return X.sawRoot&&!X.closedRoot&&ge(X,"Unclosed root tag"),X.state!==H.BEGIN&&X.state!==H.BEGIN_WHITESPACE&&X.state!==H.TEXT&&ae(X,"Unexpected end"),ce(X),X.c="",X.closed=!0,q(X,"onend"),u.call(X,X.strict,X.opt),X}function ge(X,Q){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof u))throw new Error("bad call to strictFail");X.strict&&ae(X,Q)}function oe(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,me=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(me.ns=Q.ns),X.attribList.length=0,Z(X,"onopentagstart",me)}function se(X,Q){var me=X.indexOf(":"),fe=me<0?["",X]:X.split(":"),Te=fe[0],ze=fe[1];return Q&&X==="xmlns"&&(Te="xmlns",ze=""),{prefix:Te,local:ze}}function te(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Q=se(X.attribName,!0),me=Q.prefix,fe=Q.local;if(me==="xmlns")if(fe==="xml"&&X.attribValue!==x)ge(X,"xml: prefix must be bound to "+x+` Actual: `+X.attribValue);else if(fe==="xmlns"&&X.attribValue!==E)ge(X,"xmlns: prefix must be bound to "+E+` Actual: `+X.attribValue);else{var Te=X.tag,ze=X.tags[X.tags.length-1]||X;Te.ns===ze.ns&&(Te.ns=(0,r.default)(ze.ns)),Te.ns[fe]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,Z(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Q){if(X.opt.xmlns){var me=X.tag,fe=se(X.tagName);me.prefix=fe.prefix,me.local=fe.local,me.uri=me.ns[fe.prefix]||"",me.prefix&&!me.uri&&(ge(X,"Unbound namespace prefix: "+(0,y.default)(X.tagName)),me.uri=fe.prefix);var Te=X.tags[X.tags.length-1]||X;me.ns&&Te.ns!==me.ns&&(0,t.default)(me.ns).forEach(function(Ne){Z(X,"onopennamespace",{prefix:Ne,uri:me.ns[Ne]})});for(var ze=0,Je=X.attribList.length;ze",X.tagName="",X.state=H.SCRIPT;return}Z(X,"onscript",X.script),X.script=""}var Q=X.tags.length,me=X.tagName;X.strict||(me=me[X.looseCase]());for(var fe=me;Q--;){var Te=X.tags[Q];if(Te.name!==fe)ge(X,"Unexpected close tag");else break}if(Q<0){ge(X,"Unmatched closing tag: "+X.tagName),X.textNode+="",X.state=H.TEXT;return}X.tagName=me;for(var ze=X.tags.length;ze-- >Q;){var Je=X.tag=X.tags.pop();X.tagName=X.tag.name,Z(X,"onclosetag",X.tagName);var qe={};for(var Xe in Je.ns)qe[Xe]=Je.ns[Xe];var et=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Je.ns!==et.ns&&(0,t.default)(Je.ns).forEach(function(rt){var Le=Je.ns[rt];Z(X,"onclosenamespace",{prefix:rt,uri:Le})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=H.TEXT}function ie(X){var Q=X.entity,me=Q.toLowerCase(),fe,Te="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[me]?X.ENTITIES[me]:(Q=me,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),fe=parseInt(Q,16),Te=fe.toString(16)):(Q=Q.slice(1),fe=parseInt(Q,10),Te=fe.toString(10))),Q=Q.replace(/^0+/,""),isNaN(fe)||Te.toLowerCase()!==Q?(ge(X,"Invalid character entity"),"&"+X.entity+";"):(0,O.default)(fe))}function Ee(X,Q){Q==="<"?(X.state=H.OPEN_WAKA,X.startTagPosition=X.position):K(Q)||(ge(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=H.TEXT)}function ne(X,Q){var me="";return Q"?(Z(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=H.TEXT):(W(fe)&&(Q.state=H.SGML_DECL_QUOTED),Q.sgmlDecl+=fe);continue;case H.SGML_DECL_QUOTED:fe===Q.q&&(Q.state=H.SGML_DECL,Q.q=""),Q.sgmlDecl+=fe;continue;case H.DOCTYPE:fe===">"?(Q.state=H.TEXT,Z(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=fe,fe==="["?Q.state=H.DOCTYPE_DTD:W(fe)&&(Q.state=H.DOCTYPE_QUOTED,Q.q=fe));continue;case H.DOCTYPE_QUOTED:Q.doctype+=fe,fe===Q.q&&(Q.q="",Q.state=H.DOCTYPE);continue;case H.DOCTYPE_DTD:Q.doctype+=fe,fe==="]"?Q.state=H.DOCTYPE:W(fe)&&(Q.state=H.DOCTYPE_DTD_QUOTED,Q.q=fe);continue;case H.DOCTYPE_DTD_QUOTED:Q.doctype+=fe,fe===Q.q&&(Q.state=H.DOCTYPE_DTD,Q.q="");continue;case H.COMMENT:fe==="-"?Q.state=H.COMMENT_ENDING:Q.comment+=fe;continue;case H.COMMENT_ENDING:fe==="-"?(Q.state=H.COMMENT_ENDED,Q.comment=he(Q.opt,Q.comment),Q.comment&&Z(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+fe,Q.state=H.COMMENT);continue;case H.COMMENT_ENDED:fe!==">"?(ge(Q,"Malformed comment"),Q.comment+="--"+fe,Q.state=H.COMMENT):Q.state=H.TEXT;continue;case H.CDATA:fe==="]"?Q.state=H.CDATA_ENDING:Q.cdata+=fe;continue;case H.CDATA_ENDING:fe==="]"?Q.state=H.CDATA_ENDING_2:(Q.cdata+="]"+fe,Q.state=H.CDATA);continue;case H.CDATA_ENDING_2:fe===">"?(Q.cdata&&Z(Q,"oncdata",Q.cdata),Z(Q,"onclosecdata"),Q.cdata="",Q.state=H.TEXT):fe==="]"?Q.cdata+="]":(Q.cdata+="]]"+fe,Q.state=H.CDATA);continue;case H.PROC_INST:fe==="?"?Q.state=H.PROC_INST_ENDING:K(fe)?Q.state=H.PROC_INST_BODY:Q.procInstName+=fe;continue;case H.PROC_INST_BODY:if(!Q.procInstBody&&K(fe))continue;fe==="?"?Q.state=H.PROC_INST_ENDING:Q.procInstBody+=fe;continue;case H.PROC_INST_ENDING:fe===">"?(Z(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=H.TEXT):(Q.procInstBody+="?"+fe,Q.state=H.PROC_INST_BODY);continue;case H.OPEN_TAG:U(L,fe)?Q.tagName+=fe:(oe(Q),fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:(K(fe)||ge(Q,"Invalid character in tag name"),Q.state=H.ATTRIB));continue;case H.OPEN_TAG_SLASH:fe===">"?(be(Q,!0),ee(Q)):(ge(Q,"Forward-slash in opening tag not followed by >"),Q.state=H.ATTRIB);continue;case H.ATTRIB:if(K(fe))continue;fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:U(k,fe)?(Q.attribName=fe,Q.attribValue="",Q.state=H.ATTRIB_NAME):ge(Q,"Invalid attribute name");continue;case H.ATTRIB_NAME:fe==="="?Q.state=H.ATTRIB_VALUE:fe===">"?(ge(Q,"Attribute without value"),Q.attribValue=Q.attribName,te(Q),be(Q)):K(fe)?Q.state=H.ATTRIB_NAME_SAW_WHITE:U(L,fe)?Q.attribName+=fe:ge(Q,"Invalid attribute name");continue;case H.ATTRIB_NAME_SAW_WHITE:if(fe==="=")Q.state=H.ATTRIB_VALUE;else{if(K(fe))continue;ge(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",Z(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",fe===">"?be(Q):U(k,fe)?(Q.attribName=fe,Q.state=H.ATTRIB_NAME):(ge(Q,"Invalid attribute name"),Q.state=H.ATTRIB)}continue;case H.ATTRIB_VALUE:if(K(fe))continue;W(fe)?(Q.q=fe,Q.state=H.ATTRIB_VALUE_QUOTED):(ge(Q,"Unquoted attribute value"),Q.state=H.ATTRIB_VALUE_UNQUOTED,Q.attribValue=fe);continue;case H.ATTRIB_VALUE_QUOTED:if(fe!==Q.q){fe==="&"?Q.state=H.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=fe;continue}te(Q),Q.q="",Q.state=H.ATTRIB_VALUE_CLOSED;continue;case H.ATTRIB_VALUE_CLOSED:K(fe)?Q.state=H.ATTRIB:fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:U(k,fe)?(ge(Q,"No whitespace between attributes"),Q.attribName=fe,Q.attribValue="",Q.state=H.ATTRIB_NAME):ge(Q,"Invalid attribute name");continue;case H.ATTRIB_VALUE_UNQUOTED:if(!z(fe)){fe==="&"?Q.state=H.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=fe;continue}te(Q),fe===">"?be(Q):Q.state=H.ATTRIB;continue;case H.CLOSE_TAG:if(Q.tagName)fe===">"?ee(Q):U(L,fe)?Q.tagName+=fe:Q.script?(Q.script+=""?ee(Q):ge(Q,"Invalid characters in closing tag");continue;case H.TEXT_ENTITY:case H.ATTRIB_VALUE_ENTITY_Q:case H.ATTRIB_VALUE_ENTITY_U:var Je,qe;switch(Q.state){case H.TEXT_ENTITY:Je=H.TEXT,qe="textNode";break;case H.ATTRIB_VALUE_ENTITY_Q:Je=H.ATTRIB_VALUE_QUOTED,qe="attribValue";break;case H.ATTRIB_VALUE_ENTITY_U:Je=H.ATTRIB_VALUE_UNQUOTED,qe="attribValue";break}fe===";"?(Q[qe]+=ie(Q),Q.entity="",Q.state=Je):U(Q.entity.length?G:A,fe)?Q.entity+=fe:(ge(Q,"Invalid character in entity name"),Q[qe]+="&"+Q.entity+fe,Q.entity="",Q.state=Je);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&a(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var X=String.fromCharCode,Q=Math.floor,me=function(){var Te=16384,ze=[],Je,qe,Xe=-1,et=arguments.length;if(!et)return"";for(var rt="";++Xe1114111||Q(Le)!==Le)throw RangeError("Invalid code point: "+Le);Le<=65535?ze.push(Le):(Le-=65536,Je=(Le>>10)+55296,qe=Le%1024+56320,ze.push(Je,qe)),(Xe+1===et||ze.length>Te)&&(rt+=X.apply(null,ze),ze.length=0)}return rt};p.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()})(typeof j=="undefined"?(void 0).sax={}:j)}).call(this,F("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(F,$,j){$.exports=O;var N=F("events").EventEmitter,v=F("inherits");v(O,N),O.Readable=F("readable-stream/readable.js"),O.Writable=F("readable-stream/writable.js"),O.Duplex=F("readable-stream/duplex.js"),O.Transform=F("readable-stream/transform.js"),O.PassThrough=F("readable-stream/passthrough.js"),O.Stream=O;function O(){N.call(this)}O.prototype.pipe=function(M,y){var m=this;function S(i){M.writable&&(M.write(i)===!1&&m.pause&&m.pause())}m.on("data",S);function b(){m.readable&&m.resume&&m.resume()}M.on("drain",b),!M._isStdio&&(!y||y.end!==!1)&&(m.on("end",d),m.on("close",t));var p=!1;function d(){if(p)return;p=!0,M.end()}function t(){if(p)return;p=!0,typeof M.destroy=="function"&&M.destroy()}function l(i){if(r(),N.listenerCount(this,"error")===0)throw i}m.on("error",l),M.on("error",l);function r(){m.removeListener("data",S),M.removeListener("drain",b),m.removeListener("end",d),m.removeListener("close",t),m.removeListener("error",l),M.removeListener("error",l),m.removeListener("end",r),m.removeListener("close",r),M.removeListener("close",r)}return m.on("end",r),m.on("close",r),M.on("close",r),M.emit("pipe",m),M}},{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(F,$,j){(function(N){var v=F("./lib/request"),O=F("./lib/response"),M=F("xtend"),y=F("builtin-status-codes"),m=F("url"),S=j;S.request=function(b,p){typeof b=="string"?b=m.parse(b):b=M(b);var d=N.location.protocol.search(/^https?:$/)===-1?"http:":"",t=b.protocol||d,l=b.hostname||b.host,r=b.port,i=b.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),b.url=(l?t+"//"+l:"")+(r?":"+r:"")+i,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var o=new v(b);return p&&o.on("response",p),o},S.get=function(p,d){var t=S.request(p,d);return t.end(),t},S.ClientRequest=v,S.IncomingMessage=O.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=y,S.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(F,$,j){(function(N){"use strict";j.fetch=S(N.fetch)&&S(N.ReadableStream),j.writableStream=S(N.WritableStream),j.abortController=S(N.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(b){}var v;function O(){if(v!==void 0)return v;if(N.XMLHttpRequest){v=new N.XMLHttpRequest;try{v.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(b){v=null}}else v=null;return v}function M(b){var p=O();if(!p)return!1;try{return p.responseType=b,p.responseType===b}catch(d){}return!1}var y=typeof N.ArrayBuffer!="undefined",m=y&&S(N.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||y&&M("arraybuffer"),j.msstream=!j.fetch&&m&&M("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&y&&M("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(O()?S(O().overrideMimeType):!1),j.vbArray=S(N.VBArray);function S(b){return typeof b=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(F,$,j){(function(N,v,O){"use strict";var M=F("babel-runtime/core-js/object/keys"),y=m(M);function m(a){return a&&a.__esModule?a:{default:a}}var S=F("./capability"),b=F("inherits"),p=F("./response"),d=F("readable-stream"),t=F("to-arraybuffer"),l=p.IncomingMessage,r=p.readyStates;function i(a,c){return S.fetch&&c?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&a?"arraybuffer":S.vbArray&&a?"text:vbarray":"text"}var o=$.exports=function(a){var c=this;d.Writable.call(c),c._opts=a,c._body=[],c._headers={},a.auth&&c.setHeader("Authorization","Basic "+new O(a.auth).toString("base64")),(0,y.default)(a.headers).forEach(function(_){c.setHeader(_,a.headers[_])});var f,w=!0;if(a.mode==="disable-fetch"||"requestTimeout"in a&&!S.abortController)w=!1,f=!0;else if(a.mode==="prefer-streaming")f=!1;else if(a.mode==="allow-wrong-content-type")f=!S.overrideMimeType;else if(!a.mode||a.mode==="default"||a.mode==="prefer-fast")f=!0;else throw new Error("Invalid value for opts.mode");c._mode=i(f,w),c._fetchTimer=null,c.on("finish",function(){c._onFinish()})};b(o,d.Writable),o.prototype.setHeader=function(a,c){var f=this,w=a.toLowerCase();if(u.indexOf(w)!==-1)return;f._headers[w]={name:a,value:c}},o.prototype.getHeader=function(a){var c=this._headers[a.toLowerCase()];return c?c.value:null},o.prototype.removeHeader=function(a){var c=this;delete c._headers[a.toLowerCase()]},o.prototype._onFinish=function(){var a=this;if(a._destroyed)return;var c=a._opts,f=a._headers,w=null;c.method!=="GET"&&c.method!=="HEAD"&&(S.arraybuffer?w=t(O.concat(a._body)):S.blobConstructor?w=new v.Blob(a._body.map(function(x){return t(x)}),{type:(f["content-type"]||{}).value||""}):w=O.concat(a._body).toString());var _=[];if((0,y.default)(f).forEach(function(x){var E=f[x].name,T=f[x].value;Array.isArray(T)?T.forEach(function(k){_.push([E,k])}):_.push([E,T])}),a._mode==="fetch"){var h=null,R=null;if(S.abortController){var C=new AbortController;h=C.signal,a._fetchAbortController=C,"requestTimeout"in c&&c.requestTimeout!==0&&(a._fetchTimer=v.setTimeout(function(){a.emit("requestTimeout"),a._fetchAbortController&&a._fetchAbortController.abort()},c.requestTimeout))}v.fetch(a._opts.url,{method:a._opts.method,headers:_,body:w||void 0,mode:"cors",credentials:c.withCredentials?"include":"same-origin",signal:h}).then(function(x){a._fetchResponse=x,a._connect()},function(x){v.clearTimeout(a._fetchTimer),a._destroyed||a.emit("error",x)})}else{var g=a._xhr=new v.XMLHttpRequest;try{g.open(a._opts.method,a._opts.url,!0)}catch(x){N.nextTick(function(){a.emit("error",x)});return}"responseType"in g&&(g.responseType=a._mode.split(":")[0]),"withCredentials"in g&&(g.withCredentials=!!c.withCredentials),a._mode==="text"&&"overrideMimeType"in g&&g.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in c&&(g.timeout=c.requestTimeout,g.ontimeout=function(){a.emit("requestTimeout")}),_.forEach(function(x){g.setRequestHeader(x[0],x[1])}),a._response=null,g.onreadystatechange=function(){switch(g.readyState){case r.LOADING:case r.DONE:a._onXHRProgress();break}},a._mode==="moz-chunked-arraybuffer"&&(g.onprogress=function(){a._onXHRProgress()}),g.onerror=function(){if(a._destroyed)return;a.emit("error",new Error("XHR error"))};try{g.send(w)}catch(x){N.nextTick(function(){a.emit("error",x)});return}}};function s(a){try{var c=a.status;return c!==null&&c!==0}catch(f){return!1}}o.prototype._onXHRProgress=function(){var a=this;if(!s(a._xhr)||a._destroyed)return;a._response||a._connect(),a._response._onXHRProgress()},o.prototype._connect=function(){var a=this;if(a._destroyed)return;a._response=new l(a._xhr,a._fetchResponse,a._mode,a._fetchTimer),a._response.on("error",function(c){a.emit("error",c)}),a.emit("response",a._response)},o.prototype._write=function(a,c,f){var w=this;w._body.push(a),f()},o.prototype.abort=o.prototype.destroy=function(){var a=this;a._destroyed=!0,v.clearTimeout(a._fetchTimer),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort()},o.prototype.end=function(a,c,f){var w=this;typeof a=="function"&&(f=a,a=void 0),d.Writable.prototype.end.call(w,a,c,f)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var u=["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,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("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(F,$,j){(function(N,v,O){"use strict";var M=F("babel-runtime/core-js/promise"),y=m(M);function m(l){return l&&l.__esModule?l:{default:l}}var S=F("./capability"),b=F("inherits"),p=F("readable-stream"),d=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},t=j.IncomingMessage=function(l,r,i,o){var s=this;if(p.Readable.call(s),s._mode=i,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){N.nextTick(function(){s.emit("close")})}),i==="fetch"){var u=function h(){c.read().then(function(R){if(s._destroyed)return;if(R.done){v.clearTimeout(o),s.push(null);return}s.push(new O(R.value)),h()}).catch(function(R){v.clearTimeout(o),s._destroyed||s.emit("error",R)})};if(s._fetchResponse=r,s.url=r.url,s.statusCode=r.status,s.statusMessage=r.statusText,r.headers.forEach(function(h,R){s.headers[R.toLowerCase()]=h,s.rawHeaders.push(R,h)}),S.writableStream){var a=new WritableStream({write:function(R){return new y.default(function(C,g){s._destroyed?g():s.push(new O(R))?C():s._resumeFetch=C})},close:function(){v.clearTimeout(o),s._destroyed||s.push(null)},abort:function(R){s._destroyed||s.emit("error",R)}});try{r.body.pipeTo(a).catch(function(h){v.clearTimeout(o),s._destroyed||s.emit("error",h)});return}catch(h){}}var c=r.body.getReader();u()}else{s._xhr=l,s._pos=0,s.url=l.responseURL,s.statusCode=l.status,s.statusMessage=l.statusText;var f=l.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(h){var R=h.match(/^([^:]+):\s*(.*)/);if(R){var C=R[1].toLowerCase();C==="set-cookie"?(s.headers[C]===void 0&&(s.headers[C]=[]),s.headers[C].push(R[2])):s.headers[C]!==void 0?s.headers[C]+=", "+R[2]:s.headers[C]=R[2],s.rawHeaders.push(R[1],R[2])}}),s._charset="x-user-defined",!S.overrideMimeType){var w=s.rawHeaders["mime-type"];if(w){var _=w.match(/;\s*charset=([^;])(;|$)/);_&&(s._charset=_[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};b(t,p.Readable),t.prototype._read=function(){var l=this,r=l._resumeFetch;r&&(l._resumeFetch=null,r())},t.prototype._onXHRProgress=function(){var l=this,r=l._xhr,i=null;switch(l._mode){case"text:vbarray":if(r.readyState!==d.DONE)break;try{i=new v.VBArray(r.responseBody).toArray()}catch(c){}if(i!==null){l.push(new O(i));break}case"text":try{i=r.responseText}catch(c){l._mode="text:vbarray";break}if(i.length>l._pos){var o=i.substr(l._pos);if(l._charset==="x-user-defined"){for(var s=new O(o.length),u=0;ul._pos&&(l.push(new O(new Uint8Array(a.result.slice(l._pos)))),l._pos=a.result.byteLength)},a.onload=function(){l.push(null)},a.readAsArrayBuffer(i);break}l._xhr.readyState===d.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(F,$,j){"use strict";var N=F("safe-buffer").Buffer,v=N.isEncoding||function(a){a=""+a;switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(a){if(!a)return"utf8";for(var c;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(c)return;a=(""+a).toLowerCase(),c=!0}}function M(a){var c=O(a);if(typeof c!="string"&&(N.isEncoding===v||!v(a)))throw new Error("Unknown encoding: "+a);return c||a}j.StringDecoder=y;function y(a){this.encoding=M(a);var c;switch(this.encoding){case"utf16le":this.text=l,this.end=r,c=4;break;case"utf8":this.fillLast=p,c=4;break;case"base64":this.text=i,this.end=o,c=3;break;default:this.write=s,this.end=u;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(c)}y.prototype.write=function(a){if(a.length===0)return"";var c,f;if(this.lastNeed){if(c=this.fillLast(a),c===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function S(a,c,f){var w=c.length-1;if(w=0?(_>0&&(a.lastNeed=_-1),_):--w=0?(_>0&&(a.lastNeed=_-2),_):--w=0?(_>0&&(_===2?_=0:a.lastNeed=_-3),_):0))}function b(a,c,f){if((c[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function p(a){var c=this.lastTotal-this.lastNeed,f=b(this,a,c);if(f!==void 0)return f;if(this.lastNeed<=a.length)return a.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,c,0,a.length),this.lastNeed-=a.length}function d(a,c){var f=S(this,a,c);if(!this.lastNeed)return a.toString("utf8",c);this.lastTotal=f;var w=a.length-(f-this.lastNeed);return a.copy(this.lastChar,0,w),a.toString("utf8",c,w)}function t(a){var c=a&&a.length?this.write(a):"";return this.lastNeed?c+"\uFFFD":c}function l(a,c){if((a.length-c)%2===0){var f=a.toString("utf16le",c);if(f){var w=f.charCodeAt(f.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",c,a.length-1)}function r(a){var c=a&&a.length?this.write(a):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,f)}return c}function i(a,c){var f=(a.length-c)%3;return f===0?a.toString("base64",c):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",c,a.length-f))}function o(a){var c=a&&a.length?this.write(a):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}function s(a){return a.toString(this.encoding)}function u(a){return a&&a.length?this.write(a):""}},{"safe-buffer":228}],236:[function(F,$,j){(function(N,v){var O=F("process/browser.js").nextTick,M=Function.prototype.apply,y=Array.prototype.slice,m={},S=0;j.setTimeout=function(){return new b(M.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new b(M.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(p){p.close()};function b(p,d){this._id=p,this._clearFn=d}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(p,d){clearTimeout(p._idleTimeoutId),p._idleTimeout=d},j.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},j._unrefActive=j.active=function(p){clearTimeout(p._idleTimeoutId);var d=p._idleTimeout;d>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},d))},j.setImmediate=typeof N=="function"?N:function(p){var d=S++,t=arguments.length<2?!1:y.call(arguments,1);return m[d]=!0,O(function(){m[d]&&(t?p.apply(null,t):p.call(null),j.clearImmediate(d))}),d},j.clearImmediate=typeof v=="function"?v:function(p){delete m[p]}}).call(this,F("timers").setImmediate,F("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(F,$,j){var N=F("buffer").Buffer;$.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(N.isBuffer(v)){for(var O=new Uint8Array(v.length),M=v.length,y=0;y",'"',"`"," ","\r",` `," "],b=["{","}","|","\\","^","`"].concat(S),p=["'"].concat(b),d=["%","/","?",";","#"].concat(p),t=["/","?","#"],l=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},s={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},a=F("querystring");function c(h,R,C){if(h&&v.isObject(h)&&h instanceof O)return h;var g=new O;return g.parse(h,R,C),g}O.prototype.parse=function(h,R,C){if(!v.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var g=h.indexOf("?"),x=g!==-1&&g127?he+="x":he+=ce[ae];if(!he.match(r)){var ge=q.slice(0,z),oe=q.slice(z+1),se=ce.match(i);se&&(ge.push(se[1]),oe.unshift(se[2])),oe.length&&(k="/"+oe.join(".")+k),this.hostname=ge.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),V||(this.hostname=N.toASCII(this.hostname));var te=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+te,this.href+=this.host,V&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!o[G])for(var z=0,Z=p.length;z0?C.host.split("@"):!1;he&&(C.auth=he.shift(),C.host=C.hostname=he.shift())}return C.search=h.search,C.query=h.query,(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!q.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var ae=q.slice(-1)[0],xe=(C.host||h.host||q.length>1)&&(ae==="."||ae==="..")||ae==="",ge=0,oe=q.length;oe>=0;oe--)ae=q[oe],ae==="."?q.splice(oe,1):ae===".."?(q.splice(oe,1),ge++):ge&&(q.splice(oe,1),ge--);if(!H&&!V)for(;ge--;ge)q.unshift("..");H&&q[0]!==""&&(!q[0]||q[0].charAt(0)!=="/")&&q.unshift(""),xe&&q.join("/").substr(-1)!=="/"&&q.push("");var se=q[0]===""||q[0]&&q[0].charAt(0)==="/";if(ce){C.hostname=C.host=se?"":q.length?q.shift():"";var he=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;he&&(C.auth=he.shift(),C.host=C.hostname=he.shift())}return H=H||C.host&&q.length,H&&!se&&q.unshift(""),q.length?C.pathname=q.join("/"):(C.pathname=null,C.path=null),(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=h.auth||C.auth,C.slashes=C.slashes||h.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var h=this.host,R=y.exec(h);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),h=h.substr(0,h.length-R.length)),h&&(this.hostname=h)}},{"./util":239,punycode:209,querystring:212}],239:[function(F,$,j){"use strict";$.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(F,$,j){(function(N){$.exports=v;function v(M,y){if(O("noDeprecation"))return M;var m=!1;function S(){if(!m){if(O("throwDeprecation"))throw new Error(y);O("traceDeprecation")?console.trace(y):console.warn(y),m=!0}return M.apply(this,arguments)}return S}function O(M){try{if(!N.localStorage)return!1}catch(m){return!1}var y=N.localStorage[M];return y==null?!1:String(y).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(F,$,j){typeof Object.create=="function"?$.exports=function(v,O){v.super_=O,v.prototype=Object.create(O.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:$.exports=function(v,O){v.super_=O;var M=function(){};M.prototype=O.prototype,v.prototype=new M,v.prototype.constructor=v}},{}],242:[function(F,$,j){$.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(F,$,j){(function(N,v){var O=/%[sdj%]/g;j.format=function(W){if(!w(W)){for(var z=[],U=0;U=H)return Z;switch(Z){case"%s":return String(P[U++]);case"%d":return Number(P[U++]);case"%j":try{return JSON.stringify(P[U++])}catch(ce){return"[Circular]"}default:return Z}}),q=P[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),u(z)?U.showHidden=z:z&&j._extend(U,z),h(U.showHidden)&&(U.showHidden=!1),h(U.depth)&&(U.depth=2),h(U.colors)&&(U.colors=!1),h(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),d(U,W,U.depth)}j.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(W,z){var U=m.styles[z];return U?"["+m.colors[U][0]+"m"+W+"["+m.colors[U][1]+"m":W}function b(W,z){return W}function p(W){var z={};return W.forEach(function(U,P){z[U]=!0}),z}function d(W,z,U){if(W.customInspect&&z&&E(z.inspect)&&z.inspect!==j.inspect&&!(z.constructor&&z.constructor.prototype===z)){var P=z.inspect(U,W);return w(P)||(P=d(W,P,U)),P}var H=t(W,z);if(H)return H;var V=Object.keys(z),q=p(V);if(W.showHidden&&(V=Object.getOwnPropertyNames(z)),x(z)&&(V.indexOf("message")>=0||V.indexOf("description")>=0))return l(z);if(V.length===0){if(E(z)){var Z=z.name?": "+z.name:"";return W.stylize("[Function"+Z+"]","special")}if(R(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(g(z))return W.stylize(Date.prototype.toString.call(z),"date");if(x(z))return l(z)}var ce="",he=!1,ae=["{","}"];if(s(z)&&(he=!0,ae=["[","]"]),E(z)){var xe=z.name?": "+z.name:"";ce=" [Function"+xe+"]"}if(R(z)&&(ce=" "+RegExp.prototype.toString.call(z)),g(z)&&(ce=" "+Date.prototype.toUTCString.call(z)),x(z)&&(ce=" "+l(z)),V.length===0&&(!he||z.length==0))return ae[0]+ce+ae[1];if(U<0)return R(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var ge;return he?ge=r(W,z,U,q,V):ge=V.map(function(oe){return i(W,z,U,q,oe,he)}),W.seen.pop(),o(ge,ce,ae)}function t(W,z){if(h(z))return W.stylize("undefined","undefined");if(w(z)){var U="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(U,"string")}if(f(z))return W.stylize(""+z,"number");if(u(z))return W.stylize(""+z,"boolean");if(a(z))return W.stylize("null","null")}function l(W){return"["+Error.prototype.toString.call(W)+"]"}function r(W,z,U,P,H){for(var V=[],q=0,Z=z.length;q-1&&(V?Z=Z.split(` `).map(function(he){return" "+he}).join(` `).substr(2):Z=` `+Z.split(` `).map(function(he){return" "+he}).join(` `))):Z=W.stylize("[Circular]","special")),h(q)){if(V&&H.match(/^\d+$/))return Z;q=JSON.stringify(""+H),q.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(q=q.substr(1,q.length-2),q=W.stylize(q,"name")):(q=q.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),q=W.stylize(q,"string"))}return q+": "+Z}function o(W,z,U){var P=0,H=W.reduce(function(V,q){return P++,q.indexOf(` `)>=0&&P++,V+q.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?U[0]+(z===""?"":z+` `)+" "+W.join(`, `)+" "+U[1]:U[0]+z+" "+W.join(", ")+" "+U[1]}function s(W){return Array.isArray(W)}j.isArray=s;function u(W){return typeof W=="boolean"}j.isBoolean=u;function a(W){return W===null}j.isNull=a;function c(W){return W==null}j.isNullOrUndefined=c;function f(W){return typeof W=="number"}j.isNumber=f;function w(W){return typeof W=="string"}j.isString=w;function _(W){return typeof W=="symbol"}j.isSymbol=_;function h(W){return W===void 0}j.isUndefined=h;function R(W){return C(W)&&k(W)==="[object RegExp]"}j.isRegExp=R;function C(W){return typeof W=="object"&&W!==null}j.isObject=C;function g(W){return C(W)&&k(W)==="[object Date]"}j.isDate=g;function x(W){return C(W)&&(k(W)==="[object Error]"||W instanceof Error)}j.isError=x;function E(W){return typeof W=="function"}j.isFunction=E;function T(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}j.isPrimitive=T,j.isBuffer=F("./support/isBuffer");function k(W){return Object.prototype.toString.call(W)}function L(W){return W<10?"0"+W.toString(10):W.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var W=new Date,z=[L(W.getHours()),L(W.getMinutes()),L(W.getSeconds())].join(":");return[W.getDate(),A[W.getMonth()],z].join(" ")}j.log=function(){console.log("%s - %s",G(),j.format.apply(j,arguments))},j.inherits=F("inherits"),j._extend=function(W,z){if(!z||!C(z))return W;for(var U=Object.keys(z),P=U.length;P--;)W[U[P]]=z[U[P]];return W};function K(W,z){return Object.prototype.hasOwnProperty.call(W,z)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(F,$,j){"use strict";(function(){"use strict";j.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(F,$,j){"use strict";var N=F("babel-runtime/helpers/typeof"),v=y(N),O=F("babel-runtime/core-js/object/keys"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,S,b,p,d,t={}.hasOwnProperty;m=F("xmlbuilder"),S=F("./defaults").defaults,p=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},d=function(r){return""},b=function(r){return r.replace("]]>","]]]]>")},j.Builder=function(){function l(r){var i,o,s;this.options={},o=S["0.2"];for(i in o){if(!t.call(o,i))continue;s=o[i],this.options[i]=s}for(i in r){if(!t.call(r,i))continue;s=r[i],this.options[i]=s}}return l.prototype.buildObject=function(r){var i,o,s,u,a;return i=this.options.attrkey,o=this.options.charkey,(0,M.default)(r).length===1&&this.options.rootName===S["0.2"].rootName?(a=(0,M.default)(r)[0],r=r[a]):a=this.options.rootName,s=function(c){return function(f,w){var _,h,R,C,g,x;if((typeof w=="undefined"?"undefined":(0,v.default)(w))!=="object")c.options.cdata&&p(w)?f.raw(d(w)):f.txt(w);else if(Array.isArray(w))for(C in w){if(!t.call(w,C))continue;h=w[C];for(g in h)R=h[g],f=s(f.ele(g),R).up()}else for(g in w){if(!t.call(w,g))continue;if(h=w[g],g===i){if((typeof h=="undefined"?"undefined":(0,v.default)(h))==="object")for(_ in h)x=h[_],f=f.att(_,x)}else if(g===o)c.options.cdata&&p(h)?f=f.raw(d(h)):f=f.txt(h);else if(Array.isArray(h))for(C in h){if(!t.call(h,C))continue;R=h[C],typeof R=="string"?c.options.cdata&&p(R)?f=f.ele(g).raw(d(R)).up():f=f.ele(g,R).up():f=s(f.ele(g),R).up()}else(typeof h=="undefined"?"undefined":(0,v.default)(h))==="object"?f=s(f.ele(g),h).up():typeof h=="string"&&c.options.cdata&&p(h)?f=f.ele(g).raw(d(h)).up():(h==null&&(h=""),f=f.ele(g,h.toString()).up())}return f}}(this),u=m.create(a,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),s(u,r).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(F,$,j){"use strict";(function(){j.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(F,$,j){"use strict";var N=F("babel-runtime/core-js/promise"),v=p(N),O=F("babel-runtime/core-js/object/get-own-property-names"),M=p(O),y=F("babel-runtime/core-js/object/keys"),m=p(y),S=F("babel-runtime/helpers/typeof"),b=p(S);function p(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,t,l,r,i,o,s,u,a=function(_,h){return function(){return _.apply(h,arguments)}},c=function(_,h){for(var R in h)f.call(h,R)&&(_[R]=h[R]);function C(){this.constructor=_}return C.prototype=h.prototype,_.prototype=new C,_.__super__=h.prototype,_},f={}.hasOwnProperty;s=F("sax"),l=F("events"),d=F("./bom"),o=F("./processors"),u=F("timers").setImmediate,t=F("./defaults").defaults,r=function(_){return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&_!=null&&(0,m.default)(_).length===0},i=function(_,h,R){var C,g,x;for(C=0,g=_.length;C0&&(L[x.options.childkey]=G),G=L;else if(z){z[x.options.childkey]=z[x.options.childkey]||[],K={};for(k in G){if(!f.call(G,k))continue;K[k]=G[k]}z[x.options.childkey].push(K),delete G["#name"],(0,m.default)(G).length===1&&R in G&&!x.EXPLICIT_CHARKEY&&(G=G[R])}}return g.length>0?x.assignOrPush(z,A,G):(x.options.explicitRoot&&(W=G,G={},G[A]=W),x.resultObject=G,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),C=function(x){return function(E){var T,k;if(k=g[g.length-1],k)return k[R]+=E,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(k[x.options.childkey]=k[x.options.childkey]||[],T={"#name":"__text__"},T[R]=E,x.options.normalize&&(T[R]=T[R].replace(/\s{2,}/g," ").trim()),k[x.options.childkey].push(T)),k}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(x){return function(E){var T;if(T=C(E),T)return T.cdata=!0}}(this)},_.prototype.parseString=function(h,R){var C;R!=null&&typeof R=="function"&&(this.on("end",function(g){return this.reset(),R(null,g)}),this.on("error",function(g){return this.reset(),R(g)}));try{return h=h.toString(),h.trim()===""?(this.emit("end",null),!0):(h=d.stripBOM(h),this.options.async?(this.remaining=h,u(this.processAsync),this.saxParser):this.saxParser.write(h).close())}catch(g){if(C=g,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},_.prototype.parseStringPromise=function(h){return new v.default(function(R){return function(C,g){return R.parseString(h,function(x,E){return x?g(x):C(E)})}}(this))},_}(l),j.parseString=function(w,_,h){var R,C,g;return h!=null?(typeof h=="function"&&(R=h),(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(C=_)):(typeof _=="function"&&(R=_),C={}),g=new j.Parser(C),g.parseString(w,R)},j.parseStringPromise=function(w,_){var h,R;return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(h=_),R=new j.Parser(h),R.parseStringPromise(w)}}).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(F,$,j){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(v){return v.toLowerCase()},j.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},j.stripPrefix=function(v){return v.replace(N,"")},j.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},j.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(F,$,j){"use strict";(function(){"use strict";var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;v=F("./defaults"),N=F("./builder"),O=F("./parser"),M=F("./processors"),j.defaults=v.defaults,j.processors=M,j.ValidationError=function(S){y(b,S);function b(p){this.message=p}return b}(Error),j.Builder=N.Builder,j.Parser=O.Parser,j.parseString=O.parseString,j.parseStringPromise=O.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(F,$,j){"use strict";(function(){$.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(F,$,j){"use strict";(function(){$.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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/get-prototype-of"),v=S(N),O=F("babel-runtime/helpers/typeof"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(b){return b&&b.__esModule?b:{default:b}}(function(){var b,p,d,t,l,r,i,o=[].slice,s={}.hasOwnProperty;b=function(){var a,c,f,w,_,h;if(h=arguments[0],_=2<=arguments.length?o.call(arguments,1):[],l(m.default))m.default.apply(null,arguments);else for(a=0,f=_.length;a":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),$.exports=y=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=M.CData,this.value=this.stringify.cdata(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m=function(p,d){for(var t in d)S.call(d,t)&&(p[t]=d[t]);function l(){this.constructor=p}return l.prototype=d.prototype,p.prototype=new l,p.__super__=d.prototype,p},S={}.hasOwnProperty;y=F("./XMLNode"),$.exports=M=function(b){m(p,b);function p(d){p.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(p.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),p.prototype.clone=function(){return(0,v.default)(this)},p.prototype.substringData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.insertData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(d,t,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},p}(y)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),$.exports=m=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=M.Comment,this.value=this.stringify.comment(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/core-js/object/create"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}(function(){var m,S,b;S=F("./XMLDOMErrorHandler"),b=F("./XMLDOMStringList"),$.exports=m=function(){function p(){var d;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,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=d=(0,M.default)(this.defaultParams)}return Object.defineProperty(p.prototype,"parameterNames",{get:function(){return new b((0,v.default)(this.defaultParams))}}),p.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},p.prototype.canSetParameter=function(d,t){return!0},p.prototype.setParameter=function(d,t){return t!=null?this.params[d]=t:delete this.params[d]},p}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(){}return v.prototype.handleError=function(O){throw new Error(O)},v}()}).call(void 0)},{}],260:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(){}return v.prototype.hasFeature=function(O,M){return!0},v.prototype.createDocumentType=function(O,M,y){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(O,M,y){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(O,M){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(O){this.arr=O||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(O){return this.arr[O]||null},v.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},v}()}).call(void 0)},{}],262:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d,t,l,r){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!t)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(r&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(t),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=l}return S.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(p),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return S.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(F,$,j){"use strict";(function(){var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(S){y(b,S);function b(p,d,t,l){if(b.__super__.constructor.call(this,p),t==null)throw new Error("Missing DTD entity name. "+this.debugInfo(t));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(t));if(this.pe=!!d,this.name=this.stringify.name(t),this.type=N.EntityDeclaration,!M(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(t));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(t));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(t))}}return Object.defineProperty(b.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(b.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(b.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(b.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlVersion",{get:function(){return null}}),b.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=N.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(F,$,j){"use strict";(function(){var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(S){y(b,S);function b(p,d,t,l){var r;b.__super__.constructor.call(this,p),M(d)&&(r=d,d=r.version,t=r.encoding,l=r.standalone),d||(d="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(d),t!=null&&(this.encoding=this.stringify.xmlEncoding(t)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return b.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d=function(r,i){for(var o in i)t.call(i,o)&&(r[o]=i[o]);function s(){this.constructor=r}return s.prototype=i.prototype,r.prototype=new s,r.__super__=i.prototype,r},t={}.hasOwnProperty;p=F("./Utility").isObject,b=F("./XMLNode"),N=F("./NodeType"),v=F("./XMLDTDAttList"),M=F("./XMLDTDEntity"),O=F("./XMLDTDElement"),y=F("./XMLDTDNotation"),S=F("./XMLNamedNodeMap"),$.exports=m=function(l){d(r,l);function r(i,o,s){var u,a,c,f,w,_;if(r.__super__.constructor.call(this,i),this.type=N.DocType,i.children){for(f=i.children,a=0,c=f.length;a=0;)this.up();return this.onEnd()},g.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},g.prototype.openNode=function(x){var E,T,k,L;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),T="",x.type===N.Element){this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,L=x.attribs;for(k in L){if(!C.call(L,k))continue;E=L[k],T+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}T+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+""),T+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),x.isOpen=!0}},g.prototype.closeNode=function(x){var E;if(!x.isClosed)return E="",this.writerOptions.state=v.CloseTag,x.type===N.Element?E=this.writer.indent(x,this.writerOptions,this.currentLevel)+""+this.writer.endline(x,this.writerOptions,this.currentLevel):E=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=v.None,this.onData(E,this.currentLevel),x.isClosed=!0},g.prototype.onData=function(x,E){return this.documentStarted=!0,this.onDataCallback(x,E+1)},g.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},g.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},g.prototype.ele=function(){return this.element.apply(this,arguments)},g.prototype.nod=function(x,E,T){return this.node(x,E,T)},g.prototype.txt=function(x){return this.text(x)},g.prototype.dat=function(x){return this.cdata(x)},g.prototype.com=function(x){return this.comment(x)},g.prototype.ins=function(x,E){return this.instruction(x,E)},g.prototype.dec=function(x,E,T){return this.declaration(x,E,T)},g.prototype.dtd=function(x,E,T){return this.doctype(x,E,T)},g.prototype.e=function(x,E,T){return this.element(x,E,T)},g.prototype.n=function(x,E,T){return this.node(x,E,T)},g.prototype.t=function(x){return this.text(x)},g.prototype.d=function(x){return this.cdata(x)},g.prototype.c=function(x){return this.comment(x)},g.prototype.r=function(x){return this.raw(x)},g.prototype.i=function(x,E){return this.instruction(x,E)},g.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.ent=function(x,E){return this.entity(x,E)},g.prototype.pent=function(x,E){return this.pEntity(x,E)},g.prototype.not=function(x,E){return this.notation(x,E)},g}()}).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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;m=F("./XMLNode"),M=F("./NodeType"),$.exports=y=function(p){S(d,p);function d(t){d.__super__.constructor.call(this,t),this.type=M.Dummy}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return""},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S,b,p,d,t,l,r=function(s,u){for(var a in u)i.call(u,a)&&(s[a]=u[a]);function c(){this.constructor=s}return c.prototype=u.prototype,s.prototype=new c,s.__super__=u.prototype,s},i={}.hasOwnProperty;l=F("./Utility"),t=l.isObject,d=l.isFunction,p=l.getValue,b=F("./XMLNode"),M=F("./NodeType"),y=F("./XMLAttribute"),S=F("./XMLNamedNodeMap"),$.exports=m=function(o){r(s,o);function s(u,a,c){var f,w,_,h;if(s.__super__.constructor.call(this,u),a==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(a),this.type=M.Element,this.attribs={},this.schemaTypeInfo=null,c!=null&&this.attribute(c),u.type===M.Document&&(this.isRoot=!0,this.documentObject=u,u.rootObject=this,u.children)){for(h=u.children,w=0,_=h.length;w<_;w++)if(f=h[w],f.type===M.DocType){f.name=this.name;break}}}return Object.defineProperty(s.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(s.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(s.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(s.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(s.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),s.prototype.clone=function(){var u,a,c,f;c=(0,v.default)(this),c.isRoot&&(c.documentObject=null),c.attribs={},f=this.attribs;for(a in f){if(!i.call(f,a))continue;u=f[a],c.attribs[a]=u.clone()}return c.children=[],this.children.forEach(function(w){var _;return _=w.clone(),_.parent=c,c.children.push(_)}),c},s.prototype.attribute=function(u,a){var c,f;if(u!=null&&(u=p(u)),t(u))for(c in u){if(!i.call(u,c))continue;f=u[c],this.attribute(c,f)}else d(a)&&(a=a.apply()),this.options.keepNullAttributes&&a==null?this.attribs[u]=new y(this,u,""):a!=null&&(this.attribs[u]=new y(this,u,a));return this},s.prototype.removeAttribute=function(u){var a,c,f;if(u==null)throw new Error("Missing attribute name. "+this.debugInfo());if(u=p(u),Array.isArray(u))for(c=0,f=u.length;c=f;a=0<=f?++c:--c)if(!this.attribs[a].isEqualNode(u.attribs[a]))return!1;return!0},s}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M;$.exports=M=function(){function y(m){this.nodes=m}return Object.defineProperty(y.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),y.prototype.clone=function(){return this.nodes=null},y.prototype.getNamedItem=function(m){return this.nodes[m]},y.prototype.setNamedItem=function(m){var S;return S=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,S||null},y.prototype.removeNamedItem=function(m){var S;return S=this.nodes[m],delete this.nodes[m],S||null},y.prototype.item=function(m){return this.nodes[(0,v.default)(this.nodes)[m]]||null},y.prototype.getNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},y.prototype.removeNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d,t,l,r,i,o,s,u,a,c,f={}.hasOwnProperty;c=F("./Utility"),a=c.isObject,u=c.isFunction,s=c.isEmpty,o=c.getValue,b=null,O=null,M=null,y=null,m=null,r=null,i=null,l=null,S=null,v=null,t=null,p=null,N=null,$.exports=d=function(){function w(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=F("./XMLElement"),O=F("./XMLCData"),M=F("./XMLComment"),y=F("./XMLDeclaration"),m=F("./XMLDocType"),r=F("./XMLRaw"),i=F("./XMLText"),l=F("./XMLProcessingInstruction"),S=F("./XMLDummy"),v=F("./NodeType"),t=F("./XMLNodeList"),p=F("./XMLNamedNodeMap"),N=F("./DocumentPosition"))}return Object.defineProperty(w.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(w.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new t(this.children)),this.childNodeList}}),Object.defineProperty(w.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(w.prototype,"previousSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var h,R,C,g,x;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(x="",g=this.children,R=0,C=g.length;R":((R=this.parent)!=null?R.name:void 0)?"node: <"+_+">, parent: <"+this.parent.name+">":"node: <"+_+">"},w.prototype.ele=function(_,h,R){return this.element(_,h,R)},w.prototype.nod=function(_,h,R){return this.node(_,h,R)},w.prototype.txt=function(_){return this.text(_)},w.prototype.dat=function(_){return this.cdata(_)},w.prototype.com=function(_){return this.comment(_)},w.prototype.ins=function(_,h){return this.instruction(_,h)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(_,h,R){return this.declaration(_,h,R)},w.prototype.e=function(_,h,R){return this.element(_,h,R)},w.prototype.n=function(_,h,R){return this.node(_,h,R)},w.prototype.t=function(_){return this.text(_)},w.prototype.d=function(_){return this.cdata(_)},w.prototype.c=function(_){return this.comment(_)},w.prototype.r=function(_){return this.raw(_)},w.prototype.i=function(_,h){return this.instruction(_,h)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(_){return this.importDocument(_)},w.prototype.replaceChild=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isSupported=function(_,h){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(_){var h,R;return h=this,h===_?0:this.document()!==_.document()?(R=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?R|=N.Preceding:R|=N.Following,R):h.isAncestor(_)?N.Contains|N.Preceding:h.isDescendant(_)?N.Contains|N.Following:h.isPreceding(_)?N.Preceding:N.Following},w.prototype.isSameNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(_){var h,R,C;if(_.nodeType!==this.nodeType)return!1;if(_.children.length!==this.children.length)return!1;for(h=R=0,C=this.children.length-1;0<=C?R<=C:R>=C;h=0<=C?++R:--R)if(!this.children[h].isEqualNode(_.children[h]))return!1;return!0},w.prototype.getFeature=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(_,h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(_){return _?_===this||this.isDescendant(_):!1},w.prototype.isDescendant=function(_){var h,R,C,g,x;for(x=this.children,C=0,g=x.length;CR},w.prototype.treePosition=function(_){var h,R;return R=0,h=!1,this.foreachTreeNode(this.document(),function(C){if(R++,!h&&C===_)return h=!0}),h?R:-1},w.prototype.foreachTreeNode=function(_,h){var R,C,g,x,E;for(_||(_=this.document()),x=_.children,C=0,g=x.length;C0){for(this.stream.write(" ["),this.stream.write(this.endline(p,d,t)),d.state=v.InsideTag,o=p.children,r=0,i=o.length;r"),this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.element=function(p,d,t){var l,r,i,o,s,u,a,c,f,w;t||(t=0),this.openNode(p,d,t),d.state=v.OpenTag,this.stream.write(this.indent(p,d,t)+"<"+p.name),f=p.attribs;for(a in f){if(!m.call(f,a))continue;l=f[a],this.attribute(l,d,t)}if(i=p.children.length,o=i===0?null:p.children[0],i===0||p.children.every(function(_){return(_.type===N.Text||_.type===N.Raw)&&_.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=v.CloseTag,this.stream.write("")):(d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&i===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),d.state=v.InsideTag,d.suppressPrettyCount++,c=!0,this.writeChildNode(o,d,t+1),d.suppressPrettyCount--,c=!1,d.state=v.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(p,d,t)),d.state=v.InsideTag,w=p.children,s=0,u=w.length;s")}return this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.processingInstruction=function(p,d,t){return this.stream.write(b.__super__.processingInstruction.call(this,p,d,t))},b.prototype.raw=function(p,d,t){return this.stream.write(b.__super__.raw.call(this,p,d,t))},b.prototype.text=function(p,d,t){return this.stream.write(b.__super__.text.call(this,p,d,t))},b.prototype.dtdAttList=function(p,d,t){return this.stream.write(b.__super__.dtdAttList.call(this,p,d,t))},b.prototype.dtdElement=function(p,d,t){return this.stream.write(b.__super__.dtdElement.call(this,p,d,t))},b.prototype.dtdEntity=function(p,d,t){return this.stream.write(b.__super__.dtdEntity.call(this,p,d,t))},b.prototype.dtdNotation=function(p,d,t){return this.stream.write(b.__super__.dtdNotation.call(this,p,d,t))},b}(M)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(F,$,j){"use strict";(function(){var N,v,O=function(m,S){for(var b in S)M.call(S,b)&&(m[b]=S[b]);function p(){this.constructor=m}return p.prototype=S.prototype,m.prototype=new p,m.__super__=S.prototype,m},M={}.hasOwnProperty;v=F("./XMLWriterBase"),$.exports=N=function(y){O(m,y);function m(S){m.__super__.constructor.call(this,S)}return m.prototype.document=function(S,b){var p,d,t,l,r;for(b=this.filterOptions(b),l="",r=S.children,d=0,t=r.length;d","]]]]>"),this.assertLegalChar(y))},M.prototype.comment=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+y);return this.assertLegalChar(y)},M.prototype.raw=function(y){return this.options.noValidation?y:""+y||""},M.prototype.attValue=function(y){return this.options.noValidation?y:this.assertLegalChar(this.attEscape(y=""+y||""))},M.prototype.insTarget=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.insValue=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/\?>/))throw new Error("Invalid processing instruction value: "+y);return this.assertLegalChar(y)},M.prototype.xmlVersion=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+y);return y},M.prototype.xmlEncoding=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+y);return this.assertLegalChar(y)},M.prototype.xmlStandalone=function(y){return this.options.noValidation?y:y?"yes":"no"},M.prototype.dtdPubID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdSysID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdElementValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdAttType=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdAttDefault=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdEntityValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdNData=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.convertAttKey="@",M.prototype.convertPIKey="?",M.prototype.convertTextKey="#text",M.prototype.convertCDataKey="#cdata",M.prototype.convertCommentKey="#comment",M.prototype.convertRawKey="#raw",M.prototype.assertLegalChar=function(y){var m,S;if(this.options.noValidation)return y;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m))throw new Error("Invalid character in string: "+y+" at index "+S.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m)))throw new Error("Invalid character in string: "+y+" at index "+S.index);return y},M.prototype.assertLegalName=function(y){var m;if(this.options.noValidation)return y;if(this.assertLegalChar(y),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!y.match(m))throw new Error("Invalid character in name");return y},M.prototype.textEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&").replace(//g,">").replace(/\r/g," "))},M.prototype.attEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&").replace(/0)?new Array(h).join(w.indent):""},c.prototype.endline=function(f,w,_){return!w.pretty||w.suppressPrettyCount?"":w.newline},c.prototype.attribute=function(f,w,_){var h;return this.openAttribute(f,w,_),h=" "+f.name+'="'+f.value+'"',this.closeAttribute(f,w,_),h},c.prototype.cdata=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.comment=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.declaration=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.docType=function(f,w,_){var h,R,C,g,x;if(_||(_=0),this.openNode(f,w,_),w.state=v.OpenTag,g=this.indent(f,w,_),g+="0){for(g+=" [",g+=this.endline(f,w,_),w.state=v.InsideTag,x=f.children,R=0,C=x.length;R",g+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),g},c.prototype.element=function(f,w,_){var h,R,C,g,x,E,T,k,L,A,G,K,W,z;_||(_=0),A=!1,G="",this.openNode(f,w,_),w.state=v.OpenTag,G+=this.indent(f,w,_)+"<"+f.name,K=f.attribs;for(L in K){if(!a.call(K,L))continue;h=K[L],G+=this.attribute(h,w,_)}if(C=f.children.length,g=C===0?null:f.children[0],C===0||f.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))w.allowEmpty?(G+=">",w.state=v.CloseTag,G+=""+this.endline(f,w,_)):(w.state=v.CloseTag,G+=w.spaceBeforeSlash+"/>"+this.endline(f,w,_));else if(w.pretty&&C===1&&(g.type===N.Text||g.type===N.Raw)&&g.value!=null)G+=">",w.state=v.InsideTag,w.suppressPrettyCount++,A=!0,G+=this.writeChildNode(g,w,_+1),w.suppressPrettyCount--,A=!1,w.state=v.CloseTag,G+=""+this.endline(f,w,_);else{if(w.dontPrettyTextNodes){for(W=f.children,x=0,T=W.length;x"+this.endline(f,w,_),w.state=v.InsideTag,z=f.children,E=0,k=z.length;E",A&&w.suppressPrettyCount--,G+=this.endline(f,w,_),w.state=v.None}return this.closeNode(f,w,_),G},c.prototype.writeChildNode=function(f,w,_){switch(f.type){case N.CData:return this.cdata(f,w,_);case N.Comment:return this.comment(f,w,_);case N.Element:return this.element(f,w,_);case N.Raw:return this.raw(f,w,_);case N.Text:return this.text(f,w,_);case N.ProcessingInstruction:return this.processingInstruction(f,w,_);case N.Dummy:return"";case N.Declaration:return this.declaration(f,w,_);case N.DocType:return this.docType(f,w,_);case N.AttributeDeclaration:return this.dtdAttList(f,w,_);case N.ElementDeclaration:return this.dtdElement(f,w,_);case N.EntityDeclaration:return this.dtdEntity(f,w,_);case N.NotationDeclaration:return this.dtdNotation(f,w,_);default:throw new Error("Unknown XML node type: "+f.constructor.name)}},c.prototype.processingInstruction=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.raw=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.text=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdAttList=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdElement=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdEntity=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdNotation=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+""+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.openNode=function(f,w,_){},c.prototype.closeNode=function(f,w,_){},c.prototype.openAttribute=function(f,w,_){},c.prototype.closeAttribute=function(f,w,_){},c}()}).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(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d;d=F("./Utility"),b=d.assign,p=d.isFunction,O=F("./XMLDOMImplementation"),M=F("./XMLDocument"),y=F("./XMLDocumentCB"),S=F("./XMLStringWriter"),m=F("./XMLStreamWriter"),N=F("./NodeType"),v=F("./WriterState"),$.exports.create=function(t,l,r,i){var o,s;if(t==null)throw new Error("Root element needs a name.");return i=b({},l,r,i),o=new M(i),s=o.element(t),i.headless||(o.declaration(i),(i.pubID!=null||i.sysID!=null)&&o.dtd(i)),s},$.exports.begin=function(t,l,r){var i;return p(t)&&(i=[t,l],l=i[0],r=i[1],t={}),l?new y(t,l,r):new M(t)},$.exports.stringWriter=function(t){return new S(t)},$.exports.streamWriter=function(t,l){return new m(t,l)},$.exports.implementation=new O,$.exports.nodeType=N,$.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(F,$,j){$.exports=v;var N=Object.prototype.hasOwnProperty;function v(){for(var O={},M=0;My?t=d(t):t.length>5]|=128<>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,o=-1732584194,s=271733878,u=0;u>16)+(l>>16)+(r>>16);return i<<16|r&65535}function d(t,l){return t<>>32-l}$.exports=function(l){return N.hash(l,O,16)}},{"./helpers":285}],287:[function(F,$,j){"use strict";var N=F("./helpers");function v(S,b){S[b>>5]|=128<<24-b%32,S[(b+64>>9<<4)+15]=b;for(var p=Array(80),d=1732584193,t=-271733879,l=-1732584194,r=271733878,i=-1009589776,o=0;o>16)+(b>>16)+(p>>16);return d<<16|p&65535}function m(S,b){return S<>>32-b}$.exports=function(b){return N.hash(b,v,20,!0)}},{"./helpers":285}],288:[function(F,$,j){"use strict";$.exports=function(){return function(){}}},{}],289:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/helpers/typeof"),O=M(v);function M(d){return d&&d.__esModule?d:{default:d}}var y=F("stream"),m=y.Stream,S=F("../lib/common/utils/isArray"),b=S.isArray;$.exports.string=function(t){return typeof t=="string"},$.exports.array=b,$.exports.buffer=N.isBuffer;function p(d){return d instanceof m}$.exports.writableStream=function(t){return p(t)&&typeof t._write=="function"&&(0,O.default)(t._writableState)==="object"}}).call(this,{isBuffer:F("../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(F,$,j){"use strict";j.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(v){return N}},j.escape=F("escape-html"),j.timestamp=function(v){if(v){var O=v;return typeof O=="string"&&(O=Number(O)),String(v).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(F,$,j){(function(N,v){"use strict";var O=F("babel-runtime/core-js/json/stringify"),M=S(O),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(w){return w&&w.__esModule?w:{default:w}}var b=F("util"),p=F("url"),d=F("http"),t=F("https"),l=F("debug")("urllib"),r=F("humanize-ms"),i,o=0,s=Math.pow(2,31)-10,u=/^https?:\/\//i;function a(w,_){return w===void 0?_:w}function c(w,_){return function(h,R,C){if(h)return _(h);w({data:R,status:C.statusCode,headers:C.headers,res:C})}}j.TIMEOUTS=[r("300s"),r("300s")];var f=["json","text"];j.request=function(_,h,R){return arguments.length===2&&typeof h=="function"&&(R=h,h=null),typeof R=="function"?j.requestWithCallback(_,h,R):(i||(i=F("any-promise")),new i(function(C,g){j.requestWithCallback(_,h,c(C,g))}))},j.requestWithCallback=function(_,h,R){if(!_||typeof _!="string"&&(typeof _=="undefined"?"undefined":(0,m.default)(_))!=="object"){var C=b.format("expect request url to be a string or a http request options, but got %j",_);throw new Error(C)}arguments.length===2&&typeof h=="function"&&(R=h,h=null),h=h||{},o>=s&&(o=0);var g=++o;h.requestUrls=h.requestUrls||[];var x={requestId:g,url:_,args:h,ctx:h.ctx};h.emitter&&h.emitter.emit("request",x),h.timeout=h.timeout||j.TIMEOUTS,h.maxRedirects=h.maxRedirects||10,h.streaming=h.streaming||h.customResponse;var E=Date.now(),T;typeof _=="string"?(u.test(_)||(_="http://"+_),T=p.parse(_)):T=_;var k=(h.type||h.method||T.method||"GET").toUpperCase(),L=T.port||80,A=d,G=a(h.agent,j.agent),K=h.fixJSONCtlChars;T.protocol==="https:"&&(A=t,G=a(h.httpsAgent,j.httpsAgent),T.port||(L=443));var W={host:T.hostname||T.host||"localhost",path:T.path||"/",method:k,port:L,agent:G,headers:h.headers||{},lookup:h.lookup};Array.isArray(h.timeout)?W.requestTimeout=h.timeout[h.timeout.length-1]:typeof h.timeout!="undefined"&&(W.requestTimeout=h.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",g,_,De),h.headers=h.headers||{},h.headers.Authorization=digestAuthHeader(W.method,W.path,De,h.digestAuth),l("Request#%d %s: auth with digest header: %s",g,_,h.headers.Authorization),Ze.headers["set-cookie"]&&(h.headers.Cookie=Ze.headers["set-cookie"].join(";")),j.requestWithCallback(_,h,Ne)}var we=Date.now()-E;ne&&(ne.contentDownload=we),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",we,te,be,W.method,W.host,W.path,se,ne);var Ae={status:be,statusCode:be,headers:Ge,size:te,aborted:ee,rt:we,keepAliveSocket:se,data:Ve,requestUrls:h.requestUrls,timing:ne,remoteAddress:ie,remotePort:Ee};if(Oe){var de="";G&&typeof G.getCurrentStatus=="function"&&(de=", agent status: "+(0,M.default)(G.getCurrentStatus())),Oe.message+=", "+W.method+" "+_+" "+be+" (connected: "+oe+", keepalive socket: "+se+de+`) headers: `+(0,M.default)(Ge),Oe.data=Ve,Oe.path=W.path,Oe.status=be,Oe.headers=Ge,Oe.res=Ae}Ne(Oe,Ve,h.streaming?Ze:Ae),h.emitter&&(x.url=_,x.socket=rt&&rt.connection,x.options=W,x.size=ce,h.emitter.emit("response",{requestId:g,error:Oe,ctx:h.ctx,req:x,res:Ae}))}function me(Oe){var Ve=null;if(h.followRedirect&&statuses.redirect[Oe.statusCode]){h._followRedirectCount=(h._followRedirectCount||0)+1;var Ze=Oe.headers.location;if(!Ze)Ve=new Error("Got statusCode "+Oe.statusCode+" but cannot resolve next location from headers"),Ve.name="FollowRedirectError";else if(h._followRedirectCount>h.maxRedirects)Ve=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+_),Ve.name="MaxRedirectError";else{var Ne=h.formatRedirectUrl?h.formatRedirectUrl(_,Ze):p.resolve(_,Ze);l("Request#%d %s: `redirected` from %s to %s",g,W.path,_,Ne),X(),h.headers&&h.headers.Host&&u.test(Ze)&&(h.headers.Host=null);var Ge=R;return R=null,j.requestWithCallback(Ne,h,Ge),{redirect:!0,error:null}}}return{redirect:!1,error:Ve}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),h.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function fe(Oe,Ve,Ze){var Ne=Oe.headers["content-encoding"];return Ze(null,Ve,Ne)}var Te=h.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",g,k,_,W.headers,W.path),h.requestUrls.push(_);function ze(Oe){if(ne&&(ne.waiting=Date.now()-E),l("Request#%d %s `req response` event emit: status %d, headers: %j",g,_,Oe.statusCode,Oe.headers),h.streaming){var Ve=me(Oe);if(Ve.redirect){Oe.resume();return}return Ve.error?(Oe.resume(),Q(Ve.error,null,Oe)):Q(null,null,Oe)}if(Oe.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",g,_,te)}),Oe.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",g,_,te)}),Oe.on("aborted",function(){ee=!0,l("Request#%d %s: `res aborted` event emit, total size %d",g,_,te)}),Te){var Ve=me(Oe);if(Ve.redirect){Oe.resume();return}return Ve.error?(Oe.resume(),Te.end(),Q(Ve.error,null,Oe)):(h.consumeWriteStream===!1?Oe.on("end",Q.bind(null,null,null,Oe)):isNode010||isNode012?first([[Te,"close"],[Oe,"aborted"]],function(Ge,De,we){l("Request#%d %s: writeStream or res %s event emitted",g,_,we),Q(ge||null,null,Oe)}):Te.on("close",function(){l("Request#%d %s: writeStream close event emitted",g,_),Q(ge||null,null,Oe)}),Oe.pipe(Te))}var Ze=[];Oe.on("data",function(Ne){l("Request#%d %s: `res data` event emit, size %d",g,_,Ne.length),te+=Ne.length,Ze.push(Ne)}),Oe.on("end",function(){var Ne=v.concat(Ze,te);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",g,_,te,Oe._dumped),ge)return Q(ge,Ne,Oe);var Ge=me(Oe);if(Ge.error)return Q(Ge.error,Ne,Oe);if(Ge.redirect)return;fe(Oe,Ne,function(De,we,Ae){if(De)return Q(De,Ne,Oe);if(!Ae&&f.indexOf(h.dataType)>=0){try{we=decodeBodyByCharset(we,Oe)}catch(_e){return l("decodeBodyByCharset error: %s",_e),Q(null,we,Oe)}if(h.dataType==="json")if(te===0)we=null;else{var de=parseJSON(we,K);de.error?De=de.error:we=de.data}}ee&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",g,_),Q(De,we,Oe)})})}var Je,qe;Array.isArray(h.timeout)?(Je=r(h.timeout[0]),qe=r(h.timeout[1])):Je=qe=r(h.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",Je,qe);function Xe(){l("Connect timer ticking, timeout: %d",Je),ae=setTimeout(function(){ae=null,be===-1&&(be=-2);var Oe="Connect timeout for "+Je+"ms",Ve="ConnectionTimeoutError";rt.socket||(Ve="SocketAssignTimeoutError",Oe+=", working sockets is full"),ge=new Error(Oe),ge.name=Ve,ge.requestId=g,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",g,_,ge.name,Oe,oe),Le()},Je)}function et(){l("Response timer ticking, timeout: %d",qe),xe=setTimeout(function(){xe=null;var Oe="Response timeout for "+qe+"ms",Ve="ResponseTimeoutError";ge=new Error(Oe),ge.name=Ve,ge.requestId=g,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",g,_,ge.name,Oe,oe),Le()},qe)}var rt;W.mode=h.mode?h.mode:"";try{rt=A.request(W,ze)}catch(Oe){return Q(Oe)}typeof window=="undefined"?Xe():rt.on("requestTimeout",function(){be===-1&&(be=-2);var Oe="Connect timeout for "+Je+"ms",Ve="ConnectionTimeoutError";ge=new Error(Oe),ge.name=Ve,ge.requestId=g,Le()});function Le(){l("Request#%d %s abort, connected: %s",g,_,oe),rt.socket||(ge.noSocket=!0,Q(ge)),rt.abort()}return ne&&rt.on("finish",function(){ne.requestSent=Date.now()-E}),rt.once("socket",function(Oe){ne&&(ne.queuing=Date.now()-E),isNode010&&Oe.socket&&(Oe=Oe.socket);var Ve=Oe.readyState;if(Ve==="opening"){Oe.once("lookup",function(Ze,Ne,Ge){l("Request#%d %s lookup: %s, %s, %s",g,_,Ze,Ne,Ge),ne&&(ne.dnslookup=Date.now()-E),Ne&&(ie=Ne)}),Oe.once("connect",function(){ne&&(ne.connected=Date.now()-E),J(),et(),l("Request#%d %s new socket connected",g,_),oe=!0,ie||(ie=Oe.remoteAddress),Ee=Oe.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",g,_,Ve),oe=!0,se=!0,ie||(ie=Oe.remoteAddress),Ee=Oe.remotePort,J(),et()}),rt.on("error",function(Oe){(Oe.name==="Error"||Oe.name==="TypeError")&&(Oe.name=oe?"ResponseError":"RequestError"),Oe.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",g,_,Oe.name,Oe.message),Q(ge||Oe)}),Te&&Te.once("error",function(Oe){Oe.message+=' (writeStream "error")',ge=Oe,l("Request#%d %s `writeStream error` event emit, %s: %s",g,_,Oe.name,Oe.message),Le()}),h.stream?(h.stream.pipe(rt),h.stream.once("error",function(Oe){Oe.message+=' (stream "error")',ge=Oe,l("Request#%d %s `readStream error` event emit, %s: %s",g,_,Oe.name,Oe.message),Le()})):rt.end(V),rt.requestId=g,rt}}).call(this,F("_process"),F("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(F,$,j){"use strict";j.d($,"a",function(){return b});var N=j("cDcd"),v=j("biw7"),O=j("fyJ8");function M(p){var d=p.className,t=p.index,l=p.children,r=p.colSpan,i=p.rowSpan,o=N.useContext(v.a),s=o.prefixCls,u=o.fixedInfoList,a=u[t];return N.createElement(O.a,Object.assign({className:d,index:t,component:"td",prefixCls:s,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},a))}function y(p){return N.createElement("tr",Object.assign({},p))}function m(p){var d=p.children,t=N.useContext(v.a),l=t.prefixCls;return N.createElement("tfoot",{className:"".concat(l,"-summary")},d)}var S=$.b=m,b={Cell:M,Row:y}},nj2k:function(F,$,j){F.exports=j.p+"static/nodata.c3b0b86c.svg"},oRuE:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(v,O){var M=O*4,y=M-v.sigBytes%M;v.concat(N.lib.WordArray.random(y-1)).concat(N.lib.WordArray.create([y<<24],1))},unpad:function(v){var O=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=O}},N.pad.Iso10126})},osHv:function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v=N.Pos;function O(u,a){return u.line-a.line||u.ch-a.ch}var M="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",y=M+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+M+"]["+y+"]*)","g");function S(u,a,c,f){this.line=a,this.ch=c,this.cm=u,this.text=u.getLine(a),this.min=f?Math.max(f.from,u.firstLine()):u.firstLine(),this.max=f?Math.min(f.to-1,u.lastLine()):u.lastLine()}function b(u,a){var c=u.cm.getTokenTypeAt(v(u.line,a));return c&&/\btag\b/.test(c)}function p(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function d(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function t(u){for(;;){var a=u.text.indexOf(">",u.ch);if(a==-1){if(p(u))continue;return}if(!b(u,a+1)){u.ch=a+1;continue}var c=u.text.lastIndexOf("/",a),f=c>-1&&!/\S/.test(u.text.slice(c+1,a));return u.ch=a+1,f?"selfClose":"regular"}}function l(u){for(;;){var a=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(a==-1){if(d(u))continue;return}if(!b(u,a+1)){u.ch=a;continue}m.lastIndex=a,u.ch=a;var c=m.exec(u.text);if(c&&c.index==a)return c}}function r(u){for(;;){m.lastIndex=u.ch;var a=m.exec(u.text);if(!a){if(p(u))continue;return}if(!b(u,a.index+1)){u.ch=a.index+1;continue}return u.ch=a.index+a[0].length,a}}function i(u){for(;;){var a=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(a==-1){if(d(u))continue;return}if(!b(u,a+1)){u.ch=a;continue}var c=u.text.lastIndexOf("/",a),f=c>-1&&!/\S/.test(u.text.slice(c+1,a));return u.ch=a+1,f?"selfClose":"regular"}}function o(u,a){for(var c=[];;){var f=r(u),w,_=u.line,h=u.ch-(f?f[0].length:0);if(!f||!(w=t(u)))return;if(w=="selfClose")continue;if(f[1]){for(var R=c.length-1;R>=0;--R)if(c[R]==f[2]){c.length=R;break}if(R<0&&(!a||a==f[2]))return{tag:f[2],from:v(_,h),to:v(u.line,u.ch)}}else c.push(f[2])}}function s(u,a){for(var c=[];;){var f=i(u);if(!f)return;if(f=="selfClose"){l(u);continue}var w=u.line,_=u.ch,h=l(u);if(!h)return;if(h[1])c.push(h[2]);else{for(var R=c.length-1;R>=0;--R)if(c[R]==h[2]){c.length=R;break}if(R<0&&(!a||a==h[2]))return{tag:h[2],from:v(u.line,u.ch),to:v(w,_)}}}}N.registerHelper("fold","xml",function(u,a){for(var c=new S(u,a.line,0);;){var f=r(c);if(!f||c.line!=a.line)return;var w=t(c);if(!w)return;if(!f[1]&&w!="selfClose"){var _=v(c.line,c.ch),h=o(c,f[2]);return h&&O(h.from,_)>0?{from:_,to:h.from}:null}}}),N.findMatchingTag=function(u,a,c){var f=new S(u,a.line,a.ch,c);if(f.text.indexOf(">")==-1&&f.text.indexOf("<")==-1)return;var w=t(f),_=w&&v(f.line,f.ch),h=w&&l(f);if(!w||!h||O(f,a)>0)return;var R={from:v(f.line,f.ch),to:_,tag:h[2]};return w=="selfClose"?{open:R,close:null,at:"open"}:h[1]?{open:s(f,h[2]),close:R,at:"close"}:(f=new S(u,_.line,_.ch,c),{open:R,close:o(f,h[2]),at:"open"})},N.findEnclosingTag=function(u,a,c,f){for(var w=new S(u,a.line,a.ch,c);;){var _=s(w,f);if(!_)break;var h=new S(u,a.line,a.ch,c),R=o(h,_.tag);if(R)return{open:_,close:R}}},N.scanForClosingTag=function(u,a,c,f){var w=new S(u,a.line,a.ch,f?{from:0,to:f}:null);return o(w,c)}})},p5ED:function(F,$,j){"use strict";var N=j("+L6B"),v=j("2/Rp"),O=j("5Dmo"),M=j("3S7+"),y=j("k1fw"),m=j("tJVT"),S=j("cDcd"),b=j.n(S),p=j("vHTk"),d=j.n(p),t=j("yEEn"),l=j("ZW9T"),r=j("1vsH");$.a=function(i){var o=i.name,s=i.data,u=i.theme,a=i.type,c=i.filename,f=i.monacoEditor,w=i.className,_=i.style,h=i.close,R=i.onClose,C=i.hasMask,g=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(m.a)(g,2),E=x[0],T=x[1],k=Object(S.useState)(""),L=Object(m.a)(k,2),A=L[0],G=L[1],K,W=1024*1024,z=10*W,U=Object(S.useRef)();a==="office"&&(K=Object(r.V)(s).filesize,K>z&&(a="other")),c&&(f.filename=c),Object(S.useEffect)(function(){var V,q,Z=(V=document.cookie)===null||V===void 0||((q=V.replace(/\s/g,""))===null||q===void 0)?void 0:q.split(";");Z==null||Z.map(function(ce){var he=ce.split("=");he[0]==="_educoder_session"&&G(he[1])})},[]);var P=function(){if(s.startsWith("http")||s.startsWith("/")){H();return}Object(r.z)(c||"educoder",s,c)},H=function(){Object(r.x)(c||o,s)};return console.log("data:",s,"fileanme:",c," name:",o),b.a.createElement("div",{style:Object(y.a)({},_||{}),className:"".concat(C&&d.a.bgBlack," ").concat(a?d.a.wrp:"hide")},h&&b.a.createElement("div",{className:d.a.close,ref:U},b.a.createElement(M.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return U.current}},b.a.createElement("span",{onClick:H},b.a.createElement("i",{className:"icon-quxiaozhiding"}))),b.a.createElement(M.a,{title:"\u5173\u95ED",getPopupContainer:function(){return U.current}},b.a.createElement("span",{className:"",onClick:R},b.a.createElement("i",{className:"icon-guanbi1"})))),b.a.createElement("div",{className:"".concat(d.a[w]," ").concat(w," ").concat(d.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&b.a.createElement(l.b,f)),a==="audio"&&b.a.createElement("audio",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?s:"data:audio/mp3;base64,").concat(s),autoPlay:!0}),a==="video"&&b.a.createElement(b.a.Fragment,null,s!=null&&s.startsWith("/")?b.a.createElement("video",{controls:!0,src:"".concat(s),autoPlay:!0}):b.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(s),autoPlay:!0})),a==="html"&&b.a.createElement("iframe",{src:s+"&disposition=inline"}),a==="pdf"&&b.a.createElement("embed",{className:d.a.embed,src:s}),a==="image"&&b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(s)})),a==="other"&&b.a.createElement("div",null,b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(F,$,j){},pA7S:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=O.BlockCipher,m=v.algo,S=[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],b=[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],p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{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}],t=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=m.DES=y.extend({_doReset:function(){for(var s=this._key,u=s.words,a=[],c=0;c<56;c++){var f=S[c]-1;a[c]=u[f>>>5]>>>31-f%32&1}for(var w=this._subKeys=[],_=0;_<16;_++){for(var h=w[_]=[],R=p[_],c=0;c<24;c++)h[c/6|0]|=a[(b[c]-1+R)%28]<<31-c%6,h[4+(c/6|0)]|=a[28+(b[c+24]-1+R)%28]<<31-c%6;h[0]=h[0]<<1|h[0]>>>31;for(var c=1;c<7;c++)h[c]=h[c]>>>(c-1)*4+3;h[7]=h[7]<<5|h[7]>>>27}for(var C=this._invSubKeys=[],c=0;c<16;c++)C[c]=w[15-c]},encryptBlock:function(s,u){this._doCryptBlock(s,u,this._subKeys)},decryptBlock:function(s,u){this._doCryptBlock(s,u,this._invSubKeys)},_doCryptBlock:function(s,u,a){this._lBlock=s[u],this._rBlock=s[u+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var c=0;c<16;c++){for(var f=a[c],w=this._lBlock,_=this._rBlock,h=0,R=0;R<8;R++)h|=d[R][((_^f[R])&t[R])>>>0];this._lBlock=_,this._rBlock=w^h}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),s[u]=this._lBlock,s[u+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(s,u){var a=(this._lBlock>>>s^this._rBlock)&u;this._rBlock^=a,this._lBlock^=a<>>s^this._lBlock)&u;this._lBlock^=a,this._rBlock^=a<192.");var a=u.slice(0,2),c=u.length<4?u.slice(0,2):u.slice(2,4),f=u.length<6?u.slice(0,2):u.slice(4,6);this._des1=l.createEncryptor(M.create(a)),this._des2=l.createEncryptor(M.create(c)),this._des3=l.createEncryptor(M.create(f))},encryptBlock:function(s,u){this._des1.encryptBlock(s,u),this._des2.decryptBlock(s,u),this._des3.encryptBlock(s,u)},decryptBlock:function(s,u){this._des3.decryptBlock(s,u),this._des2.encryptBlock(s,u),this._des1.decryptBlock(s,u)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=y._createHelper(o)}(),N.TripleDES})},psGv:function(F,$,j){var N,v;(function(){var O;(function(){"use strict";var S=[,,function(t){function l(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var o=new l(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},l.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},l.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},l.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(` `);s!==-1?this.__character_count=o.length-s:this.__character_count+=o.length},l.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function r(o,s){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),s=s||"",o.indent_level>0&&(s=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}r.prototype.get_indent_size=function(o,s){var u=this.__base_string_length;return s=s||0,o<0&&(u=0),u+=o*this.__indent_size,u+=s,u},r.prototype.get_indent_string=function(o,s){var u=this.__base_string;return s=s||0,o<0&&(o=0,u=""),s+=o*this.__indent_size,this.__ensure_cache(s),u+=this.__cache[s],u},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,s=0,u="";this.__indent_size&&o>=this.__indent_size&&(s=Math.floor(o/this.__indent_size),o-=s*this.__indent_size,u=new Array(s+1).join(this.__indent_string)),o&&(u+=new Array(o+1).join(" ")),this.__cache.push(u)};function i(o,s){this.__indent_cache=new r(o,s),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(o,s){return this.__indent_cache.get_indent_string(o,s)},i.prototype.get_indent_size=function(o,s){return this.__indent_cache.get_indent_size(o,s)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(o){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===` `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(` `);return o!==` `&&(u=u.replace(/[\n]/g,o)),u},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(o,s){return o=o||0,s=s||0,this.next_line.set_indent(o,s),this.__lines.length>1?(this.current_line.set_indent(o,s),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(o){for(var s=0;s1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(o,s){for(var u=this.__lines.length-2;u>=0;){var a=this.__lines[u];if(a.is_empty())break;if(a.item(0).indexOf(o)!==0&&a.item(-1)!==s){this.__lines.splice(u+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},t.exports.Output=i},function(t){function l(r,i,o,s){this.type=r,this.text=i,this.comments_before=null,this.newlines=o||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=l},,,function(t){function l(o,s){this.raw_options=r(o,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(o,s){var u=this.raw_options[o],a=s||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(a=u.concat()):typeof u=="string"&&(a=u.split(/[^a-zA-Z0-9_\/\-]+/)),a},l.prototype._get_boolean=function(o,s){var u=this.raw_options[o],a=u===void 0?!!s:!!u;return a},l.prototype._get_characters=function(o,s){var u=this.raw_options[o],a=s||"";return typeof u=="string"&&(a=u.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),a},l.prototype._get_number=function(o,s){var u=this.raw_options[o];s=parseInt(s,10),isNaN(s)&&(s=0);var a=parseInt(u,10);return isNaN(a)&&(a=s),a},l.prototype._get_selection=function(o,s,u){var a=this._get_selection_list(o,s,u);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+s+` You passed in: '`+this.raw_options[o]+"'");return a[0]},l.prototype._get_selection_list=function(o,s,u){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[s[0]],!this._is_valid_selection(u,s))throw new Error("Invalid Default Value!");var a=this._get_array(o,u);if(!this._is_valid_selection(a,s))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+s+` You passed in: '`+this.raw_options[o]+"'");return a},l.prototype._is_valid_selection=function(o,s){return o.length&&s.length&&!o.some(function(u){return s.indexOf(u)===-1})};function r(o,s){var u={};o=i(o);var a;for(a in o)a!==s&&(u[a]=o[a]);if(s&&o[s])for(a in o[s])u[a]=o[s][a];return u}function i(o){var s={},u;for(u in o){var a=u.replace(/-/g,"_");s[a]=o[u]}return s}t.exports.Options=l,t.exports.normalizeOpts=i,t.exports.mergeOpts=r},,function(t){var l=RegExp.prototype.hasOwnProperty("sticky");function r(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&i=0&&o=i.length&&this.__input.substring(o-i.length,o).toLowerCase()===i},t.exports.InputScanner=r},function(t,l,r){var i=r(8).InputScanner,o=r(3).Token,s=r(10).TokenStream,u=r(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(f,w){this._input=new i(f),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var f,w=new o(a.START,""),_=null,h=[],R=new s;w.type!==a.EOF;){for(f=this._get_next_token(w,_);this._is_comment(f);)R.add(f),f=this._get_next_token(w,_);R.isEmpty()||(f.comments_before=R,R=new s),f.parent=_,this._is_opening(f)?(h.push(_),_=f):_&&this._is_closing(f,_)&&(f.opened=_,_.closed=f,_=h.pop(),f.parent=_),f.previous=w,w.next=f,this.__tokens.add(f),w=f}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(f,w){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(a.RAW,_):this._create_token(a.EOF,"")},c.prototype._is_comment=function(f){return!1},c.prototype._is_opening=function(f){return!1},c.prototype._is_closing=function(f,w){return!1},c.prototype._create_token=function(f,w){var _=new o(f,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=c,t.exports.TOKEN=a},function(t){function l(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position=0&&r/),erb:c.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:c.starting_with(/{%/).until_after(/%}/),django_value:c.starting_with(/{{/).until_after(/}}/),django_comment:c.starting_with(/{#/).until_after(/#}/),smarty:c.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:c.starting_with(/{\*/).until_after(/\*}/),smarty_literal:c.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(u){var a=this._create();return a._disabled[u]=!0,a._update(),a},s.prototype.read_options=function(u){var a=this._create();for(var c in o)a._disabled[c]=u.templating.indexOf(c)===-1;return a._update(),a},s.prototype.exclude=function(u){var a=this._create();return a._excluded[u]=!0,a._update(),a},s.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),u+=a,a=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},s.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},s.prototype._read_template=function(){var u="",a=this._input.peek();if(a==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(u=u||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},t.exports.TemplatablePattern=s},,,,function(t,l,r){var i=r(19).Beautifier,o=r(20).Options;function s(u,a,c,f){var w=new i(u,a,c,f);return w.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new o}},function(t,l,r){var i=r(20).Options,o=r(2).Output,s=r(21).Tokenizer,u=r(21).TOKEN,a=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,f=function(k,L){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=k.max_preserve_newlines,this.preserve_newlines=k.preserve_newlines,this._output=new o(k,L)};f.prototype.current_line_has_match=function(k){return this._output.current_line.has_match(k)},f.prototype.set_space_before_token=function(k,L){this._output.space_before_token=k,this._output.non_breaking_space=L},f.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},f.prototype.add_raw_token=function(k){this._output.add_raw_token(k)},f.prototype.print_preserved_newlines=function(k){var L=0;k.type!==u.TEXT&&k.previous.type!==u.TEXT&&(L=k.newlines?1:0),this.preserve_newlines&&(L=k.newlines0);return L!==0},f.prototype.traverse_whitespace=function(k){return k.whitespace_before||k.newlines?(this.print_preserved_newlines(k)||(this._output.space_before_token=!0),!0):!1},f.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},f.prototype.print_newline=function(k){this._output.add_new_line(k)},f.prototype.print_token=function(k){k.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(k.text))},f.prototype.indent=function(){this.indent_level++},f.prototype.get_full_indent=function(k){return k=this.indent_level+(k||0),k<1?"":this._output.get_indent_string(k)};var w=function(k){for(var L=null,A=k.next;A.type!==u.EOF&&k.closed!==A;){if(A.type===u.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===u.EQUALS&&A.next.next&&A.next.next.type===u.VALUE&&(L=A.next.next.text);break}A=A.next}return L},_=function(k,L){var A=null,G=null;return L.closed?(k==="script"?A="text/javascript":k==="style"&&(A="text/css"),A=w(L)||A,A.search("text/css")>-1?G="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":A.search(/test\/null/)>-1&&(G="null"),G):null};function h(k,L){return L.indexOf(k)!==-1}function R(k,L,A){this.parent=k||null,this.tag=L?L.tag_name:"",this.indent_level=A||0,this.parser_token=L||null}function C(k){this._printer=k,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(k){var L=new R(this._current_frame,k,this._printer.indent_level);this._current_frame=L},C.prototype._try_pop_frame=function(k){var L=null;return k&&(L=k.parser_token,this._printer.indent_level=k.indent_level,this._current_frame=k.parent),L},C.prototype._get_frame=function(k,L){for(var A=this._current_frame;A&&!(k.indexOf(A.tag)!==-1);){if(L&&L.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},C.prototype.try_pop=function(k,L){var A=this._get_frame([k],L);return this._try_pop_frame(A)},C.prototype.indent_to_tag=function(k){var L=this._get_frame(k);L&&(this._printer.indent_level=L.indent_level)};function g(k,L,A,G){this._source_text=k||"",L=L||{},this._js_beautify=A,this._css_beautify=G,this._tag_stack=null;var K=new i(L,"html");this._options=K,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,L=this._options.eol;this._options.eol==="auto"&&(L=` `,k&&a.test(k)&&(L=k.match(a)[0])),k=k.replace(c,` `);var A=k.match(/^[\t ]*/)[0],G={text:"",type:""},K=new x,W=new f(this._options,A),z=new s(k,this._options).tokenize();this._tag_stack=new C(W);for(var U=null,P=z.next();P.type!==u.EOF;)P.type===u.TAG_OPEN||P.type===u.COMMENT?(U=this._handle_tag_open(W,P,K,G),K=U):P.type===u.ATTRIBUTE||P.type===u.EQUALS||P.type===u.VALUE||P.type===u.TEXT&&!K.tag_complete?U=this._handle_inside_tag(W,P,K,z):P.type===u.TAG_CLOSE?U=this._handle_tag_close(W,P,K):P.type===u.TEXT?U=this._handle_text(W,P,K):W.add_raw_token(P),G=U,P=z.next();var H=W._output.get_code(L);return H},g.prototype._handle_tag_close=function(k,L,A){var G={text:L.text,type:L.type};return k.alignment_size=0,A.tag_complete=!0,k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted?k.add_raw_token(L):(A.tag_start_char==="<"&&(k.set_space_before_token(L.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&k.print_newline(!1)),k.print_token(L)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(k.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&k.set_wrap_point(),G},g.prototype._handle_inside_tag=function(k,L,A,G){var K=A.has_wrapped_attrs,W={text:L.text,type:L.type};if(k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted)k.add_raw_token(L);else if(A.tag_start_char==="{"&&L.type===u.TEXT)k.print_preserved_newlines(L)?(L.newlines=0,k.add_raw_token(L)):k.print_token(L);else{if(L.type===u.ATTRIBUTE?(k.set_space_before_token(!0),A.attr_count+=1):(L.type===u.EQUALS||L.type===u.VALUE&&L.previous.type===u.EQUALS)&&k.set_space_before_token(!1),L.type===u.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(k.traverse_whitespace(L),K=K||L.newlines!==0),this._is_wrap_attributes_force)){var z=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,P=0,H;do{if(H=G.peek(P),H.type===u.ATTRIBUTE){U=!1;break}P+=1}while(P<4&&H.type!==u.EOF&&H.type!==u.TAG_CLOSE);z=!U}z&&(k.print_newline(!1),K=!0)}k.print_token(L),K=K||k.previous_token_wrapped(),A.has_wrapped_attrs=K}return W},g.prototype._handle_text=function(k,L,A){var G={text:L.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(k,L,A):A.is_unformatted||A.is_content_unformatted?k.add_raw_token(L):(k.traverse_whitespace(L),k.print_token(L)),G},g.prototype._print_custom_beatifier_text=function(k,L,A){var G=this;if(L.text!==""){var K=L.text,W,z=1,U="",P="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?W=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?W=this._css_beautify:A.custom_beautifier_name==="html"&&(W=function(he,ae){var xe=new g(he,ae,G._js_beautify,G._css_beautify);return xe.beautify()}),this._options.indent_scripts==="keep"?z=0:this._options.indent_scripts==="separate"&&(z=-k.indent_level);var H=k.get_full_indent(z);if(K=K.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&K[0]==="<"&&K.match(/^(|]]>)$/.exec(K);if(!V){k.add_raw_token(L);return}U=H+V[1]+` `,K=V[4],V[5]&&(P=H+V[5]),K=K.replace(/\n[ \t]*$/,""),(V[2]||V[3].indexOf(` `)!==-1)&&(V=V[3].match(/[ \t]+$/),V&&(L.whitespace_before=V[0]))}if(K)if(W){var q=function(){this.eol=` `};q.prototype=this._options.raw_options;var Z=new q;K=W(H+K,Z)}else{var ce=L.whitespace_before;ce&&(K=K.replace(new RegExp(` (`+ce+")?","g"),` `)),K=H+K.replace(/\n/g,` `+H)}U&&(K?K=U+K+` `+P:K=U+P),k.print_newline(!1),K&&(L.text=K,L.whitespace_before="",L.newlines=0,k.add_raw_token(L),k.print_newline(!0))}},g.prototype._handle_tag_open=function(k,L,A,G){var K=this._get_tag_open_token(L);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&L.type===u.TAG_OPEN&&L.text.indexOf("]*)/),this.tag_check=A?A[1]:""):(A=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===u.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||L.closed&&L.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(G=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};g.prototype._get_tag_open_token=function(k){var L=new x(this._tag_stack.get_parser_token(),k);return L.alignment_size=this._options.wrap_attributes_indent_size,L.is_end_tag=L.is_end_tag||h(L.tag_check,this._options.void_elements),L.is_empty_element=L.tag_complete||L.is_start_tag&&L.is_end_tag,L.is_unformatted=!L.tag_complete&&h(L.tag_check,this._options.unformatted),L.is_content_unformatted=!L.is_empty_element&&h(L.tag_check,this._options.content_unformatted),L.is_inline_element=h(L.tag_name,this._options.inline)||L.tag_name.includes("-")||L.tag_start_char==="{",L},g.prototype._set_tag_position=function(k,L,A,G,K){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||k.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=_(A.tag_check,L)))),h(A.tag_check,this._options.extra_liners)&&(k.print_newline(!1),k._output.just_added_blankline()||k.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var W=k.current_line_has_match(/{{#if/);W||k.print_newline(!1)}A.tag_name==="!--"&&K.type===u.TAG_CLOSE&&G.is_end_tag&&A.text.indexOf(` `)===-1||(A.is_inline_element||A.is_unformatted||k.print_newline(!1),this._calcluate_parent_multiline(k,A))}else if(A.is_end_tag){var z=!1;z=A.start_tag_token&&A.start_tag_token.multiline_content,z=z||!A.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(K.type===u.TAG_CLOSE&&A.start_tag_token===G)&&K.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(z=!1),z&&k.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(K.type!=="TK_CONTENT"||A.is_content_unformatted)&&k.print_newline(!1),this._calcluate_parent_multiline(k,A)},g.prototype._calcluate_parent_multiline=function(k,L){L.parent&&k._output.just_added_newline()&&!((L.is_inline_element||L.is_unformatted)&&L.parent.is_inline_element)&&(L.parent.multiline_content=!0)};var E=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(k){var L=null;if(k.is_empty_element||!k.is_start_tag||!k.parent)return;if(k.tag_name==="body")L=L||this._tag_stack.try_pop("head");else if(k.tag_name==="li")L=L||this._tag_stack.try_pop("li",["ol","ul"]);else if(k.tag_name==="dd"||k.tag_name==="dt")L=L||this._tag_stack.try_pop("dt",["dl"]),L=L||this._tag_stack.try_pop("dd",["dl"]);else if(k.parent.tag_name==="p"&&E.indexOf(k.tag_name)!==-1){var A=k.parent.parent;(!A||T.indexOf(A.tag_name)===-1)&&(L=L||this._tag_stack.try_pop("p"))}else k.tag_name==="rp"||k.tag_name==="rt"?(L=L||this._tag_stack.try_pop("rt",["ruby","rtc"]),L=L||this._tag_stack.try_pop("rp",["ruby","rtc"])):k.tag_name==="optgroup"?L=L||this._tag_stack.try_pop("optgroup",["select"]):k.tag_name==="option"?L=L||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):k.tag_name==="colgroup"?L=L||this._tag_stack.try_pop("caption",["table"]):k.tag_name==="thead"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"])):k.tag_name==="tbody"||k.tag_name==="tfoot"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("thead",["table"]),L=L||this._tag_stack.try_pop("tbody",["table"])):k.tag_name==="tr"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(k.tag_name==="th"||k.tag_name==="td")&&(L=L||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),L=L||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return k.parent=this._tag_stack.get_parser_token(),L},t.exports.Beautifier=g},function(t,l,r){var i=r(6).Options;function o(s){i.call(this,s,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new i,t.exports.Options=o},function(t,l,r){var i=r(9).Tokenizer,o=r(9).TOKEN,s=r(13).Directives,u=r(14).TemplatablePattern,a=r(12).Pattern,c={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},f=new s(/<\!--/,/-->/),w=function(_,h){i.call(this,_,h),this._current_tag_name="";var R=new u(this._input).read_options(this._options),C=new a(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(//),cdata:C.starting_with(//),conditional_comment:C.starting_with(//),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(g).until_after(g)}};w.prototype=new i,w.prototype._is_comment=function(_){return!1},w.prototype._is_opening=function(_){return _.type===c.TAG_OPEN},w.prototype._is_closing=function(_,h){return _.type===c.TAG_CLOSE&&h&&((_.text===">"||_.text==="/>")&&h.text[0]==="<"||_.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")},w.prototype._reset=function(){this._current_tag_name=""},w.prototype._get_next_token=function(_,h){var R=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(c.EOF,""):(R=R||this._read_open_handlebars(C,h),R=R||this._read_attribute(C,_,h),R=R||this._read_close(C,h),R=R||this._read_raw_content(C,_,h),R=R||this._read_content_word(C),R=R||this._read_comment_or_cdata(C),R=R||this._read_processing(C),R=R||this._read_open(C,h),R=R||this._create_token(c.UNKNOWN,this._input.next()),R)},w.prototype._read_comment_or_cdata=function(_){var h=null,R=null,C=null;if(_==="<"){var g=this._input.peek(1);g==="!"&&(R=this.__patterns.comment.read(),R?(C=f.get_directives(R),C&&C.ignore==="start"&&(R+=f.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(h=this._create_token(c.COMMENT,R),h.directives=C)}return h},w.prototype._read_processing=function(_){var h=null,R=null,C=null;if(_==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(h=this._create_token(c.COMMENT,R),h.directives=C)}return h},w.prototype._read_open=function(_,h){var R=null,C=null;return h||_==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),C=this._create_token(c.TAG_OPEN,R)),C},w.prototype._read_open_handlebars=function(_,h){var R=null,C=null;return h||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),C=this._create_token(c.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),C=this._create_token(c.TAG_OPEN,R))),C},w.prototype._read_close=function(_,h){var R=null,C=null;return h&&(h.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(R=this._input.next(),_==="/"&&(R+=this._input.next()),C=this._create_token(c.TAG_CLOSE,R)):h.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(c.TAG_CLOSE,"}}"))),C},w.prototype._read_attribute=function(_,h,R){var C=null,g="";if(R&&R.text[0]==="<")if(_==="=")C=this._create_token(c.EQUALS,this._input.next());else if(_==='"'||_==="'"){var x=this._input.next();_==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),C=this._create_token(c.VALUE,x)}else g=this.__patterns.attribute.read(),g&&(h.type===c.EQUALS?C=this._create_token(c.VALUE,g):C=this._create_token(c.ATTRIBUTE,g));return C},w.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},w.prototype._read_raw_content=function(_,h,R){var C="";if(R&&R.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(h.type===c.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var g=h.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var x=this._read_comment_or_cdata(_);if(x)return x.type=c.TEXT,x;C=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(g)&&(C=this._input.readUntil(new RegExp("","ig")))}return C?this._create_token(c.TEXT,C):null},w.prototype._read_content_word=function(_){var h="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(h=this.__patterns.unformatted_content_delimiter.read())),h||(h=this.__patterns.word.read()),h)return this._create_token(c.TEXT,h)},t.exports.Tokenizer=w,t.exports.TOKEN=c}],b={};function p(t){var l=b[t];if(l!==void 0)return l.exports;var r=b[t]={exports:{}};return S[t](r,r.exports,p),r.exports}var d=p(18);O=d})();var M=O;if(!0)!(N=[j,j("6UM0"),j("TXwP")],v=function(S){var b=j("6UM0"),p=j("TXwP");return{html_beautify:function(d,t){return M(d,t,b.js_beautify,p.css_beautify)}}}.apply($,N),v!==void 0&&(F.exports=v));else var y,m})()},qBft:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(v,O){var M=v.sigBytes,y=O*4,m=y-M%y,S=M+m-1;v.clamp(),v.words[S>>>2]|=m<<24-S%4*8,v.sigBytes+=m},unpad:function(v){var O=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=O}},N.pad.Ansix923})},qM6L:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Utf16=y.Utf16BE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l>>2]>>>16-l%4*8&65535;t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t>>1]|=b.charCodeAt(t)<<16-t%2*16;return M.create(d,p*2)}};y.Utf16LE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l>>2]>>>16-l%4*8&65535);t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t>>1]|=S(b.charCodeAt(t)<<16-t%2*16);return M.create(d,p*2)}};function S(b){return b<<8&4278255360|b>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return N.mode.CTRGladman=function(){var v=N.lib.BlockCipherMode.extend();function O(m){if((m>>24&255)===255){var S=m>>16&255,b=m>>8&255,p=m&255;S===255?(S=0,b===255?(b=0,p===255?p=0:++p):++b):++S,m=0,m+=S<<16,m+=b<<8,m+=p}else m+=1<<24;return m}function M(m){return(m[0]=O(m[0]))===0&&(m[1]=O(m[1])),m}var y=v.Encryptor=v.extend({processBlock:function(m,S){var b=this._cipher,p=b.blockSize,d=this._iv,t=this._counter;d&&(t=this._counter=d.slice(0),this._iv=void 0),M(t);var l=t.slice(0);b.encryptBlock(l,0);for(var r=0;r=O.length?{done:!0}:{done:!1,value:O[m++]}},e:function(l){throw l},f:S}}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 b=!0,p=!1,d;return{s:function(){y=O[Symbol.iterator]()},n:function(){var l=y.next();return b=l.done,l},e:function(l){p=!0,d=l},f:function(){try{!b&&y.return!=null&&y.return()}finally{if(p)throw d}}}}},rUJ1:function(F,$){const j=/[&<>"']/,N=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,M={"&":"&","<":"<",">":">",'"':""","'":"'"},y=C=>M[C];function m(C,g){if(g){if(j.test(C))return C.replace(N,y)}else if(v.test(C))return C.replace(O,y);return C}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(C){return C.replace(S,(g,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const p=/(^|[^\[])\^/g;function d(C,g){C=C.source||C,g=g||"";const x={replace:(E,T)=>(T=T.source||T,T=T.replace(p,"$1"),C=C.replace(E,T),x),getRegex:()=>new RegExp(C,g)};return x}const t=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(C,g,x){if(C){let E;try{E=decodeURIComponent(b(x)).replace(t,"").toLowerCase()}catch(T){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}g&&!l.test(x)&&(x=a(g,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(E){return null}return x}const i={},o=/^[^:]+:\/*[^/]*$/,s=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(C,g){i[" "+C]||(o.test(C)?i[" "+C]=C+"/":i[" "+C]=_(C,"/",!0)),C=i[" "+C];const x=C.indexOf(":")===-1;return g.substring(0,2)==="//"?x?g:C.replace(s,"$1")+g:g.charAt(0)==="/"?x?g:C.replace(u,"$1")+g:C+g}const c={exec:function(){}};function f(C){let g=1,x,E;for(;g{let G=!1,K=L;for(;--K>=0&&A[K]==="\\";)G=!G;return G?"|":" |"}),E=x.split(/ \|/);let T=0;if(E.length>g)E.splice(g);else for(;E.length0&&(Rt.children=[],be(Bt,Rt.children))})}function ee(yt,St){for(var vt=[],yr=0;yr0){vt[0]=Bt.id;for(var Rt=0;Rt0&&Kt[0]!==void 0?Kt[0]:"",$r(!0),Sr.next=4,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:vt,search:nn}});case 4:qt=Sr.sent,bn(qt.tag_disciplines||[]),$r(!1);case 7:case"end":return Sr.stop()}},lr)}));return function(){return Wr.apply(this,arguments)}}(),sn=function(lr){var nn=lr.name;z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{defaultValue:nn,placeholder:"\u8BF7\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Kt){nn=Kt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var qt=Object(E.a)(V.a.mark(function er(){var Sr;return V.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(nn){Gr.next=3;break}return x.b.warn("\u9898\u76EE".concat(hn,"\u4E0D\u80FD\u4E3A\u7A7A")),Gr.abrupt("return",Promise.reject());case 3:return Gr.next=5,Object(me.a)("/api/tag_disciplines/".concat(lr.id,"/rename.json"),{method:"post",body:{id:lr.id,name:nn}});case 5:Sr=Gr.sent,(Sr==null?void 0:Sr.status)===0&&ti();case 7:case"end":return Gr.stop()}},er)}));function Kt(){return qt.apply(this,arguments)}return Kt}()})},Hr=function(lr){z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:vt==="practice"?Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",Z.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",Z.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var nn=Object(E.a)(V.a.mark(function Kt(){var er;return V.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(me.a)("/api/tag_disciplines/".concat(lr.id,".json"),{method:"delete",body:{id:lr.id}});case 2:er=jr.sent,(er==null?void 0:er.status)===0&&ti();case 4:case"end":return jr.stop()}},Kt)}));function qt(){return nn.apply(this,arguments)}return qt}()})},fi=function(lr){ti(lr)},hn=vt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return Z.a.createElement(z.a,{afterClose:function(){Br(!1),$r(!1),kr(""),zr("1"),bn([])},centered:!0,keyboard:!1,width:600,title:"".concat(hn,"\u7BA1\u7406"),visible:!!vt,className:lt.a.customModal,footer:null,onCancel:Tr},Z.a.createElement("section",{className:lt.a.wrap},Z.a.createElement(Ye.a,{activeKey:fn,onChange:function(lr){kr(""),zr(lr),ti()}},Z.a.createElement(Ye.a.TabPane,{tab:"\u65B0\u589E".concat(hn),key:"1"},Z.a.createElement(P.a,{value:ct,onChange:function(lr){return kr(lr.target.value)},className:lt.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),Z.a.createElement("div",{className:lt.a.btns},Z.a.createElement(w.a,{onClick:Tr,className:"mr20"},"\u53D6\u6D88 "),Z.a.createElement(w.a,{loading:It,onClick:di,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),Z.a.createElement(Ye.a.TabPane,{tab:"\u5DF2\u6709".concat(hn),key:"2"},Z.a.createElement(P.a.Search,{allowClear:!0,onSearch:fi,value:ct,onChange:function(lr){return kr(lr.target.value)},className:lt.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),Z.a.createElement(c.a,{dataSource:Tn,bordered:!1,loading:br,scroll:Tn.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(hn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(lr,nn){return Z.a.createElement("span",null,Z.a.createElement("span",{onClick:function(){return sn(nn)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),Z.a.createElement("span",{onClick:function(){return Hr(nn)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ot=at,Ct=j("m3rI"),bt=j("B7Ph"),ft=j("wd/R"),jt=j.n(ft),Pt=j("1vsH"),Xt=j("9Bee"),Qt=j("xKgJ"),kt=P.a.TextArea,Et=z.a.confirm,Vt=K.a.Panel,pt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},dt;(function(yt){yt[yt.SET_INITAL_DATA=0]="SET_INITAL_DATA",yt[yt.SET_LOADING=1]="SET_LOADING",yt[yt.SET_STATUS=2]="SET_STATUS"})(dt||(dt={}));var At="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function Mt(yt,St){switch(St.type){case dt.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},yt),St.payload);case dt.SET_LOADING:return Object(A.a)(Object(A.a)({},yt),{},{loading:St.payload});case dt.SET_STATUS:return Object(A.a)(Object(A.a)({},yt),{},{status:St.payload});default:throw new Error}}var rr=$.default=function(){var yt,St,vt,yr=Object(ie.h)(),Tr=Object(ie.g)(),Bt=Object(ie.i)(),Rt=Bt.id,br=k.a.useForm(),$r=Object(L.a)(br,1),Cr=$r[0],ut=Object(q.useState)(),It=Object(L.a)(ut,2),Br=It[0],Vr=It[1],An=Object(q.useState)(!1),fn=Object(L.a)(An,2),zr=fn[0],Dt=fn[1],dn=Object(q.useState)([]),ct=Object(L.a)(dn,2),kr=ct[0],mr=ct[1],ei=Object(q.useState)([]),Tn=Object(L.a)(ei,2),bn=Tn[0],di=Tn[1],ti=Object(q.useState)([]),sn=Object(L.a)(ti,2),Hr=sn[0],fi=sn[1],hn=Object(q.useState)([]),Wr=Object(L.a)(hn,2),lr=Wr[0],nn=Wr[1],qt=Object(q.useState)([]),Kt=Object(L.a)(qt,2),er=Kt[0],Sr=Kt[1],jr=Object(q.useState)("C"),Gr=Object(L.a)(jr,2),_n=Gr[0],la=Gr[1],Yi=Object(q.useReducer)(Mt,pt),$i=Object(L.a)(Yi,2),Oi=$i[0],pn=$i[1],Ki=Oi.loading,Zr=Oi.data,ri=Oi.user,Mn=Oi.status,ln=Zr==null?void 0:Zr.hack_sets,Sn=Zr==null||((yt=Zr.hack)===null||yt===void 0)?void 0:yt.test_set_average,hi=Object(q.useState)(!1),Kn=Object(L.a)(hi,2),zn=Kn[0],Li=Kn[1],Mi=Object(q.useRef)([]),Gn=Object(q.useState)(!1),Ni=Object(L.a)(Gn,2),pi=Ni[0],mi=Ni[1],Xn=Object(q.useState)(!1),Vn=Object(L.a)(Xn,2),ki=Vn[0],ni=Vn[1],gi=Object(q.useRef)(!0),ji=Object(q.useState)({}),ii=Object(L.a)(ji,2),Pr=ii[0],Nt=ii[1];Object(q.useEffect)(function(){return Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(q.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var Yt=function(){var $t=Object(E.a)(V.a.mark(function Ot(){var tr,ir;return V.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return tr=hr.sent,hr.next=5,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:ir=hr.sent,di(tr.tag_disciplines||[]),fi(ir.tag_disciplines||[]);case 8:case"end":return hr.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),Ut=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],nr=Object(q.useCallback)(Object(E.a)(V.a.mark(function $t(){var Ot,tr,ir,Fr,hr,mn,an,Ci,In,kn,Bn,Xi,Re,Be,Ke,Me,pe,Ce,ye,Pe,Fe,We,He,$e,it,gt,mt;return V.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(pn({type:dt.SET_LOADING,payload:!0}),!Rt){Wt.next=19;break}return Wt.next=4,ze(Rt);case 4:Ot=Wt.sent,tr=Ot.user,ir=Ot.language,Fr=Ot.practice_sets,hr=Ot.practice_codes,mn=Ot.description,an=Ot.difficulty,Ci=Ot.name,In=Ot.open_or_not,kn=Ot.time_limit,Bn=Ot.test_set_average,Xi=Ot.test_set_score,Re=Ot.status,Be=Ot.tag_discipline_ids,Ke=Ot.source_discipline_ids,Me=Ot.item_banks_group_id,pe=Ot.is_file,Ce=pe===void 0?!1:pe,ye=Ot.hide_actual_output,Pe=Ot.review_privilege,Fe=Ot.review_description,We={review_privilege:Pe,status:Re,review_description:Fe,name:Ci},Nt(We),Li(ye),He=Ce?[{input:"",output:"",score:100,position:1}]:Fr,Ce?(mr(Fr),Cr.setFieldsValue({hack_sets:He})):mr([]),$e={loading:!0,user:tr,status:Re,data:{hack:{difficulty:an,name:Ci,description:mn,open_or_not:In,time_limit:kn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Ce},hack_sets:He}},pn({type:dt.SET_INITAL_DATA,payload:$e}),Vr({hack:{difficulty:an,name:Ci,description:mn,open_or_not:In,time_limit:kn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Ce}}),it=hr==null?void 0:hr.map(function(ar){return Object(A.a)(Object(A.a)({},ar),{},{code:ne.Base64.decode(ar==null?void 0:ar.code)})}),Sr(it),Mi.current=it,Wt.next=27;break;case 19:return Wt.next=21,Te();case 21:gt=Wt.sent,mt=gt.user,pn({type:dt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:mt,data:{hack:{difficulty:"",time_limit:3,description:At,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Vr({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Sr(Ut),Mi.current=Ut;case 27:pn({type:dt.SET_LOADING,payload:!1});case 28:case"end":return Wt.stop()}},$t)})),[Rt]);Object(q.useEffect)(function(){try{nr(),Yt()}catch($t){console.log($t,"----")}},[]);function gr($t,Ot){return Rr.apply(this,arguments)}function Rr(){return Rr=Object(E.a)(V.a.mark(function $t(Ot,tr){var ir,Fr,hr,mn,an,Ci,In,kn,Bn,Xi,Re,Be,Ke,Me,pe,Ce,ye,Pe;return V.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:Fr=Object(A.a)({},Ot),hr=Fr.hack_sets,mn=Fr.hack,mn.hide_actual_output=zn,an=[],Ci=[],In=0,kn=mn!=null&&mn.is_file?kr.map(function(He,$e){return Object(A.a)(Object(A.a)({},He),{},{position:$e+1})}):hr.map(function(He){return Object(A.a)(Object(A.a)({},He),{},{is_file:!1})}),Bn=Object(o.a)(kn);try{for(Bn.s();!(Xi=Bn.n()).done;)Re=Xi.value,In+=Re.score,Re.id&&Re.id>=0?an.push(Re):Ci.push(Re)}catch(He){Bn.e(He)}finally{Bn.f()}if(kn!=null&&kn.length){We.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 11:if(!(In!==100&&!mn.test_set_score)){We.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),We.abrupt("return");case 14:if(!(kn!=null&&kn.some(function(He){return!He.output}))){We.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 17:if(gi.current?mi(!0):ni(!0),Ke=er==null?void 0:er.map(function(He){return Object(A.a)(Object(A.a)({},He),{},{code:ne.Base64.encode(He==null?void 0:He.code)})}),!Rt){We.next=25;break}return We.next=22,Je(Rt,{practice:mn,practice_codes:Ke,practice_sets:Ci,update_practice_sets:an});case 22:Be=We.sent,We.next=28;break;case 25:return We.next=27,fe({practice:mn,practice_codes:Ke,practice_sets:kn,publish:!gi.current});case 27:Be=We.sent;case 28:if(mi(!1),ni(!1),!(((ir=Be)===null||ir===void 0?void 0:ir.status)===0)){We.next=46;break}if(!((Me=Be)!==null&&Me!==void 0&&(pe=Me.similar_practice)!==null&&pe!==void 0&&pe.length)){We.next=35;break}return Dt(!0),nn((Ce=Be)===null||Ce===void 0?void 0:Ce.similar_practice),We.abrupt("return");case 35:if(!Rt){We.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),gi.current){We.next=42;break}return We.next=40,Object(me.a)("/api/practices/".concat(Rt,"/start"),{method:"get"});case 40:ye=We.sent,(ye==null?void 0:ye.status)===0&&Tr.push("/problems/".concat(ye==null?void 0:ye.identifier,"/oj/").concat(Rt));case 42:We.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Tr.replace("/problems/".concat((Pe=Be)===null||Pe===void 0?void 0:Pe.identifier,"/ojedit"));case 46:case"end":return We.stop()}},$t)})),Rr.apply(this,arguments)}function dr(){Tr.replace("/problems")}var qr=function(Ot){var tr=Math.floor(100/Ot.length),ir=tr+100%Ot.length;Ot=Ot.map(function(Fr,hr){return hr===Ot.length-1?Object(A.a)(Object(A.a)({},Fr),{},{score:ir}):Object(A.a)(Object(A.a)({},Fr),{},{score:tr})}),mr(Ot)};function Un($t){$t.target.value||qr(kr),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_score:$t.target.value})})}})}function sr($t){pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{is_file:$t.target.value})})}})}function vi($t){Li($t.target.checked)}function Ir($t){var Ot=$t.target.value;Ot&&qr(kr),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_average:Ot})})}})}function On(){var $t=Cr.getFieldValue("hack_sets"),Ot=$t.length+1,tr=Math.floor(100/Ot),ir=100%Ot;$t.map(function(Fr,hr){return Sn&&(Fr.score=tr),Fr.position=hr+1,Fr}),$t.push({input:"",output:"",position:Ot,score:Sn?tr+ir:0}),Cr.setFieldsValue({hack_sets:$t}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:$t})}})}Object(q.useEffect)(function(){if(Sn){var $t=ln==null?void 0:ln.length,Ot=Math.floor(100/$t),tr=100%$t;ln==null||ln.map(function(ir,Fr){return ir.score=Ot,ir.position=Fr+1,Fr===$t-1&&(ir.score=Ot+tr),ir}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:ln})}}),Cr.setFieldsValue({hack_sets:ln})}},[Sn]);function Rn($t){var Ot=Cr.getFieldValue("hack_sets"),tr=(Ot==null?void 0:Ot.length)-1,ir=Math.ceil(100/tr),Fr=100%tr;Ot.splice($t,1),Ot==null||Ot.map(function(hr,mn){return Sn&&(hr.score=ir,mn===tr-1&&(hr.score=ir+Fr)),hr.position=mn+1,hr}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:Ot})}}),Cr.setFieldsValue({hack_sets:Ot})}function li($t){la($t)}var ua=function(Ot){var tr,ir=(tr=Mi.current)===null||tr===void 0?void 0:tr.findIndex(function(Fr){return Fr.language===_n});Mi.current[ir].code=Ot,Sr(Mi.current)},Dr=function(Ot){Vr(Object(A.a)({},Cr.getFieldsValue()))},_r=function(){var $t=Object(E.a)(V.a.mark(function Ot(tr){var ir;return V.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(me.a)("/api/practices/".concat(tr,"/start"),{method:"get"});case 2:ir=hr.sent,(ir==null?void 0:ir.status)===0&&Object(Pt.U)("/problems/".concat(ir==null?void 0:ir.identifier,"/oj/").concat(tr));case 4:case"end":return hr.stop()}},Ot)}));return function(tr){return $t.apply(this,arguments)}}(),fr=function(){var $t=Object(E.a)(V.a.mark(function Ot(){var tr,ir,Fr,hr,mn,an;return V.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,ze(Rt);case 2:tr=In.sent,ir=tr.name,Fr=tr.status,hr=tr.review_privilege,mn=tr.review_description,an={review_privilege:hr,status:Fr,review_description:mn,name:ir},Nt(an);case 6:case"end":return In.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),ai=function(){var Ot="";z.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Z.a.createElement("div",{className:"mt20"},Z.a.createElement(Q.a,{className:he.a.MdEditor,defaultValue:Ot,onChange:function(ir){Ot=ir}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var tr=Object(E.a)(V.a.mark(function Fr(){var hr;return V.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(Ot){an.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),an.abrupt("return",Promise.reject());case 3:return an.next=5,Object(me.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"fail",description:Ot}});case 5:hr=an.sent,(hr==null?void 0:hr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),fr());case 7:case"end":return an.stop()}},Fr)}));function ir(){return tr.apply(this,arguments)}return ir}()})},zi=function(){var $t=Object(E.a)(V.a.mark(function Ot(){return V.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Pr==null?void 0:Pr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Fr=Object(E.a)(V.a.mark(function mn(){var an;return V.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(me.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:an=In.sent,(an==null?void 0:an.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),fr());case 4:case"end":return In.stop()}},mn)}));function hr(){return Fr.apply(this,arguments)}return hr}()});case 1:case"end":return ir.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),Gi=function(){var Ot=z.a.confirm({icon:null,width:700,className:"".concat(he.a.cusModal," custom-modal-divider"),centered:!0,title:Z.a.createElement(h.a,null,Z.a.createElement(C.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Z.a.createElement(C.a,null,Z.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Ot.destroy()}}))),content:Z.a.createElement("div",null,Z.a.createElement(Xt.a,{className:"mt20",value:(Pr==null?void 0:Pr.review_description)||""}))})};return Z.a.createElement(u.a,{spinning:Ki,size:"large",className:he.a["oj-custom-large-spin"]},Zr?Z.a.createElement(q.Fragment,null,Z.a.createElement("header",{className:he.a.header},Z.a.createElement("div",null,Z.a.createElement("img",{src:"".concat(Ct.a.IMG_SERVER,"/images/").concat(ri==null?void 0:ri.image_url),alt:"user",width:30}),Z.a.createElement("span",null,ri==null?void 0:ri.name)),Z.a.createElement("h2",null," ",Zr==null||((St=Zr.hack)===null||St===void 0)?void 0:St.name," "),Rt?Z.a.createElement("a",{className:he.a.btn_back,onClick:dr}," ",Z.a.createElement(J.a,null),"\u9000\u51FA"):null),Z.a.createElement(k.a,{form:Cr,initialValues:Zr,layout:"vertical",className:he.a["oj-form-container"],onValuesChange:Dr,onFinish:gr},Z.a.createElement(et.a,{hideResize:!0,className:he.a["oj-problems"],leftChild:Z.a.createElement(Fn,{formValue:Br,onRemoveTestCase:Rn,onAddTestCase:On,hack:Zr.hack,onChangeScore:Un,onChangehide:vi,onChangeAverage:Ir,onChangeFile:sr,uploadData:kr,setUploadData:mr,handleUploadRatio:qr,ischecked:zn,pointData:bn,sourceData:Hr,getPointData:Yt}),rightChild:Z.a.createElement(Se,{value:er==null||((vt=er.find(function($t){return $t.language===_n}))===null||vt===void 0)?void 0:vt.code,onChange:ua,onLanguage:li,languageItems:er,language:_n})}),Z.a.createElement("div",{className:he.a.footer},!!Rt&&Z.a.createElement("div",{className:he.a.result},Z.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Pr!=null&&Pr.review_privilege?Z.a.createElement(Z.a.Fragment,null,Z.a.createElement("div",{onClick:zi,className:he.a.pass},"\u901A\u8FC7"),Z.a.createElement("div",{onClick:ai,className:he.a.noPass},"\u4E0D\u901A\u8FC7")):Z.a.createElement(Z.a.Fragment,null,(Pr==null?void 0:Pr.status)===0&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Pr==null?void 0:Pr.status)===1&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Pr==null?void 0:Pr.status)===2&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Pr==null?void 0:Pr.status)===3&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Pr==null?void 0:Pr.status)===4&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Pr==null?void 0:Pr.status)===5&&Z.a.createElement("div",{className:he.a.noPassText},Z.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Z.a.createElement("span",{onClick:Gi},"\u67E5\u770B\u539F\u56E0")))),Z.a.createElement(w.a,{type:"primary",ghost:!0,onClick:dr},"\u9000\u51FA\u7F16\u8F91"),Z.a.createElement(w.a,{disabled:ki,loading:pi,type:"primary",onClick:function(){gi.current=!0,Cr.submit()}},"\u4FDD\u5B58 "),Rt?Z.a.createElement(w.a,{disabled:pi,loading:ki,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){gi.current=!1,Cr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Z.a.createElement(w.a,{disabled:pi,loading:ki,type:"primary",onClick:function(){gi.current=!1,Cr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Z.a.createElement(z.a,{centered:!0,destroyOnClose:!0,footer:null,visible:zr,onCancel:function(){return Dt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Z.a.createElement("div",null,Z.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Z.a.createElement(c.a,{dataSource:lr,bordered:!1,scroll:lr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Ot,tr){return Z.a.createElement("span",{onClick:function(){return _r(tr==null?void 0:tr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Ot)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Ot){var tr;return(tr=jt()(Ot))===null||tr===void 0?void 0:tr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Fn(yt){var St,vt,yr=yt.ischecked,Tr=yt.formValue,Bt=yt.hack,Rt=yt.onChangeAverage,br=yt.onChangeScore,$r=yt.onChangehide,Cr=yt.onChangeFile,ut=yt.onAddTestCase,It=yt.onRemoveTestCase,Br=yt.uploadData,Vr=yt.setUploadData,An=yt.handleUploadRatio,fn=yt.pointData,zr=yt.sourceData,Dt=yt.getPointData,dn=Bt.test_set_average,ct=Bt.test_set_score,kr=Object(q.useState)(!1),mr=Object(L.a)(kr,2),ei=mr[0],Tn=mr[1],bn=Object(q.useState)(!1),di=Object(L.a)(bn,2),ti=di[0],sn=di[1],Hr=function(Kt,er){var Sr=Object(i.a)(Br);Sr.splice(er,1),dn?An(Sr):Vr(Sr)},fi=function(Kt,er){console.log(Kt,er);var Sr=Br.map(function(jr,Gr){return Gr===er?Object(A.a)(Object(A.a)({},jr),{},{score:Kt.target.value?Number(Kt.target.value):0}):jr});Vr(Sr)},hn=function(Kt){var er=Br.concat(Kt);Bt.test_set_average?An(er):Vr(er)};function Wr(qt){qt.stopPropagation()}function lr(){if(Object(Qt.v)()){sn("practice");return}var qt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(er){qt=er.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(V.a.mark(function Sr(){var jr;return V.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:qt}});case 2:jr=_n.sent,(jr==null?void 0:jr.status)===0&&Dt();case 4:case"end":return _n.stop()}},Sr)}));function er(){return Kt.apply(this,arguments)}return er}()})}function nn(){if(Object(Qt.v)()){sn("practice_source");return}var qt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(er){qt=er.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(V.a.mark(function Sr(){var jr;return V.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:qt}});case 2:jr=_n.sent,(jr==null?void 0:jr.status)===0&&Dt();case 4:case"end":return _n.stop()}},Sr)}));function er(){return Kt.apply(this,arguments)}return er}()})}return Z.a.createElement("div",{className:he.a["oj-left-panel"]},Z.a.createElement("div",{className:he.a["oj-form-info"]},Z.a.createElement(k.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:he.a.inputOne},Z.a.createElement(P.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Z.a.createElement("span",null,(Tr==null||((St=Tr.hack)===null||St===void 0||((vt=St.name)===null||vt===void 0))?void 0:vt.length)||0,"/",Z.a.createElement("span",{className:"c-grey-999"},"60"))})),Z.a.createElement(k.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Z.a.createElement(Q.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.a},Z.a.createElement(k.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Z.a.createElement(r.a,null,te(oe.difficulty)))),Z.a.createElement("div",{className:he.a.b},Z.a.createElement(k.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Z.a.createElement(r.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},zr.map(function(qt){return Z.a.createElement(r.a.Option,{key:qt.id,value:qt.id},qt.name)}))),Z.a.createElement(w.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return nn()}},Object(Qt.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.b,style:{width:"100%",marginLeft:0}},Z.a.createElement(k.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Z.a.createElement(r.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},fn.map(function(qt){return Z.a.createElement(r.a.Option,{key:qt.id,value:qt.id},qt.name)}))),Z.a.createElement(w.a,{type:"primary",ghost:!0,onClick:function(){return lr()}},Object(Qt.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Z.a.createElement("div",{className:he.a.field},Z.a.createElement(k.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:he.a.inputTwo,extra:Z.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Z.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Z.a.createElement(t.a,{style:{width:185},min:3}))),Z.a.createElement("div",{className:"tst-case-info"},Z.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Bt.is_file&&Z.a.createElement(w.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Z.a.createElement(k.a.Item,{name:["hack","test_set_score"]},Z.a.createElement(p.a.Group,{onChange:br},Z.a.createElement(p.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Z.a.createElement(p.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Z.a.createElement(S.a,{style:{marginBottom:"5px"},checked:yr,onChange:$r},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Z.a.createElement(k.a.Item,{className:he.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Z.a.createElement(p.a.Group,{onChange:Cr},Z.a.createElement(y.a,{direction:"horizontal"},Z.a.createElement(p.a,{value:!1},"\u6587\u672C"),Z.a.createElement(p.a,{value:!0},"\u6587\u4EF6")))),!Bt.test_set_score&&Z.a.createElement(k.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Z.a.createElement(p.a.Group,{onChange:Rt},Z.a.createElement(p.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Z.a.createElement(p.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Bt.is_file&&Z.a.createElement("div",{className:he.a.upBtn},Z.a.createElement(w.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Tn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Z.a.createElement(bt.a,{disabled:Bt==null?void 0:Bt.test_set_average,inputChange:fi,showScore:!Bt.test_set_score,data:Br,onRemove:Hr})),!Bt.is_file&&Z.a.createElement(k.a.List,{name:"hack_sets"},function(qt,Kt){return Object(O.a)(Kt),Z.a.createElement(K.a,{accordion:!0},qt.map(function(er,Sr){return Z.a.createElement(Vt,{key:"".concat(er.key,"--").concat(Sr),header:Z.a.createElement("a",{className:he.a["test-case-name"]},Z.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Sr+1),ct?null:Z.a.createElement(Z.a.Fragment,null,Z.a.createElement(k.a.Item,{name:[er.name,"score"],fieldKey:[er.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Sr+1,"\u8BC4\u5206")}]},Z.a.createElement(t.a,{onClick:Wr,min:0,max:100,disabled:dn})),Z.a.createElement("span",null,"%"))),extra:Sr>0?Z.a.createElement("div",{onClick:Wr},Z.a.createElement(v.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Sr+1),onConfirm:function(){It(Sr)}},Z.a.createElement(X.a,{className:he.a["btn-remove-case"]}))):null},Z.a.createElement(k.a.Item,{label:"\u8F93\u5165",name:[er.name,"input"],fieldKey:[er.fieldKey,"input"]},Z.a.createElement(kt,null)),Z.a.createElement(k.a.Item,{label:"\u8F93\u51FA",name:[er.name,"output"],fieldKey:[er.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Z.a.createElement(kt,null)))}))}))),Z.a.createElement(bt.b,{rootIdentifier:null,visible:ei,onClose:function(){return Tn(!1)},onOK:hn}),Z.a.createElement(ot,{visible:ti,onCancel:function(){sn(!1),Dt()},onOK:function(){sn(!1),Dt()}}))}},rdUC:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"localStorage",read:M,write:y,each:m,remove:S,clearAll:b};function O(){return v.localStorage}function M(p){return O().getItem(p)}function y(p,d){return O().setItem(p,d)}function m(p){for(var d=O().length-1;d>=0;d--){var t=O().key(d);p(M(t),t)}}function S(p){return O().removeItem(p)}function b(){return O().clear()}},sR1s:function(F,$,j){"use strict";j.d($,"b",function(){return M}),j.d($,"a",function(){return y}),j.d($,"c",function(){return m}),j.d($,"d",function(){return S});var N=j("U8pU"),v="RC_TABLE_KEY";function O(b){return b==null?[]:Array.isArray(b)?b:[b]}function M(b,p){if(!p&&typeof p!="number")return b;for(var d=O(p),t=b,l=0;l1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(f.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=f[0];if(m.isValidElement(w)&&Object(t.c)(w)){var _=w.ref;f[0]=m.cloneElement(w,{ref:Object(t.a)(_,this.setChildNode)})}return f.length===1?f[0]:f.map(function(h,R){return!m.isValidElement(h)||"key"in h&&h.key!==null?h:m.cloneElement(h,{key:"".concat(r,"-").concat(R)})})}}]),u}(m.Component);i.displayName="ResizeObserver",$.a=i},uGsb:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"),j("1uat"))})(this,function(N){return function(){var v=N,O=v.x64,M=O.Word,y=O.WordArray,m=v.algo,S=m.SHA512,b=m.SHA384=S.extend({_doReset:function(){this._hash=new y.init([new M.init(3418070365,3238371032),new M.init(1654270250,914150663),new M.init(2438529370,812702999),new M.init(355462360,4144912697),new M.init(1731405415,4290775857),new M.init(2394180231,1750603025),new M.init(3675008525,1694076839),new M.init(1203062813,3204075428)])},_doFinalize:function(){var p=S._doFinalize.call(this);return p.sigBytes-=16,p}});v.SHA384=S._createHelper(b),v.HmacSHA384=S._createHmacHelper(b)}(),N.SHA384})},uGxW:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(F,$,j){F.exports=N;function N(){return j("gaXo"),{}}},ulZh:function(F,$,j){typeof window!="undefined"&&function(v,O){F.exports=O()}(this,function(){return function(N){var v={};function O(M){if(v[M])return v[M].exports;var y=v[M]={i:M,l:!1,exports:{}};return N[M].call(y.exports,y,y.exports,O),y.l=!0,y.exports}return O.m=N,O.c=v,O.d=function(M,y,m){O.o(M,y)||Object.defineProperty(M,y,{enumerable:!0,get:m})},O.r=function(M){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},O.t=function(M,y){if(y&1&&(M=O(M)),y&8)return M;if(y&4&&typeof M=="object"&&M&&M.__esModule)return M;var m=Object.create(null);if(O.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:M}),y&2&&typeof M!="string")for(var S in M)O.d(m,S,function(b){return M[b]}.bind(null,S));return m},O.n=function(M){var y=M&&M.__esModule?function(){return M.default}:function(){return M};return O.d(y,"a",y),y},O.o=function(M,y){return Object.prototype.hasOwnProperty.call(M,y)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,v,O){"use strict";var M=Object.prototype.hasOwnProperty,y="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(y=!1));function S(t,l,r){this.fn=t,this.context=l,this.once=r||!1}function b(t,l,r,i,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new S(r,i||t,o),u=y?y+l:l;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function p(t,l){--t._eventsCount===0?t._events=new m:delete t._events[l]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var l=[],r,i;if(this._eventsCount===0)return l;for(i in r=this._events)M.call(r,i)&&l.push(y?i.slice(1):i);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(r)):l},d.prototype.listeners=function(l){var r=y?y+l:l,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,u=new Array(s);o0},!1)}function t(l,r){for(var i={main:[r]},o={main:[]},s={main:{}};d(i);)for(var u=Object.keys(i),a=0;a=2*R/g||A<=K)return;var W=Number.POSITIVE_INFINITY,z;for(z=u.level-1;z>E;z--){var U=x[z].maxBitrate;if(W=R*U/(8*.8*L),W=A)return;var P=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+u.sn+(a?" part "+a.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+` Current BW estimate: `+(Object(M.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+A.toFixed(3)+` s Estimated load time for the next fragment: `+W.toFixed(3)+` s Time to underbuffer: `+K.toFixed(3)+" s"),c.nextLoadLevel=z,this.bwEstimator.sample(C,h.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),c.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:a,stats:h})},o.onFragLoaded=function(u,a){var c=a.frag,f=a.part;if(c.type===p.PlaylistLevelType.MAIN&&Object(M.isFiniteNumber)(c.sn)){var w=f?f.stats:c.stats,_=f?f.duration:c.duration;if(this.clearTimer(),this.lastLoadedFragLevel=c.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[c.level],R=(h.loaded?h.loaded.bytes:0)+w.loaded,C=(h.loaded?h.loaded.duration:0)+_;h.loaded={bytes:R,duration:C},h.realBitrate=Math.round(8*R/C)}if(c.bitrateTest){var g={stats:w,frag:c,part:f,id:c.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,g),c.bitrateTest=!1}}},o.onFragBuffered=function(u,a){var c=a.frag,f=a.part,w=f?f.stats:c.stats;if(w.aborted)return;if(c.type!==p.PlaylistLevelType.MAIN||c.sn==="initSegment")return;var _=w.parsing.end-w.loading.start;this.bwEstimator.sample(_,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),c.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},o.onError=function(u,a){switch(a.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var u=this.fragCurrent,a=this.partCurrent,c=this.hls,f=c.maxAutoLevel,w=c.config,_=c.minAutoLevel,h=c.media,R=a?a.duration:u?u.duration:0,C=h?h.currentTime:0,g=h&&h.playbackRate!==0?Math.abs(h.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,E=(S.BufferHelper.bufferInfo(h,C,w.maxBufferHole).end-C)/g,T=this.findBestLevel(x,_,f,E,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(T>=0)return T;d.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=R?Math.min(R,w.maxStarvationDelay):w.maxStarvationDelay,L=w.abrBandWidthFactor,A=w.abrBandWidthUpFactor;if(!E){var G=this.bitrateTestDelay;if(G){var K=R?Math.min(R,w.maxLoadingDelay):w.maxLoadingDelay;k=K-G,d.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),L=A=1}}return T=this.findBestLevel(x,_,f,E+k,L,A),Math.max(T,0)},o.findBestLevel=function(u,a,c,f,w,_){for(var h,R=this.fragCurrent,C=this.partCurrent,g=this.lastLoadedFragLevel,x=this.hls.levels,E=x[g],T=!!(E!=null&&(h=E.details)!==null&&h!==void 0&&h.live),k=E==null?void 0:E.codecSet,L=C?C.duration:R?R.duration:0,A=c;A>=a;A--){var G=x[A];if(!G||k&&G.codecSet!==k)continue;var K=G.details,W=(C?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||L,z=void 0;A<=g?z=w*u:z=_*u;var U=x[A].maxBitrate,P=U*W/z;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(z)+"/"+U+"/"+W+"/"+f+"/"+P),z>U&&(!P||T&&!this.bitrateTestDelay||P0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=y.State.IDLE):(this.loadedmetadata=!1,this.state=y.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},g.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_TRACK:{var E,T=this.levels,k=this.trackId,L=T==null||((E=T[k])===null||E===void 0)?void 0:E.details;if(L){if(this.waitForCdnTuneIn(L))break;this.state=y.State.WAITING_INIT_PTS}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var A,G=performance.now(),K=this.retryDate;(!K||G>=K||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break}case y.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var z=W.frag,U=W.part,P=W.cache,H=W.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.FRAG_LOADING;var V=P.flush(),q={frag:z,part:U,payload:V,networkDetails:null};this._handleFragmentLoadProgress(q),H&&R.prototype._handleFragmentLoadComplete.call(this,q)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),ce=S.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),he=Object(o.fragmentWithinToleranceTest)(ce.end,this.config.maxFragLookUpTolerance,z);he<0&&(a.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=y.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.IDLE)},g.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:E,k=T.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},g.doTickIdle=function(){var E,T,k=this.hls,L=this.levels,A=this.media,G=this.trackId,K=k.config;if(!L||!L[G])return;if(!A&&(this.startFragRequested||!K.startFragPrefetch))return;var W=L[G],z=W.details;if(!z||z.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(z)){this.state=y.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,t.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(),V=this.audioSwitch;if(P>=H&&!V)return;if(!V&&this._streamEnded(U,z)){k.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=y.State.ENDED;return}var q=z.fragments,Z=q[0].start,ce=U.end;if(V){var he=this.getLoadPosition();ce=he,z.PTSKnown&&heZ||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=Z+.05))}var ae=this.getNextFragment(ce,z);if(!ae){this.bufferFlushed=!0;return}((E=ae.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((T=ae.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(ae,z):this.loadFragment(ae,z,ce)},g.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return T===null?E:Math.max(E,T.len)},g.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(E,T){var k=T.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(L){return new p.Level(L)})},g.onAudioTrackSwitching=function(E,T){var k=!!T.url;this.trackId=T.id;var L=this.fragCurrent;L!=null&&L.loader&&L.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(_):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=y.State.IDLE):this.state=y.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(E,T){this.mainDetails=T.details},g.onAudioTrackLoaded=function(E,T){var k,L=this.levels,A=T.details,G=T.id;if(!L){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var K=L[G],W=0;if(A.live||(k=K.details)!==null&&k!==void 0&&k.live){var z=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!z)return;!K.details&&A.hasProgramDateTime&&z.hasProgramDateTime?(Object(s.alignMediaPlaylistByPDT)(A,z),W=A.fragments[0].start):W=this.alignPlaylists(A,K.details)}K.details=A,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(K.details,W),this.state===y.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=y.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(E){var T,k=E.frag,L=E.part,A=E.payload,G=this.config,K=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var z=W[K];console.assert(z,"Audio track is defined on fragment load progress");var U=z.details;console.assert(U,"Audio track details are defined on fragment load progress");var P=G.defaultAudioCodec||z.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new r.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var V=this.initPTS[k.cc],q=(T=k.initSegment)===null||T===void 0?void 0:T.data;if(V!==void 0){var Z=!1,ce=L?L.index:-1,he=ce!==-1,ae=new i.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,A.byteLength,ce,he);H.push(A,q,P,"",k,L,U.totalduration,Z,ae,V)}else{a.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+K);var xe=this.waitingData=this.waitingData||{frag:k,part:L,cache:new l.default,complete:!1},ge=xe.cache;ge.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=y.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(E,T){var k=T.tracks.audio;k&&(this.mediaBuffer=k.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},g.onFragBuffered=function(E,T){var k=T.frag,L=T.part;if(k.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(L?" p: "+L.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,L)},g.onError=function(E,T){switch(T.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,T);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==y.State.ERROR&&this.state!==y.State.STOPPED&&(this.state=T.fatal?y.State.ERROR:y.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var k=!0,L=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);L&&L.len>.5&&(k=!this.reduceMaxBufferLength(L.len)),k&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(E,T){var k=T.type;k===t.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(E){var T,k="audio",L=this.hls,A=E.remuxResult,G=E.chunkMeta,K=this.getCurrentContext(G);if(!K){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 W=K.frag,z=K.part,U=A.audio,P=A.text,H=A.id3,V=A.initSegment;if(this.fragContextChanged(W))return;if(this.state=y.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),V!=null&&V.tracks&&(this._bufferInitSegment(V.tracks,W,G),L.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:k,tracks:V.tracks})),U){var q=U.startPTS,Z=U.endPTS,ce=U.startDTS,he=U.endDTS;z&&(z.elementaryStreams[t.ElementaryStreamTypes.AUDIO]={startPTS:q,endPTS:Z,startDTS:ce,endDTS:he}),W.setElementaryStreamInfo(t.ElementaryStreamTypes.AUDIO,q,Z,ce,he),this.bufferFragmentData(U,W,z,G)}if(H!=null&&(T=H.samples)!==null&&T!==void 0&&T.length){var ae=c({frag:W,id:k},H);L.trigger(m.Events.FRAG_PARSING_METADATA,ae)}if(P){var xe=c({frag:W,id:k},P);L.trigger(m.Events.FRAG_PARSING_USERDATA,xe)}},g._bufferInitSegment=function(E,T,k){if(this.state!==y.State.PARSING)return;E.video&&delete E.video;var L=E.audio;if(!L)return;L.levelCodec=L.codec,L.id="audio",this.log("Init audio buffer, container:"+L.container+", codecs[parsed]=["+L.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,E);var A=L.initSegment;if(A!=null&&A.byteLength){var G={type:"audio",frag:T,part:null,chunkMeta:k,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,G)}this.tick()},g.loadFragment=function(E,T,k){var L=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||L===b.FragmentState.NOT_LOADED||L===b.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):T.live&&!Object(M.isFiniteNumber)(this.initPTS[E.cc])?(this.log("Waiting for video PTS in continuity counter "+E.cc+" of live stream before loading audio fragment "+E.sn+" of level "+this.trackId),this.state=y.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,T,k)))},g.completeAudioSwitch=function(){var E=this.hls,T=this.media,k=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:k})},C}(y.default);v.default=h},"./src/controller/audio-track-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/controller/base-playlist-controller.ts"),S=O("./src/types/loader.ts");function b(r,i){for(var o=0;o=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var c=a[this.trackId];this.log("Now switching to audio-track index "+u);var f=a[u],w=f.id,_=f.groupId,h=_===void 0?"":_,R=f.name,C=f.type,g=f.url;if(this.trackId=u,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:h,name:R,type:C,url:g}),f.details&&!f.details.live)return;var x=this.switchParams(f.url,c==null?void 0:c.details);this.loadPlaylist(x)},o.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,c=this.findTrackId(a)||this.findTrackId();c!==-1?this.setAudioTrack(c):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(u){for(var a=this.tracksInGroup,c=0;ci.partTarget&&(f+=1)}if(Object(M.isFiniteNumber)(c))return new y.HlsUrlParameters(c,Object(M.isFiniteNumber)(f)?f:void 0,y.HlsSkip.No)}}},t.loadPlaylist=function(r){},t.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},t.playlistLoaded=function(r,i,o){var s=this,u=i.details,a=i.stats,c=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(u.advancedDateTime=Date.now()-c,u.live||o!=null&&o.live){if(u.reloaded(o),o&&this.log("live playlist "+r+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),o&&u.fragments.length>0&&Object(m.mergeDetails)(o,u),!this.canLoad||!u.live)return;var f,w=void 0,_=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var h=this.hls.config.lowLatencyMode,R=u.lastPartSn,C=u.endSN,g=u.lastPartIndex,x=g!==-1,E=R===C,T=h?0:g;x?(w=E?C+1:R,_=E?T:g+1):w=C+1;var k=u.age,L=k+u.ageHeader,A=Math.min(L-u.partTarget,u.targetduration*1.5);if(A>0){if(o&&A>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+A+" with playlist age: "+u.age),A=0;else{var G=Math.floor(A/u.targetduration);if(w+=G,_!==void 0){var K=Math.round(A%u.targetduration/u.partTarget);_+=K}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+A+" skip sn "+G+" to part "+_)}u.tuneInGoal=A}if(f=this.getDeliveryDirectives(u,i.deliveryDirectives,w,_),h||!E){this.loadPlaylist(f);return}}else f=this.getDeliveryDirectives(u,i.deliveryDirectives,w,_);var W=Object(m.computeReloadInterval)(u,a);w!==void 0&&u.canBlockReload&&(W-=u.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return s.loadPlaylist(f)},W)}else this.clearTimer()},t.getDeliveryDirectives=function(r,i,o,s){var u=Object(y.getSkipValue)(r,o);return i!=null&&i.skip&&r.deltaUpdateFailed&&(o=i.msn,s=i.part,u=y.HlsSkip.No),new y.HlsUrlParameters(o,s,u)},t.retryLoadingOrFail=function(r){var i=this,o=this.hls.config,s=this.retryCount-1&&(u=r.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return s},d}()},"./src/controller/base-stream-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"State",function(){return C}),O.d(v,"default",function(){return g});var M=O("./src/polyfills/number.ts"),y=O("./src/task-loop.ts"),m=O("./src/controller/fragment-tracker.ts"),S=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),p=O("./src/events.ts"),d=O("./src/errors.ts"),t=O("./src/types/transmuxer.ts"),l=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/discontinuities.ts"),i=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),s=O("./src/loader/fragment-loader.ts"),u=O("./src/crypt/decrypter.ts"),a=O("./src/utils/time-ranges.ts"),c=O("./src/types/loader.ts");function f(x,E){for(var T=0;TV;(z0&&z&&z.key&&z.iv&&z.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(W),z.key.buffer,z.iv.buffer).then(function(P){var H=self.performance.now();return K.trigger(p.Events.FRAG_DECRYPTED,{frag:L,payload:P,stats:{tstart:U,tdecrypt:H}}),G.payload=P,G})}return G}).then(function(G){var K=A.fragCurrent,W=A.hls,z=A.levels;if(!z)throw new Error("init load aborted, missing levels");var U=z[L.level].details;console.assert(U,"Level details are defined when init segment is loaded");var P=L.stats;A.state=C.IDLE,A.fragLoadError=0,L.data=new Uint8Array(G.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),G.frag===K&&W.trigger(p.Events.FRAG_BUFFERED,{stats:P,frag:K,part:null,id:L.type}),A.tick()}).catch(function(G){A.warn(G),A.resetFragmentLoading(L)})},T.fragContextChanged=function(L){var A=this.fragCurrent;return!L||!A||L.level!==A.level||L.sn!==A.sn||L.urlId!==A.urlId},T.fragBufferedComplete=function(L,A){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+L.type+" sn: "+L.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level+" "+a.default.toString(S.BufferHelper.getBuffered(G))),this.state=C.IDLE,this.tick()},T._handleFragmentLoadComplete=function(L){var A=this.transmuxer;if(!A)return;var G=L.frag,K=L.part,W=L.partsLoaded,z=!W||W.length===0||W.some(function(P){return!P}),U=new t.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,K?K.index:-1,!z);A.flush(U)},T._handleFragmentLoadProgress=function(L){},T._doFragLoad=function(L,A,G,K){var W=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(L.start,G||0),this.config.lowLatencyMode&&A){var z=A.partList;if(z&&K){G>L.end&&A.fragmentHint&&(L=A.fragmentHint);var U=this.getNextPart(z,L,G);if(U>-1){var P=z[U];return this.log("Loading part sn: "+L.sn+" p: "+P.index+" cc: "+L.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,part:z[U],targetBufferTime:G}),this.doFragPartsLoad(L,z,U,K).catch(function(H){return W.handleFragLoadError(H)})}else if(!L.url||this.loadedEndOfParts(z,G))return Promise.resolve(null)}}return this.log("Loading fragment "+L.sn+" cc: "+L.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),Object(M.isFiniteNumber)(L.sn)&&!this.bitrateTest&&(this.nextLoadPosition=L.start+L.duration),this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,targetBufferTime:G}),this.fragmentLoader.load(L,K).catch(function(H){return W.handleFragLoadError(H)})},T.doFragPartsLoad=function(L,A,G,K){var W=this;return new Promise(function(z,U){var P=[],H=function V(q){var Z=A[q];W.fragmentLoader.loadPart(L,Z,K).then(function(ce){P[Z.index]=ce;var he=ce.part;W.hls.trigger(p.Events.FRAG_LOADED,ce);var ae=A[q+1];if(ae&&ae.fragment===L)V(q+1);else return z({frag:L,part:he,partsLoaded:P})}).catch(U)};H(G)})},T.handleFragLoadError=function(L){var A=L.data;return A&&A.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(p.Events.ERROR,A),null},T._handleTransmuxerFlush=function(L){var A=this.getCurrentContext(L);if(!A||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var G=A.frag,K=A.part,W=A.level,z=self.performance.now();G.stats.parsing.end=z,K&&(K.stats.parsing.end=z),this.updateLevelTiming(G,K,W,L.partial)},T.getCurrentContext=function(L){var A=this.levels,G=L.level,K=L.sn,W=L.part;if(!A||!A[G])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+G+". The current chunk will not be buffered."),null;var z=A[G],U=W>-1?Object(o.getPartWith)(z,K,W):null,P=U?U.fragment:Object(o.getFragmentWithSN)(z,K,this.fragCurrent);return P?{frag:P,part:U,level:z}:null},T.bufferFragmentData=function(L,A,G,K){if(!L||this.state!==C.PARSING)return;var W=L.data1,z=L.data2,U=W;if(W&&z&&(U=Object(l.appendUint8Array)(W,z)),!U||!U.length)return;var P={type:L.type,frag:A,part:G,chunkMeta:K,parent:A.type,data:U};this.hls.trigger(p.Events.BUFFER_APPENDING,P),L.dropped&&L.independent&&!G&&this.flushBufferGap(A)},T.flushBufferGap=function(L){var A=this.media;if(!A)return;if(!S.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,L.start);return}var G=A.currentTime,K=S.BufferHelper.bufferInfo(A,G,0),W=L.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),U=Math.max(Math.min(L.start-z,K.end-z),G+z);L.start-U>z&&this.flushMainBuffer(U,L.start)},T.getFwdBufferInfo=function(L,A){var G=this.config,K=this.getLoadPosition();if(!Object(M.isFiniteNumber)(K))return null;var W=S.BufferHelper.bufferInfo(L,K,G.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(K,A);if(z&&W.nextStart=G?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(L,A){var G,K,W=A.fragments,z=W.length;if(!z)return null;var U=this.config,P=W[0].start,H;if(A.live){var V=U.initialLiveManifestSize;if(z-1&&GG.start&&G.loaded},T.getInitialLiveFragment=function(L,A){var G=this.fragPrevious,K=null;if(G){if(L.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),K=Object(i.findFragmentByPDT)(A,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var W=G.sn+1;if(W>=L.startSN&&W<=L.endSN){var z=A[W-L.startSN];G.cc===z.cc&&(K=z,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(i.findFragWithCC)(A,G.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(K=this.getFragmentAtPosition(U,this.bitrateTest?L.fragmentEnd:L.edge,L))}return K},T.getFragmentAtPosition=function(L,A,G){var K=this.config,W=this.fragPrevious,z=G.fragments,U=G.endSN,P=G.fragmentHint,H=K.maxFragLookUpTolerance,V=!!(K.lowLatencyMode&&G.partList&&P);V&&P&&!this.bitrateTest&&(z=z.concat(P),U=P.sn);var q;if(LA-H?0:H;q=Object(i.findFragmentByPTS)(W,z,L,Z)}else q=z[z.length-1];if(q){var ce=q.sn-G.startSN,he=W&&q.level===W.level,ae=z[ce+1],xe=this.fragmentTracker.getState(q);if(xe===m.FragmentState.BACKTRACKED){q=null;for(var ge=ce;z[ge]&&this.fragmentTracker.getState(z[ge])===m.FragmentState.BACKTRACKED;)W?q=z[ge--]:q=z[--ge];q||(q=ae)}else W&&q.sn===W.sn&&!V&&(he&&(q.sn=z-A.maxFragLookUpTolerance&&W<=U;if(K!==null&&G.duration>K&&(W"+L.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+U),q}return P},T.waitForCdnTuneIn=function(L){var A=3;return L.live&&L.canBlockReload&&L.tuneInGoal>Math.max(L.partHoldBack,L.partTarget*A)},T.setStartPosition=function(L,A){var G=this.startPosition;if(G"+L))}}]),E}(y.default)},"./src/controller/buffer-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./src/polyfills/number.ts"),y=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/utils/mediasource-helper.ts"),d=O("./src/loader/fragment.ts"),t=O("./src/controller/buffer-operation-queue.ts"),l=Object(p.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function o(u){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var c=a.hls,f=a.media,w=a.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),f&&(a.updateMediaElementDuration(),c.trigger(y.Events.MEDIA_ATTACHED,{media:f})),w&&w.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var s=o.prototype;return s.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},s.destroy=function(){this.unregisterListeners(),this.details=null},s.registerListeners=function(){var a=this.hls;a.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(y.Events.BUFFER_RESET,this.onBufferReset,this),a.on(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(y.Events.BUFFER_EOS,this.onBufferEos,this),a.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(y.Events.FRAG_PARSED,this.onFragParsed,this),a.on(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(y.Events.BUFFER_RESET,this.onBufferReset,this),a.off(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(y.Events.BUFFER_EOS,this.onBufferEos,this),a.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(y.Events.FRAG_PARSED,this.onFragParsed,this),a.off(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new t.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},s.onManifestParsed=function(a,c){var f=2;(c.audio&&!c.video||!c.altAudio)&&(f=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=f,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},s.onMediaAttaching=function(a,c){var f=this.media=c.media;if(f&&l){var w=this.mediaSource=new l;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),f.src=self.URL.createObjectURL(w),this._objectUrl=f.src}},s.onMediaDetaching=function(){var a=this.media,c=this.mediaSource,f=this._objectUrl;if(c){if(m.logger.log("[buffer-controller]: media source detaching"),c.readyState==="open")try{c.endOfStream()}catch(w){m.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),c.removeEventListener("sourceopen",this._onMediaSourceOpen),c.removeEventListener("sourceended",this._onMediaSourceEnded),c.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(f&&self.URL.revokeObjectURL(f),a.src===f?(a.removeAttribute("src"),a.load()):m.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(y.Events.MEDIA_DETACHED,void 0)},s.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(c){var f=a.sourceBuffer[c];try{f&&(a.removeBufferListeners(c),a.mediaSource&&a.mediaSource.removeSourceBuffer(f),a.sourceBuffer[c]=void 0)}catch(w){m.logger.warn("[buffer-controller]: Failed to reset the "+c+" buffer",w)}}),this._initSourceBuffer()},s.onBufferCodecs=function(a,c){var f=this,w=this.getSourceBufferTypes().length;if(Object.keys(c).forEach(function(_){if(w){var h=f.tracks[_];if(h&&typeof h.buffer.changeType=="function"){var R=c[_],C=R.codec,g=R.levelCodec,x=R.container,E=(h.levelCodec||h.codec).replace(r,"$1"),T=(g||C).replace(r,"$1");if(E!==T){var k=x+";codecs="+(g||C);f.appendChangeType(_,k)}}}else f.pendingTracks[_]=c[_]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},s.appendChangeType=function(a,c){var f=this,w=this.operationQueue,_={execute:function(){var R=f.sourceBuffer[a];R&&(m.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+c),R.changeType(c)),w.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(R){m.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",R)}};w.append(_,a)},s.onBufferAppending=function(a,c){var f=this,w=this.hls,_=this.operationQueue,h=this.tracks,R=c.data,C=c.type,g=c.frag,x=c.part,E=c.chunkMeta,T=E.buffering[C],k=self.performance.now();T.start=k;var L=g.stats.buffering,A=x?x.stats.buffering:null;L.start===0&&(L.start=k),A&&A.start===0&&(A.start=k);var G=h.audio,K=C==="audio"&&E.id===1&&(G==null?void 0:G.container)==="audio/mpeg",W={execute:function(){if(T.executeStart=self.performance.now(),K){var U=f.sourceBuffer[C];if(U){var P=g.start-U.timestampOffset;Math.abs(P)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+P+") sn: "+g.sn+")"),U.timestampOffset=g.start)}}f.appendExecutor(R,C)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,L.first===0&&(L.first=U),A&&A.first===0&&(A.first=U);var P=f.sourceBuffer,H={};for(var V in P)H[V]=b.BufferHelper.getBuffered(P[V]);f.appendError=0,f.hls.trigger(y.Events.BUFFER_APPENDED,{type:C,frag:g,part:x,chunkMeta:E,parent:g.type,timeRanges:H})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",U);var P={type:S.ErrorTypes.MEDIA_ERROR,parent:g.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=S.ErrorDetails.BUFFER_FULL_ERROR:(f.appendError++,P.details=S.ErrorDetails.BUFFER_APPEND_ERROR,f.appendError>w.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),w.trigger(y.Events.ERROR,P)}};_.append(W,C)},s.onBufferFlushing=function(a,c){var f=this,w=this.operationQueue,_=function(R){return{execute:f.removeExecutor.bind(f,R,c.startOffset,c.endOffset),onStart:function(){},onComplete:function(){f.hls.trigger(y.Events.BUFFER_FLUSHED,{type:R})},onError:function(g){m.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",g)}}};c.type?w.append(_(c.type),c.type):this.getSourceBufferTypes().forEach(function(h){w.append(_(h),h)})},s.onFragParsed=function(a,c){var f=this,w=c.frag,_=c.part,h=[],R=_?_.elementaryStreams:w.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?h.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&h.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&h.push("video"));var C=function(){var x=self.performance.now();w.stats.buffering.end=x,_&&(_.stats.buffering.end=x);var E=_?_.stats:w.stats;f.hls.trigger(y.Events.FRAG_BUFFERED,{frag:w,part:_,stats:E,id:w.type})};h.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(C,h)},s.onFragChanged=function(a,c){this.flushBackBuffer()},s.onBufferEos=function(a,c){var f=this,w=this.getSourceBufferTypes().reduce(function(_,h){var R=f.sourceBuffer[h];return(!c.type||c.type===h)&&(R&&!R.ended&&(R.ended=!0,m.logger.log("[buffer-controller]: "+h+" sourceBuffer now EOS"))),_&&!!(!R||R.ended)},!0);w&&this.blockBuffers(function(){var _=f.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},s.onLevelUpdated=function(a,c){var f=c.details;if(!f.fragments.length)return;this.details=f,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},s.flushBackBuffer=function(){var a=this.hls,c=this.details,f=this.media,w=this.sourceBuffer;if(!f||c===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var h=c.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(M.isFiniteNumber)(h)||h<0)return;var R=f.currentTime,C=c.levelTargetDuration,g=Math.max(h,C),x=Math.floor(R/C)*C-g;_.forEach(function(E){var T=w[E];if(T){var k=b.BufferHelper.getBuffered(T);k.length>0&&x>k.start(0)&&(a.trigger(y.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),c.live&&a.trigger(y.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),a.trigger(y.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:E}))}})},s.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,c=this.hls,f=this.media,w=this.mediaSource,_=a.fragments[0].start+a.totalduration,h=f.duration,R=Object(M.isFiniteNumber)(w.duration)?w.duration:0;a.live&&c.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(a)):(_>R&&_>h||!Object(M.isFiniteNumber)(h))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),w.duration=_)},s.updateSeekableRange=function(a){var c=this.mediaSource,f=a.fragments,w=f.length;if(w&&a.live&&c!==null&&c!==void 0&&c.setLiveSeekableRange){var _=Math.max(0,f[0].start),h=Math.max(_,_+a.totalduration);c.setLiveSeekableRange(_,h)}},s.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,c=this.operationQueue,f=this.pendingTracks,w=Object.keys(f).length;if(w&&!a||w===2){this.createSourceBuffers(f),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(h){c.executeNext(h)})}},s.createSourceBuffers=function(a){var c=this.sourceBuffer,f=this.mediaSource;if(!f)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var _ in a)if(!c[_]){var h=a[_];if(!h)throw Error("source buffer exists for track "+_+", however track does not");var R=h.levelCodec||h.codec,C=h.container+";codecs="+R;m.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var g=c[_]=f.addSourceBuffer(C),x=_;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[_]={buffer:g,codec:R,container:h.container,levelCodec:h.levelCodec,id:h.id},w++}catch(E){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:C})}}w&&this.hls.trigger(y.Events.BUFFER_CREATED,{tracks:this.tracks})},s._onSBUpdateStart=function(a){var c=this.operationQueue,f=c.current(a);f.onStart()},s._onSBUpdateEnd=function(a){var c=this.operationQueue,f=c.current(a);f.onComplete(),c.shiftAndExecuteNext(a)},s._onSBUpdateError=function(a,c){m.logger.error("[buffer-controller]: "+a+" SourceBuffer error",c),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var f=this.operationQueue.current(a);f&&f.onError(c)},s.removeExecutor=function(a,c,f){var w=this.media,_=this.mediaSource,h=this.operationQueue,R=this.sourceBuffer,C=R[a];if(!w||!_||!C){m.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(a);return}var g=Object(M.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Object(M.isFiniteNumber)(_.duration)?_.duration:Infinity,E=Math.max(0,c),T=Math.min(f,g,x);T>E?(m.logger.log("[buffer-controller]: Removing ["+E+","+T+"] from the "+a+" SourceBuffer"),console.assert(!C.updating,a+" sourceBuffer must not be updating"),C.remove(E,T)):h.shiftAndExecuteNext(a)},s.appendExecutor=function(a,c){var f=this.operationQueue,w=this.sourceBuffer,_=w[c];if(!_){m.logger.warn("[buffer-controller]: Attempting to append to the "+c+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(c);return}_.ended=!1,console.assert(!_.updating,c+" sourceBuffer must not be updating"),_.appendBuffer(a)},s.blockBuffers=function(a,c){var f=this;if(c===void 0&&(c=this.getSourceBufferTypes()),!c.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var w=this.operationQueue,_=c.map(function(h){return w.appendBlocker(h)});Promise.all(_).then(function(){a(),c.forEach(function(h){var R=f.sourceBuffer[h];(!R||!R.updating)&&w.shiftAndExecuteNext(h)})})},s.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},s.addBufferListener=function(a,c,f){var w=this.sourceBuffer[a];if(!w)return;var _=f.bind(this,a);this.listeners[a].push({event:c,listener:_}),w.addEventListener(c,_)},s.removeBufferListeners=function(a){var c=this.sourceBuffer[a];if(!c)return;this.listeners[a].forEach(function(f){c.removeEventListener(f.event,f.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return y});var M=O("./src/utils/logger.ts"),y=function(){function m(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var S=m.prototype;return S.append=function(p,d){var t=this.queues[d];t.push(p),t.length===1&&this.buffers[d]&&this.executeNext(d)},S.insertAbort=function(p,d){var t=this.queues[d];t.unshift(p),this.executeNext(d)},S.appendBlocker=function(p){var d,t=new Promise(function(r){d=r}),l={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,p),t},S.executeNext=function(p){var d=this.buffers,t=this.queues,l=d[p],r=t[p];if(r.length){var i=r[0];try{i.execute()}catch(o){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(o),(!l||!l.updating)&&(r.shift(),this.executeNext(p))}}},S.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},S.current=function(p){return this.queues[p][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts");function y(b,p){for(var d=0;d0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(t.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},p.getMaxLevel=function(t){var l=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter(function(o,s){return b.isLevelAllowed(s,l.restrictedLevels)&&s<=t});return this.clientRect=null,b.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},p.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()},p.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},p.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,l={width:0,height:0};if(t){var r=t.getBoundingClientRect();l.width=r.width,l.height=r.height,!l.width&&!l.height&&(l.width=r.right-r.left||t.width||0,l.height=r.bottom-r.top||t.height||0)}return this.clientRect=l,l},b.isLevelAllowed=function(t,l){return l===void 0&&(l=[]),l.indexOf(t)===-1},b.getMaxLevelByMediaSize=function(t,l,r){if(!t||!t.length)return-1;for(var i=function(c,f){return f?c.width!==f.width||c.height!==f.height:!0},o=t.length-1,s=0;s=l||u.height>=r)&&i(u,t[s+1])){o=s;break}}return o},m(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(l){}return t}}]),b}();v.default=S},"./src/controller/cmcd-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./src/events.ts"),y=O("./src/types/cmcd.ts"),m=O("./src/utils/buffer-helper.ts"),S=O("./src/utils/logger.ts");function b(o,s){for(var u=0;u=o.length?{done:!0}:{done:!1,value:o[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(o,s){if(!o)return;if(typeof o=="string")return l(o,s);var u=Object.prototype.toString.call(o).slice(8,-1);if(u==="Object"&&o.constructor&&(u=o.constructor.name),u==="Map"||u==="Set")return Array.from(o);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return l(o,s)}function l(o,s){(s==null||s>o.length)&&(s=o.length);for(var u=0,a=new Array(s);uc&&(c=h.bitrate)}return c>0?c:NaN},s.getBufferLength=function(a){var c=this.hls.media,f=a===y.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!f||!c)return NaN;var w=m.BufferHelper.bufferInfo(f,c.currentTime,this.config.maxBufferHole);return w.len*1e3},s.createPlaylistLoader=function(){var a=this.config.pLoader,c=this.applyPlaylistData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,C,g){c(R),this.loader.load(R,C,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},s.createFragmentLoader=function(){var a=this.config.fLoader,c=this.applyFragmentData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,C,g){c(R),this.loader.load(R,C,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},o.uuid=function(){var a=URL.createObjectURL(new Blob),c=a.toString();return URL.revokeObjectURL(a),c.substr(c.lastIndexOf("/")+1)},o.serialize=function(a){for(var c=[],f=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},w=function(K){return Math.round(K)},_=function(K){return w(K/100)*100},h=function(K){return encodeURIComponent(K)},R={br:w,d:w,bl:_,dl:_,mtp:_,nor:h,rtp:_,tb:w},C=Object.keys(a||{}).sort(),g=d(C),x;!(x=g()).done;){var E=x.value,T=a[E];if(!f(T))continue;if(E==="v"&&T===1)continue;if(E=="pr"&&T===1)continue;var k=R[E];k&&(T=k(T));var L=typeof T,A=void 0;E==="ot"||E==="sf"||E==="st"?A=E+"="+T:L==="boolean"?A=E:L==="number"?A=E+"="+T:A=E+"="+JSON.stringify(T),c.push(A)}return c.join(",")},o.toHeaders=function(a){for(var c=Object.keys(a),f={},w=["Object","Request","Session","Status"],_=[{},{},{},{}],h={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},R=0,C=c;Rd){this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var h=d-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(c,f)}break}},o._generateLicenseRequestChallenge=function(u,a){switch(u.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},o._requestLicense=function(u,a){m.logger.log("Requesting content license for key-system");var c=this._mediaKeysList[0];if(!c){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var f=this.getLicenseServerUrl(c.mediaKeySystemDomain),w=this._createLicenseXhr(f,u,a);m.logger.log("Sending license request to URL: "+f);var _=this._generateLicenseRequestChallenge(c,u);w.send(_)}catch(h){m.logger.error("Failure requesting DRM license: "+h),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(u,a){if(!this._emeEnabled)return;var c=a.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var u=this._media,a=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(c){if(c.mediaKeysSession)return c.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(u,a){if(!this._emeEnabled)return;var c=a.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),f=a.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,c,f)},p(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();v.default=r},"./src/controller/fps-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/utils/logger.ts"),m=function(){function S(p){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=p,this.registerListeners()}var b=S.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(d,t){var l=this.hls.config;if(l.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,t,l){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,o=l-this.lastDroppedFrames,s=t-this.lastDecodedFrames,u=1e3*o/i,a=this.hls;if(a.trigger(M.Events.FPS_DROP,{currentDropped:o,currentDecoded:s,totalDroppedFrames:l}),u>0&&o>a.config.fpsDroppedMonitoringThreshold*s){var c=a.currentLevel;y.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=c)&&(c=c-1,a.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:a.currentLevel}),a.autoLevelCapping=c,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=l,this.lastDecodedFrames=t}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var t=d.getVideoPlaybackQuality();this.checkFPS(d,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},S}();v.default=m},"./src/controller/fragment-finders.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"findFragmentByPDT",function(){return m}),O.d(v,"findFragmentByPTS",function(){return S}),O.d(v,"fragmentWithinToleranceTest",function(){return b}),O.d(v,"pdtWithinToleranceTest",function(){return p}),O.d(v,"findFragWithCC",function(){return d});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/binary-search.ts");function m(t,l,r){if(l===null||!Array.isArray(t)||!t.length||!Object(M.isFiniteNumber)(l))return null;var i=t[0].programDateTime;if(l<(i||0))return null;var o=t[t.length-1].endProgramDateTime;if(l>=(o||0))return null;r=r||0;for(var s=0;st&&r.start?-1:0}function p(t,l,r){var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,o=r.endProgramDateTime||0;return o-i>t}function d(t,l){return y.default.search(t,function(r){return r.ccl?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"FragmentState",function(){return m}),O.d(v,"FragmentTracker",function(){return S});var M=O("./src/events.ts"),y=O("./src/types/loader.ts"),m;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(m||(m={}));var S=function(){function d(l){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=l,this._registerListeners()}var t=d.prototype;return t._registerListeners=function(){var r=this.hls;r.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var r=this.hls;r.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(r,i){if(i===y.PlaylistLevelType.MAIN){var o=this.activeFragment,s=this.activeParts;if(!o)return null;if(s)for(var u=s.length;u--;){var a=s[u],c=a?a.end:o.appendedPTS;if(a.start<=r&&c!==void 0&&r<=c)return u>9&&(this.activeParts=s.slice(u-9)),a}else if(o.start<=r&&o.appendedPTS!==void 0&&r<=o.appendedPTS)return o}return this.getBufferedFrag(r,i)},t.getBufferedFrag=function(r,i){for(var o=this.fragments,s=Object.keys(o),u=s.length;u--;){var a=o[s[u]];if((a==null?void 0:a.body.type)===i&&a.buffered){var c=a.body;if(c.start<=r&&r<=c.end)return c}}return null},t.detectEvictedFragments=function(r,i,o){var s=this;Object.keys(this.fragments).forEach(function(u){var a=s.fragments[u];if(!a)return;if(!a.buffered){a.body.type===o&&s.removeFragment(a.body);return}var c=a.range[r];if(!c)return;c.time.some(function(f){var w=!s.isTimeBuffered(f.startPTS,f.endPTS,i);return w&&s.removeFragment(a.body),w})})},t.detectPartialFragments=function(r){var i=this,o=this.timeRanges,s=r.frag,u=r.part;if(!o||s.sn==="initSegment")return;var a=p(s),c=this.fragments[a];if(!c)return;Object.keys(o).forEach(function(f){var w=s.elementaryStreams[f];if(!w)return;var _=o[f],h=u!==null||w.partial===!0;c.range[f]=i.getBufferedTimes(s,u,h,_)}),c.backtrack=c.loaded=null,Object.keys(c.range).length?c.buffered=!0:this.removeFragment(c.body)},t.fragBuffered=function(r){var i=p(r),o=this.fragments[i];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},t.getBufferedTimes=function(r,i,o,s){for(var u={time:[],partial:o},a=i?i.start:r.start,c=i?i.end:r.end,f=r.minEndPTS||c,w=r.maxStartPTS||a,_=0;_=h&&f<=R){u.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(c,s.end(_))});break}else if(ah)u.partial=!0,u.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(c,s.end(_))});else if(c<=h)break}return u},t.getPartialFragment=function(r){var i=null,o,s,u,a=0,c=this.bufferPadding,f=this.fragments;return Object.keys(f).forEach(function(w){var _=f[w];if(!_)return;b(_)&&(s=_.body.start-c,u=_.body.end+c,r>=s&&r<=u&&(o=Math.min(r-s,u-r),a<=o&&(i=_.body,a=o)))}),i},t.getState=function(r){var i=p(r),o=this.fragments[i];return o?o.buffered?b(o)?m.PARTIAL:m.OK:o.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},t.backtrack=function(r,i){var o=p(r),s=this.fragments[o];if(!s||s.backtrack)return null;var u=s.backtrack=i||s.loaded;return s.loaded=null,u},t.getBacktrackData=function(r){var i=p(r),o=this.fragments[i];if(o){var s,u=o.backtrack;if(u!=null&&(s=u.payload)!==null&&s!==void 0&&s.byteLength)return u;this.removeFragment(r)}return null},t.isTimeBuffered=function(r,i,o){for(var s,u,a=0;a=s&&i<=u)return!0;if(i<=s)return!1}return!1},t.onFragLoaded=function(r,i){var o=i.frag,s=i.part;if(o.sn==="initSegment"||o.bitrateTest||s)return;var u=p(o);this.fragments[u]={body:o,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},t.onBufferAppended=function(r,i){var o=this,s=i.frag,u=i.part,a=i.timeRanges;if(s.type===y.PlaylistLevelType.MAIN)if(this.activeFragment=s,u){var c=this.activeParts;c||(this.activeParts=c=[]),c.push(u)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(f){var w=a[f];if(o.detectEvictedFragments(f,w),!u)for(var _=0;_r&&s.removeFragment(c)}})},t.removeFragment=function(r){var i=p(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[i]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var t,l;return d.buffered&&(((t=d.range.video)===null||t===void 0?void 0:t.partial)||((l=d.range.audio)===null||l===void 0?void 0:l.partial))}function p(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"STALL_MINIMUM_DURATION_MS",function(){return b}),O.d(v,"MAX_START_GAP_JUMP",function(){return p}),O.d(v,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),O.d(v,"SKIP_BUFFER_RANGE_START",function(){return t}),O.d(v,"default",function(){return l});var M=O("./src/utils/buffer-helper.ts"),y=O("./src/errors.ts"),m=O("./src/events.ts"),S=O("./src/utils/logger.ts"),b=250,p=2,d=.1,t=.05,l=function(){function r(o,s,u,a){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=o,this.media=s,this.fragmentTracker=u,this.hls=a}var i=r.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(s){var u=this.config,a=this.media,c=this.stalled,f=a.currentTime,w=a.seeking,_=this.seeking&&!w,h=!this.seeking&&w;if(this.seeking=w,f!==s){if(this.moved=!0,c!==null){if(this.stallReported){var R=self.performance.now()-c;S.logger.warn("playback not stuck anymore @"+f+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((h||_)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!M.BufferHelper.getBuffered(a).length)return;var C=M.BufferHelper.bufferInfo(a,f,0),g=C.len>0,x=C.nextStart||0;if(!g&&!x)return;if(w){var E=C.len>p,T=!x||x-f>p&&!this.fragmentTracker.getPartialFragment(f);if(E||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,L=Math.max(x,C.start||0)-f,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=A==null||((k=A.details)===null||k===void 0)?void 0:k.live,K=G?A.details.targetduration*2:p;if(L>0&&L<=K){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(c===null){this.stalled=W;return}var z=W-c;!w&&z>=b&&this._reportStall(C.len);var U=M.BufferHelper.bufferInfo(a,f,u.maxBufferHole);this._tryFixBufferStall(U,z)},i._tryFixBufferStall=function(s,u){var a=this.config,c=this.fragmentTracker,f=this.media,w=f.currentTime,_=c.getPartialFragment(w);if(_){var h=this._trySkipBufferHole(_);if(h)return}s.len>a.maxBufferHole&&u>a.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(s){var u=this.hls,a=this.media,c=this.stallReported;c||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+s+")"),u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:s}))},i._trySkipBufferHole=function(s){for(var u=this.config,a=this.hls,c=this.media,f=c.currentTime,w=0,_=M.BufferHelper.getBuffered(c),h=0;h<_.length;h++){var R=_.start(h);if(f+u.maxBufferHole>=w&&f.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,a)),R=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20;r.playbackRate=Math.min(h,Math.max(1,R))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},t.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},t.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},b(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,i=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:i?r.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var i=r.holdBack,o=r.partHoldBack,s=r.targetduration,u=this.config,a=u.liveSyncDuration,c=u.liveSyncDurationCount,f=u.lowLatencyMode,w=this.hls.userConfig,_=f&&o||i;(w.liveSyncDuration||w.liveSyncDurationCount||_===0)&&(_=a!==void 0?a:c*s);var h=s,R=1;return _+Math.min(this.stallCount*R,h)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),i=this.targetLatency,o=this.levelDetails;if(r===null||i===null||o===null)return null;var s=o.edge,u=r-i-this.edgeStalled,a=s-o.totalduration,c=s-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(a,u),c)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var i=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-i,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,i=this.levelDetails;if(!r||!i)return 0;var o=r.buffered.length;return o?r.buffered.end(o-1):i.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return u});var M=O("./src/types/level.ts"),y=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),p=O("./src/controller/base-playlist-controller.ts"),d=O("./src/types/loader.ts");function t(){return t=Object.assign||function(a){for(var c=1;c0){x=R[0].bitrate,R.sort(function(z,U){return z.bitrate-U.bitrate}),this._levels=R;for(var G=0;Gthis.hls.config.fragLoadingMaxRetry&&(E=h.frag.level)):E=h.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(x=!1),E=R.level),g=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:E=h.level,g=!0;break}E!==void 0&&this.recoverLevel(h,E,g,x)},f.recoverLevel=function(_,h,R,C){var g=_.details,x=this._levels[h];if(x.loadError++,R){var E=this.retryLoadingOrFail(_);if(E)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var T=x.url.length;if(T>1&&x.loadError1){var C=(h.urlId+1)%R;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(g){g.urlId=C}),this.level=_}},f.onFragLoaded=function(_,h){var R=h.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var C=this._levels[R.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},f.onLevelLoaded=function(_,h){var R,C=h.level,g=h.details,x=this._levels[C];if(!x){var E;this.warn("Invalid level index "+C),(E=h.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(g.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(C,h,x.details)):(R=h.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(g.deltaUpdateFailed=!0)},f.onAudioTrackSwitched=function(_,h){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var C=-1,g=this.hls.audioTracks[h.id].groupId,x=0;x0){var C=R.urlId,g=R.url[C];if(_)try{g=_.addDirectives(g)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+h+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+C+" "+g),this.clearTimer(),this.hls.trigger(y.Events.LEVEL_LOADING,{url:g,level:h,id:C,deliveryDirectives:_||null})}},f.removeLevel=function(_,h){var R=function(x,E){return E!==h},C=this._levels.filter(function(g,x){return x!==_?!0:g.url.length>1&&h!==void 0?(g.url=g.url.filter(R),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(R)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(R)),g.urlId=0,!0):!1}).map(function(g,x){var E=g.details;return E!=null&&E.fragments&&E.fragments.forEach(function(T){T.level=x}),g});this._levels=C,this.hls.trigger(y.Events.LEVELS_UPDATED,{levels:C})},r(c,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var h,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===_&&(h=R[_])!==null&&h!==void 0&&h.details)return;if(_<0||_>=R.length){var C=_<0;if(this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:C,reason:"invalid level idx"}),C)return;_=Math.min(_,R.length-1)}this.clearTimer();var g=this.currentLevelIndex,x=R[g],E=R[_];this.log("switching to level "+_+" from "+g),this.currentLevelIndex=_;var T=t({},E,{level:_,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete T._urlId,this.hls.trigger(y.Events.LEVEL_SWITCHING,T);var k=E.details;if(!k||k.live){var L=this.switchParams(E.uri,x==null?void 0:x.details);this.loadPlaylist(L)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),c}(p.default)},"./src/controller/level-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"addGroupId",function(){return m}),O.d(v,"assignTrackIdsByGroup",function(){return S}),O.d(v,"updatePTS",function(){return b}),O.d(v,"updateFragPTSDTS",function(){return d}),O.d(v,"mergeDetails",function(){return t}),O.d(v,"mapPartIntersection",function(){return l}),O.d(v,"mapFragmentIntersection",function(){return r}),O.d(v,"adjustSliding",function(){return i}),O.d(v,"addSliding",function(){return o}),O.d(v,"computeReloadInterval",function(){return s}),O.d(v,"getFragmentWithSN",function(){return u}),O.d(v,"getPartWith",function(){return a});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/logger.ts");function m(c,f,w){switch(f){case"audio":c.audioGroupIds||(c.audioGroupIds=[]),c.audioGroupIds.push(w);break;case"text":c.textGroupIds||(c.textGroupIds=[]),c.textGroupIds.push(w);break}}function S(c){var f={};c.forEach(function(w){var _=w.groupId||"";w.id=f[_]=f[_]||0,f[_]++})}function b(c,f,w){var _=c[f],h=c[w];p(_,h)}function p(c,f){var w=f.startPTS;if(Object(M.isFiniteNumber)(w)){var _=0,h;f.sn>c.sn?(_=w-c.start,h=c):(_=c.start-w,h=f),h.duration!==_&&(h.duration=_)}else if(f.sn>c.sn){var R=c.cc===f.cc;R&&c.minEndPTS?f.start=c.start+(c.minEndPTS-c.start):f.start=c.start+c.duration}else f.start=Math.max(c.start-f.duration,0)}function d(c,f,w,_,h,R){var C=_-w;C<=0&&(y.logger.warn("Fragment should have a positive duration",f),_=w+f.duration,R=h+f.duration);var g=w,x=_,E=f.startPTS,T=f.endPTS;if(Object(M.isFiniteNumber)(E)){var k=Math.abs(E-w);Object(M.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(k,f.deltaPTS):f.deltaPTS=k,g=Math.max(w,E),w=Math.min(w,E),h=Math.min(h,f.startDTS),x=Math.min(_,T),_=Math.max(_,T),R=Math.max(R,f.endDTS)}f.duration=_-w;var L=w-f.start;f.appendedPTS=_,f.start=f.startPTS=w,f.maxStartPTS=g,f.startDTS=h,f.endPTS=_,f.minEndPTS=x,f.endDTS=R;var A=f.sn;if(!c||Ac.endSN)return 0;var G,K=A-c.startSN,W=c.fragments;for(W[K]=f,G=K;G>0;G--)p(W[G],W[G-1]);for(G=K;G=0;h--){var R=_[h].initSegment;if(R){w=R;break}}c.fragmentHint&&delete c.fragmentHint.endPTS;var C=0,g;if(r(c,f,function(G,K){G.relurl&&(C=G.cc-K.cc),Object(M.isFiniteNumber)(G.startPTS)&&Object(M.isFiniteNumber)(G.endPTS)&&(K.start=K.startPTS=G.startPTS,K.startDTS=G.startDTS,K.appendedPTS=G.appendedPTS,K.maxStartPTS=G.maxStartPTS,K.endPTS=G.endPTS,K.endDTS=G.endDTS,K.minEndPTS=G.minEndPTS,K.duration=G.endPTS-G.startPTS,K.duration&&(g=K),f.PTSKnown=f.alignedSliding=!0),K.elementaryStreams=G.elementaryStreams,K.loader=G.loader,K.stats=G.stats,K.urlId=G.urlId,G.initSegment&&(K.initSegment=G.initSegment,w=G.initSegment)}),w){var x=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;x.forEach(function(G){var K;(!G.initSegment||G.initSegment.relurl===((K=w)===null||K===void 0?void 0:K.relurl))&&(G.initSegment=w)})}if(f.skippedSegments&&(f.deltaUpdateFailed=f.fragments.some(function(G){return!G}),f.deltaUpdateFailed)){y.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=f.skippedSegments;E--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}var T=f.fragments;if(C){y.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k=_.length)return;o(f,_[w].start)}function o(c,f){if(f){for(var w=c.fragments,_=c.skippedSegments;_0&&h0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),x=E),this.state=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=y.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,h.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_LEVEL:{var x,E=this.levels,T=this.level,k=E==null||((x=E[T])===null||x===void 0)?void 0:x.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=y.State.IDLE;break}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var L,A=self.performance.now(),G=this.retryDate;(!G||A>=G||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){h.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var x,E,T=this.hls,k=this.levelLastLoaded,L=this.levels,A=this.media,G=T.config,K=T.nextLoadLevel;if(k===null||!A&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!L||!L[K])return;var W=L[K];this.level=T.nextLoadLevel=K;var z=W.details;if(!z||this.state===y.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==K){this.state=y.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,d.PlaylistLevelType.MAIN);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(W.maxBitrate);if(P>=H)return;if(this._streamEnded(U,z)){var V={};this.altAudio&&(V.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,V),this.state=y.State.ENDED;return}var q=U.end,Z=this.getNextFragment(q,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var ce=Z.sn-z.startSN;ce>1&&(Z=z.fragments[ce-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===p.FragmentState.OK&&this.nextLoadPosition>q){var he=this.audioOnly&&!this.altAudio?t.ElementaryStreamTypes.AUDIO:t.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,he,d.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,z)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((x=Z.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((E=Z.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(Z,z):this.loadFragment(Z,z,q)},C.loadFragment=function(x,E,T){var k,L=this.fragmentTracker.getState(x);if(this.fragCurrent=x,L===p.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else L=p.FragmentState.NOT_LOADED}L===p.FragmentState.NOT_LOADED||L===p.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,h.prototype.loadFragment.call(this,x,E,T)):L===p.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(x){var E=this.fragmentTracker.getAppendedFrag(x,d.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},C.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,d.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var x=this.levels,E=this.media;if(E!=null&&E.readyState){var T,k=this.getAppendedFrag(E.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!E.paused&&x){var L=this.hls.nextLoadLevel,A=x[L],G=this.fragLastKbps;G&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*G)+1:T=0}else T=0;var K=this.getBufferedFrag(E.currentTime+T);if(K){var W=this.followingBufferedFrag(K);if(W){this.abortCurrentFrag();var z=W.maxStartPTS?W.maxStartPTS:W.start,U=W.duration,P=Math.max(K.end,z+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(x,E){h.prototype.flushMainBuffer.call(this,x,E,this.altAudio?"video":null)},C.onMediaAttached=function(x,E){h.prototype.onMediaAttached.call(this,x,E);var T=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,T,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),h.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var x=this.media,E=x?x.currentTime:null;Object(M.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(x,E){var T=!1,k=!1,L;E.levels.forEach(function(A){L=A.audioCodec,L&&(L.indexOf("mp4a.40.2")!==-1&&(T=!0),L.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=T&&k&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=E.levels,this.startFragRequested=!1},C.onLevelLoading=function(x,E){var T=this.levels;if(!T||this.state!==y.State.IDLE)return;var k=T[E.level];(!k.details||k.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(k.details))&&(this.state=y.State.WAITING_LEVEL)},C.onLevelLoaded=function(x,E){var T,k=this.levels,L=E.level,A=E.details,G=A.totalduration;if(!k){this.warn("Levels were reset while loading level "+L);return}this.log("Level "+L+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+G);var K=this.fragCurrent;K&&(this.state===y.State.FRAG_LOADING||this.state===y.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==E.level&&K.loader&&(this.state=y.State.IDLE,K.loader.abort()));var W=k[L],z=0;if(A.live||(T=W.details)!==null&&T!==void 0&&T.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;z=this.alignPlaylists(A,W.details)}if(W.details=A,this.levelLastLoaded=L,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:A,level:L}),this.state===y.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=y.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,z),this.tick()},C._handleFragmentLoadProgress=function(x){var E,T=x.frag,k=x.part,L=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var G=A[T.level],K=G.details;if(!K){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var W=G.videoCodec,z=K.PTSKnown||!K.live,U=(E=T.initSegment)===null||E===void 0?void 0:E.data,P=this._getAudioCodec(G),H=this.transmuxer=this.transmuxer||new l.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),V=k?k.index:-1,q=V!==-1,Z=new r.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,L.byteLength,V,q),ce=this.initPTS[T.cc];H.push(L,U,P,W,T,k,K.totalduration,z,Z,ce)},C.onAudioTrackSwitching=function(x,E){var T=this.altAudio,k=!!E.url,L=E.id;if(!k){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;T&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:L})}},C.onAudioTrackSwitched=function(x,E){var T=E.id,k=!!this.hls.audioTracks[T].url;if(k){var L=this.videoBuffer;L&&this.mediaBuffer!==L&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=L)}this.altAudio=k,this.tick()},C.onBufferCreated=function(x,E){var T=E.tracks,k,L,A=!1;for(var G in T){var K=T[G];if(K.id==="main"){if(L=G,k=K,G==="video"){var W=T[G];W&&(this.videoBuffer=W.buffer)}}else A=!0}A&&k?(this.log("Alternate track found, use "+L+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(x,E){var T=E.frag,k=E.part;if(T&&T.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(k?" p: "+k.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===y.State.PARSED&&(this.state=y.State.IDLE);return}var L=k?k.stats:T.stats;this.fragLastKbps=Math.round(8*L.total/(L.buffering.end-L.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,k)},C.onError=function(x,E){switch(E.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.MAIN,E);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=y.State.ERROR):!E.levelRetry&&this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var T=!0,k=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);k&&k.len>.5&&(T=!this.reduceMaxBufferLength(k.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var x=this.media,E=this.gapController;if(!x||!E||!x.readyState)return;var T=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=y.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(x,E){var T=E.type;if(T!==t.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(T===t.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,T,d.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(x,E){this.levels=E.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var x=this.media,E=x.currentTime,T=this.startPosition;if(T>=0&&E0&&(A1&&x.seeking===!1){var T=x.currentTime;if(b.BufferHelper.isBuffered(x,T)?E=this.getAppendedFrag(T):b.BufferHelper.isBuffered(x,T+.1)&&(E=this.getAppendedFrag(T+.1)),E){var k=this.fragPlaying,L=E.level;(!k||E.sn!==k.sn||k.level!==L||E.urlId!==k.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:E}),(!k||k.level!==L)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:L}),this.fragPlaying=E)}}},a(R,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(y.default)},"./src/controller/subtitle-stream-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"SubtitleStreamController",function(){return c});var M=O("./src/events.ts"),y=O("./src/utils/logger.ts"),m=O("./src/utils/buffer-helper.ts"),S=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),p=O("./src/controller/level-helper.ts"),d=O("./src/controller/fragment-tracker.ts"),t=O("./src/controller/base-stream-controller.ts"),l=O("./src/types/loader.ts"),r=O("./src/types/level.ts");function i(f,w){for(var _=0;_=E[L].start&&k<=E[L].end){T=E[L];break}var A=g.start+g.duration;T?T.end=A:(T={start:k,end:A},E.push(T)),this.fragmentTracker.fragBuffered(g)},_.onBufferFlushing=function(R,C){var g=C.startOffset,x=C.endOffset;if(g===0&&x!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,T=this.levels;if(!T.length||!T[E]||!T[E].details)return;var k=T[E].details,L=k.targetduration,A=x-L;if(A<=0)return;C.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(G){for(var K=0;K=k.length||E!==T||!L)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(g=L.details)!==null&&g!==void 0&&g.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var G=A.fragments[0];if(!L.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,A):G&&Object(p.addSliding)(x,G.start);else{var K=this.alignPlaylists(x,L.details);K===0&&G&&Object(p.addSliding)(x,G.start)}}if(L.details=x,this.levelLastLoaded=E,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===t.State.IDLE){var W=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),L.details=void 0)}},_._handleFragmentLoadComplete=function(R){var C=R.frag,g=R.payload,x=C.decryptdata,E=this.hls;if(this.fragContextChanged(C))return;if(g&&g.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),x.key.buffer,x.iv.buffer).then(function(k){var L=performance.now();E.trigger(M.Events.FRAG_DECRYPTED,{frag:C,payload:k,stats:{tstart:T,tdecrypt:L}})})}},_.doTick=function(){if(!this.media){this.state=t.State.IDLE;return}if(this.state===t.State.IDLE){var R,C=this.currentTrackId,g=this.levels;if(!g.length||!g[C]||!g[C].details)return;var x=g[C].details,E=x.targetduration,T=this.config,k=this.media,L=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-E,T.maxBufferHole),A=L.end,G=L.len,K=this.getMaxBufferLength()+E;if(G>K)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var W=x.fragments,z=W.length,U=x.edge,P,H=this.fragPrevious;if(A-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)},s.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},s.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=r(this.media.textTracks);a.forEach(function(c){Object(y.clearCurrentCues)(c)}),this.subtitleTrack=-1,this.media=null},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(a,c){this.tracks=c.subtitleTracks},s.onSubtitleTrackLoaded=function(a,c){var f=c.id,w=c.details,_=this.trackId,h=this.tracksInGroup[_];if(!h){this.warn("Invalid subtitle track id "+f);return}var R=h.details;h.details=c.details,this.log("subtitle track "+f+" loaded ["+w.startSN+"-"+w.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,c,R))},s.onLevelLoading=function(a,c){this.switchLevel(c.level)},s.onLevelSwitching=function(a,c){this.switchLevel(c.level)},s.switchLevel=function(a){var c=this.hls.levels[a];if(!(c!=null&&c.textGroupIds))return;var f=c.textGroupIds[c.urlId];if(this.groupId!==f){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(C){return!f||C.groupId===f});this.tracksInGroup=_;var h=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=f;var R={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,R),h!==-1&&this.setSubtitleTrack(h,w)}},s.findTrackId=function(a){for(var c=this.tracksInGroup,f=0;f=w.length)return;this.clearTimer();var _=w[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,_){var h=_.id,R=_.groupId,C=R===void 0?"":R,g=_.name,x=_.type,E=_.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:h,groupId:C,name:g,type:x,url:E});var T=this.switchParams(_.url,c==null?void 0:c.details);this.loadPlaylist(T)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:a})},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,c=r(this.media.textTracks),f=0;f=0&&(x[0]=Math.min(x[0],w),x[1]=Math.max(x[1],_),C=!0,E/(_-w)>.5))return}if(C||R.push([w,_]),this.config.renderTextTracksNatively){var T=this.captionsTracks[f];this.Cues.newCue(T,w,_,h)}else{var k=this.Cues.newCue(null,w,_,h);this.hls.trigger(y.Events.CUES_PARSED,{type:"captions",cues:k,track:f})}},a.onInitPtsFound=function(f,w){var _=this,h=w.frag,R=w.id,C=w.initPTS,g=w.timescale,x=this.unparsedVttFrags;R==="main"&&(this.initPTS[h.cc]=C,this.timescale[h.cc]=g),x.length&&(this.unparsedVttFrags=[],x.forEach(function(E){_.onFragLoaded(y.Events.FRAG_LOADED,E)}))},a.getExistingTrack=function(f){var w=this.media;if(w)for(var _=0;_>>8^g&255^99,d[h]=g,t[g]=h;var x=_[h],E=_[x],T=_[E],k=_[g]*257^g*16843008;r[h]=k<<24|k>>>8,i[h]=k<<16|k>>>16,o[h]=k<<8|k>>>24,s[h]=k,k=T*16843009^E*65537^x*257^h*16843008,a[g]=k<<24|k>>>8,c[g]=k<<16|k>>>16,f[g]=k<<8|k>>>24,w[g]=k,h?(h=x^_[_[_[T^x]]],R^=_[_[R]]):h=R=1}},b.expandKey=function(d){for(var t=this.uint8ArrayToUint32Array_(d),l=!0,r=0;r>>6)+1;var k=(f[w+2]&60)>>>2;if(k>T.length-1){c.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return C=(f[w+2]&1)<<2,C|=(f[w+3]&192)>>>6,M.logger.log("manifest codec:"+_+", ADTS type:"+h+", samplingIndex:"+k),/firefox/i.test(x)?k>=6?(h=5,g=new Array(4),R=k-3):(h=2,g=new Array(2),R=k):x.indexOf("android")!==-1?(h=2,g=new Array(2),R=k):(h=5,g=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&k>=6?R=k-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(k>=6&&C===1||/vivaldi/i.test(x))||!_&&C===1)&&(h=2,g=new Array(2)),R=k)),g[0]=h<<3,g[0]|=(k&14)>>1,g[1]|=(k&1)<<7,g[1]|=C<<3,h===5&&(g[1]|=(R&14)>>1,g[2]=(R&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:T[k],channelCount:C,codec:"mp4a.40."+h,manifestCodec:E}}function b(c,f){return c[f]===255&&(c[f+1]&246)===240}function p(c,f){return c[f+1]&1?7:9}function d(c,f){return(c[f+3]&3)<<11|c[f+4]<<3|(c[f+5]&224)>>>5}function t(c,f){return f+5=c.length)return!1;var _=d(c,f);if(_<=w)return!1;var h=f+_;return h===c.length||l(c,h)}return!1}function o(c,f,w,_,h){if(!c.samplerate){var R=S(f,w,_,h);if(!R)return;c.config=R.config,c.samplerate=R.samplerate,c.channelCount=R.channelCount,c.codec=R.codec,c.manifestCodec=R.manifestCodec,M.logger.log("parsed codec:"+c.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function s(c){return 1024*9e4/c}function u(c,f,w,_,h){var R=p(c,f),C=d(c,f);if(C-=R,C>0){var g=w+_*h;return{headerLength:R,frameLength:C,stamp:g}}}function a(c,f,w,_,h){var R=s(c.samplerate),C=u(f,w,_,h,R);if(C){var g=C.frameLength,x=C.headerLength,E=C.stamp,T=x+g,k=Math.max(0,w+T-f.length),L;k?(L=new Uint8Array(T-x),L.set(f.subarray(w+x,f.length),0)):L=f.subarray(w+x,w+T);var A={unit:L,pts:E};return k||c.samples.push(A),{sample:A,length:T,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"initPTSFn",function(){return d});var M=O("./src/polyfills/number.ts"),y=O("./src/demux/id3.ts"),m=O("./src/demux/dummy-demuxed-track.ts"),S=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),p=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=t.prototype;return l.resetInitSegment=function(i,o,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(i,o){return!1},l.appendFrame=function(i,o,s){},l.demux=function(i,o){this.cachedData&&(i=Object(S.appendUint8Array)(this.cachedData,i),this.cachedData=null);var s=y.getID3Data(i,0),u=s?s.length:0,a,c,f=this._audioTrack,w=this._id3Track,_=s?y.getTimeStamp(s):void 0,h=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(_,o)),s&&s.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:s}),c=this.initPTS;up?(this.word<<=p,this.bitsAvailable-=p):(p-=this.bitsAvailable,d=p>>3,p-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=p,this.bitsAvailable-=p)},S.readBits=function(p){var d=Math.min(this.bitsAvailable,p),t=this.word>>>32-d;return p>32&&M.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=p-d,d>0&&this.bitsAvailable?t<>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},S.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(p){for(var d=8,t=8,l,r=0;r0?h.subarray(C,C+g):void 0},S=function(h,R){var C=0;return C=(h[R]&127)<<21,C|=(h[R+1]&127)<<14,C|=(h[R+2]&127)<<7,C|=h[R+3]&127,C},b=function(h,R){return M(h,R)&&S(h,R+6)+10<=h.length-R},p=function(h){for(var R=l(h),C=0;C>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(T);break;case 12:case 13:k=h[G++],A+=String.fromCharCode((T&31)<<6|k&63);break;case 14:k=h[G++],L=h[G++],A+=String.fromCharCode((T&15)<<12|(k&63)<<6|(L&63)<<0);break;default:}}return A},c={decodeTextFrame:o},f;function w(){return!f&&typeof self.TextDecoder!="undefined"&&(f=new self.TextDecoder("utf-8")),f}},"./src/demux/mp3demuxer.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/demux/base-audio-demuxer.ts"),y=O("./src/demux/id3.ts"),m=O("./src/utils/logger.ts"),S=O("./src/demux/mpegaudio.ts");function b(t,l){t.prototype=Object.create(l.prototype),t.prototype.constructor=t,p(t,l)}function p(t,l){return p=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},p(t,l)}var d=function(t){b(l,t);function l(){return t.apply(this,arguments)||this}var r=l.prototype;return r.resetInitSegment=function(o,s,u){t.prototype.resetInitSegment.call(this,o,s,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:u,inputTimeScale:9e4,dropped:0}},l.probe=function(o){if(!o)return!1;for(var s=y.getID3Data(o,0)||[],u=s.length,a=o.length;u0},b.demux=function(d){var t=d,l=Object(y.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(M.appendUint8Array)(this.remainderData,d));var r=Object(M.segmentValidRange)(t);this.remainderData=r.remainder,l.samples=r.valid||new Uint8Array}else l.samples=t;return{audioTrack:Object(y.dummyTrack)(),avcTrack:l,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.flush=function(){var d=Object(y.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(y.dummyTrack)(),avcTrack:d,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.demuxSampleAes=function(d,t,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},S}();m.minProbeByteLength=1024,v.default=m},"./src/demux/mpegaudio.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"appendFrame",function(){return p}),O.d(v,"parseHeader",function(){return d}),O.d(v,"isHeaderPattern",function(){return t}),O.d(v,"isHeader",function(){return l}),O.d(v,"canParse",function(){return r}),O.d(v,"probe",function(){return i});var M=null,y=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function p(o,s,u,a,c){if(u+24>s.length)return;var f=d(s,u);if(f&&u+f.frameLength<=s.length){var w=f.samplesPerFrame*9e4/f.sampleRate,_=a+c*w,h={unit:s.subarray(u,u+f.frameLength),pts:_,dts:_};return o.config=[],o.channelCount=f.channelCount,o.samplerate=f.sampleRate,o.samples.push(h),{sample:h,length:f.frameLength,missing:0}}}function d(o,s){var u=o[s+1]>>3&3,a=o[s+1]>>1&3,c=o[s+2]>>4&15,f=o[s+2]>>2&3;if(u!==1&&c!==0&&c!==15&&f!==3){var w=o[s+2]>>1&1,_=o[s+3]>>6,h=u===3?3-a:a===3?3:4,R=y[h*14+c-1]*1e3,C=u===3?0:u===2?1:2,g=m[C*3+f],x=_===3?1:2,E=S[u][a],T=b[a],k=E*8*T,L=Math.floor(E*R/g+w)*T;if(M===null){var A=navigator.userAgent||"",G=A.match(/Chrome\/(\d+)/i);M=G?parseInt(G[1]):0}var K=!!M&&M<=87;return K&&a===2&&R>=224e3&&_===0&&(o[s+3]=o[s+3]|128),{sampleRate:g,channelCount:x,frameLength:L,samplesPerFrame:k}}}function t(o,s){return o[s]===255&&(o[s+1]&224)===224&&(o[s+1]&6)!==0}function l(o,s){return s+1=d.length){l();return}if(d[t].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(d,t,l,r),!r)return}},b.getAvcEncryptedData=function(d){for(var t=Math.floor((d.length-48)/160)*16+16,l=new Int8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)l.set(d.subarray(i,i+16),r);return l},b.getAvcDecryptedUnit=function(d,t){for(var l=new Uint8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)d.set(l.subarray(r,r+16),i);return d},b.decryptAvcSample=function(d,t,l,r,i,o){var s=Object(y.discardEPB)(i.data),u=this.getAvcEncryptedData(s),a=this;this.decryptBuffer(u.buffer,function(c){i.data=a.getAvcDecryptedUnit(s,c),o||a.decryptAvcSamples(d,t,l+1,r)})},b.decryptAvcSamples=function(d,t,l,r){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,l=0){if(t>=d.length){r();return}for(var i=d[t].units;!(l>=i.length);l++){var o=i[l];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var s=this.decrypter.isSync();if(this.decryptAvcSample(d,t,l,r,o,s),!s)return}}},S}();v.default=m},"./src/demux/transmuxer-interface.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./node_modules/webworkify-webpack/index.js"),y=O.n(M),m=O("./src/events.ts"),S=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),p=O("./src/errors.ts"),d=O("./src/utils/mediasource-helper.ts"),t=O("./node_modules/eventemitter3/index.js"),l=O.n(t),r=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function o(u,a,c,f){var w=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=u,this.id=a,this.onTransmuxComplete=c,this.onFlush=f;var _=u.config,h=function(E,T){T=T||{},T.frag=w.frag,T.id=w.id,u.trigger(E,T)};this.observer=new t.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,h),this.observer.on(m.Events.ERROR,h);var R={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var g;try{g=this.worker=M("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(x){u.trigger(m.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},g.postMessage({cmd:"init",typeSupported:R,vendor:C,id:a,config:JSON.stringify(_)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new S.default(this.observer,R,_,C,a),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,_,C,a)}var s=o.prototype;return s.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var c=this.transmuxer;c&&(c.destroy(),this.transmuxer=null)}var f=this.observer;f&&f.removeAllListeners(),this.observer=null},s.push=function(a,c,f,w,_,h,R,C,g,x){var E=this;g.transmuxing.start=self.performance.now();var T=this.transmuxer,k=this.worker,L=h?h.start:_.start,A=_.decryptdata,G=this.frag,K=!(G&&_.cc===G.cc),W=!(G&&g.level===G.level),z=G?g.sn-G.sn:-1,U=this.part?g.part-this.part.index:1,P=!W&&(z===1||z===0&&U===1),H=self.performance.now();(W||z||_.stats.parsing.start===0)&&(_.stats.parsing.start=H),h&&(U||!P)&&(h.stats.parsing.start=H);var V=new S.TransmuxState(K,P,C,W,L);if(!P||K){b.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+` discontinuity: `+K+` trackSwitch: `+W+` contiguous: `+P+` accurateTimeOffset: `+C+` timeOffset: `+L);var q=new S.TransmuxConfig(f,w,c,R,x);this.configureTransmuxer(q)}if(this.frag=_,this.part=h,k)k.postMessage({cmd:"demux",data:a,decryptdata:A,chunkMeta:g,state:V},a instanceof ArrayBuffer?[a]:[]);else if(T){var Z=T.push(a,A,g,V);Object(S.isPromise)(Z)?Z.then(function(ce){E.handleTransmuxComplete(ce)}):this.handleTransmuxComplete(Z)}},s.flush=function(a){var c=this;a.transmuxing.start=self.performance.now();var f=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:a});else if(f){var _=f.flush(a);Object(S.isPromise)(_)?_.then(function(h){c.handleFlushResult(h,a)}):this.handleFlushResult(_,a)}},s.handleFlushResult=function(a,c){var f=this;a.forEach(function(w){f.handleTransmuxComplete(w)}),this.onFlush(c)},s.onWorkerMessage=function(a){var c=a.data,f=this.hls;switch(c.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.id=this.id,f.trigger(c.event,c.data);break}}},s.configureTransmuxer=function(a){var c=this.worker,f=this.transmuxer;c?c.postMessage({cmd:"configure",config:a}):f&&f.configure(a)},s.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},o}()},"./src/demux/transmuxer-worker.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return p});var M=O("./src/demux/transmuxer.ts"),y=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=O("./node_modules/eventemitter3/index.js"),b=O.n(S);function p(i){var o=new S.EventEmitter,s=function(a,c){i.postMessage({event:a,data:c})};o.on(y.Events.FRAG_DECRYPTED,s),o.on(y.Events.ERROR,s),i.addEventListener("message",function(u){var a=u.data;switch(a.cmd){case"init":{var c=JSON.parse(a.config);i.transmuxer=new M.default(o,a.typeSupported,c,a.vendor,a.id),Object(m.enableLogs)(c.debug),s("init",null);break}case"configure":{i.transmuxer.configure(a.config);break}case"demux":{var f=i.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(M.isPromise)(f)?f.then(function(h){d(i,h)}):d(i,f);break}case"flush":{var w=a.chunkMeta,_=i.transmuxer.flush(w);Object(M.isPromise)(_)?_.then(function(h){l(i,h,w)}):l(i,_,w);break}default:break}})}function d(i,o){if(r(o.remuxResult))return;var s=[],u=o.remuxResult,a=u.audio,c=u.video;a&&t(s,a),c&&t(s,c),i.postMessage({event:"transmuxComplete",data:o},s)}function t(i,o){o.data1&&i.push(o.data1.buffer),o.data2&&i.push(o.data2.buffer)}function l(i,o,s){o.forEach(function(u){d(i,u)}),i.postMessage({event:"flush",data:s})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return c}),O.d(v,"isPromise",function(){return _}),O.d(v,"TransmuxConfig",function(){return h}),O.d(v,"TransmuxState",function(){return R});var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/crypt/decrypter.ts"),S=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),p=O("./src/demux/tsdemuxer.ts"),d=O("./src/demux/mp3demuxer.ts"),t=O("./src/remux/mp4-remuxer.ts"),l=O("./src/remux/passthrough-remuxer.ts"),r=O("./src/demux/chunk-cache.ts"),i=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),s;try{s=self.performance.now.bind(self.performance)}catch(C){o.logger.debug("Unable to use Performance API on this environment"),s=self.Date.now}var u=[{demux:p.default,remux:t.default},{demux:b.default,remux:l.default},{demux:S.default,remux:t.default},{demux:d.default,remux:t.default}],a=1024;u.forEach(function(C){var g=C.demux;a=Math.max(a,g.minProbeByteLength)});var c=function(){function C(x,E,T,k,L){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 r.default,this.observer=x,this.typeSupported=E,this.config=T,this.vendor=k,this.id=L}var g=C.prototype;return g.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},g.push=function(E,T,k,L){var A=this,G=k.transmuxing;G.executeStart=s();var K=new Uint8Array(E),W=this.cache,z=this.config,U=this.currentTransmuxState,P=this.transmuxConfig;L&&(this.currentTransmuxState=L);var H=f(K,T);if(H&&H.method==="AES-128"){var V=this.getDecrypter();if(z.enableSoftwareAES){var q=V.softwareDecrypt(K,H.key.buffer,H.iv.buffer);if(!q)return G.executeEnd=s(),w(k);K=new Uint8Array(q)}else return this.decryptionPromise=V.webCryptoDecrypt(K,H.key.buffer,H.iv.buffer).then(function(J){var X=A.push(J,null,k);return A.decryptionPromise=null,X}),this.decryptionPromise}var Z=L||U,ce=Z.contiguous,he=Z.discontinuity,ae=Z.trackSwitch,xe=Z.accurateTimeOffset,ge=Z.timeOffset,oe=P.audioCodec,se=P.videoCodec,te=P.defaultInitPts,be=P.duration,ee=P.initSegmentData;if((he||ae)&&this.resetInitSegment(ee,oe,se,be),he&&this.resetInitialTimestamp(te),ce||this.resetContiguity(),this.needsProbing(K,he,ae)){if(W.dataLength){var ie=W.flush();K=Object(i.appendUint8Array)(ie,K)}this.configureTransmuxer(K,P)}var Ee=this.transmux(K,H,ge,xe,k),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,G.executeEnd=s(),Ee},g.flush=function(E){var T=this,k=E.transmuxing;k.executeStart=s();var L=this.decrypter,A=this.cache,G=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return T.flush(E)});var W=[],z=G.timeOffset;if(L){var U=L.flush();U&&W.push(this.push(U,null,E))}var P=A.dataLength;A.reset();var H=this.demuxer,V=this.remuxer;if(!H||!V)return P>=a&&this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=s(),[w(E)];var q=H.flush(z);return _(q)?q.then(function(Z){return T.flushRemux(W,Z,E),W}):(this.flushRemux(W,q,E),W)},g.flushRemux=function(E,T,k){var L=T.audioTrack,A=T.avcTrack,G=T.id3Track,K=T.textTrack,W=this.currentTransmuxState,z=W.accurateTimeOffset,U=W.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var P=this.remuxer.remux(L,A,G,K,U,z,!0,this.id);E.push({remuxResult:P,chunkMeta:k}),k.transmuxing.executeEnd=s()},g.resetInitialTimestamp=function(E){var T=this.demuxer,k=this.remuxer;if(!T||!k)return;T.resetTimeStamp(E),k.resetTimeStamp(E)},g.resetContiguity=function(){var E=this.demuxer,T=this.remuxer;if(!E||!T)return;E.resetContiguity(),T.resetNextTimestamp()},g.resetInitSegment=function(E,T,k,L){var A=this.demuxer,G=this.remuxer;if(!A||!G)return;A.resetInitSegment(T,k,L),G.resetInitSegment(E,T,k)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(E,T,k,L,A){var G;return T&&T.method==="SAMPLE-AES"?G=this.transmuxSampleAes(E,T,k,L,A):G=this.transmuxUnencrypted(E,k,L,A),G},g.transmuxUnencrypted=function(E,T,k,L){var A=this.demuxer.demux(E,T,!1,!this.config.progressive),G=A.audioTrack,K=A.avcTrack,W=A.id3Track,z=A.textTrack,U=this.remuxer.remux(G,K,W,z,T,k,!1,this.id);return{remuxResult:U,chunkMeta:L}},g.transmuxSampleAes=function(E,T,k,L,A){var G=this;return this.demuxer.demuxSampleAes(E,T,k).then(function(K){var W=G.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,k,L,!1,G.id);return{remuxResult:W,chunkMeta:A}})},g.configureTransmuxer=function(E,T){for(var k=this.config,L=this.observer,A=this.typeSupported,G=this.vendor,K=T.audioCodec,W=T.defaultInitPts,z=T.duration,U=T.initSegmentData,P=T.videoCodec,H,V=0,q=u.length;V0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(x=g),x}var w=function(g){return{remuxResult:{},chunkMeta:g}};function _(C){return"then"in C&&C.then instanceof Function}var h=function(g,x,E,T,k){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=x,this.initSegmentData=E,this.duration=T,this.defaultInitPts=k},R=function(g,x,E,T,k){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=x,this.accurateTimeOffset=E,this.trackSwitch=T,this.timeOffset=k}},"./src/demux/tsdemuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"discardEPB",function(){return w});var M=O("./src/demux/adts.ts"),y=O("./src/demux/mpegaudio.ts"),m=O("./src/demux/exp-golomb.ts"),S=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),p=O("./src/events.ts"),d=O("./src/utils/mp4-tools.ts"),t=O("./src/utils/logger.ts"),l=O("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function _(R,C,g){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=C,this.typeSupported=g}_.probe=function(C){var g=_.syncOffset(C);return g<0?!1:(g&&t.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},_.syncOffset=function(C){for(var g=Math.min(1e3,C.length-3*188),x=0;x>4,oe=void 0;if(ge>1){if(oe=he+5+C[he+4],oe===he+188)continue}else oe=he+4;switch(xe){case G:ae&&(K&&(T=a(K))&&this.parseAVCPES(T,!1),K={data:[],size:0}),K&&(K.data.push(C.subarray(oe,he+188)),K.size+=he+188-oe);break;case W:ae&&(U&&(T=a(U))&&(L.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(C.subarray(oe,he+188)),U.size+=he+188-oe);break;case z:ae&&(P&&(T=a(P))&&this.parseID3PES(T),P={data:[],size:0}),P&&(P.data.push(C.subarray(oe,he+188)),P.size+=he+188-oe);break;case 0:ae&&(oe+=C[oe]+1),q=this._pmtId=s(C,oe);break;case q:{ae&&(oe+=C[oe]+1);var se=u(C,oe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);G=se.avc,G>0&&(k.pid=G),W=se.audio,W>0&&(L.pid=W,L.isAAC=se.isAAC),z=se.id3,z>0&&(A.pid=z),H&&!V&&(t.logger.log("reparse from beginning"),H=!1,he=ce-188),V=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=K,L.pesData=U,A.pesData=P;var te={audioTrack:L,avcTrack:k,id3Track:A,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(te),te},h.flush=function(){var C=this.remainderData;this.remainderData=null;var g;return C?g=this.demux(C,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},h.extractRemainingSamples=function(C){var g=C.audioTrack,x=C.avcTrack,E=C.id3Track,T=x.pesData,k=g.pesData,L=E.pesData,A;T&&(A=a(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,k&&(A=a(k))?(g.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),g.pesData=null):(k!=null&&k.size&&t.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=k),L&&(A=a(L))?(this.parseID3PES(A),E.pesData=null):E.pesData=L},h.demuxSampleAes=function(C,g,x){var E=this.demux(C,x,!0,!this.config.progressive),T=this.sampleAes=new b.default(this.observer,this.config,g);return this.decrypt(E,T)},h.decrypt=function(C,g){return new Promise(function(x){var E=C.audioTrack,T=C.avcTrack;E.samples&&E.isAAC?g.decryptAacSamples(E.samples,0,function(){T.samples?g.decryptAvcSamples(T.samples,0,0,function(){x(C)}):x(C)}):T.samples&&g.decryptAvcSamples(T.samples,0,0,function(){x(C)})})},h.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},h.parseAVCPES=function(C,g){var x=this,E=this._avcTrack,T=this.parseAVCNALu(C.data),k=!1,L=this.avcSample,A,G=!1;C.data=null,L&&T.length&&!E.audFound&&(c(L,E),L=this.avcSample=o(!1,C.pts,C.dts,"")),T.forEach(function(K){switch(K.type){case 1:{A=!0,L||(L=x.avcSample=o(!0,C.pts,C.dts,"")),k&&(L.debug+="NDR "),L.frame=!0;var W=K.data;if(G&&W.length>4){var z=new m.default(W).readSliceType();(z===2||z===4||z===7||z===9)&&(L.key=!0)}break}case 5:A=!0,L||(L=x.avcSample=o(!0,C.pts,C.dts,"")),k&&(L.debug+="IDR "),L.key=!0,L.frame=!0;break;case 6:{A=!0,k&&L&&(L.debug+="SEI ");var U=new m.default(w(K.data));U.readUByte();for(var P=0,H=0,V=!1,q=0;!V&&U.bytesAvailable>1;){P=0;do q=U.readUByte(),P+=q;while(q===255);H=0;do q=U.readUByte(),H+=q;while(q===255);if(P===4&&U.bytesAvailable!==0){V=!0;var Z=U.readUByte();if(Z===181){var ce=U.readUShort();if(ce===49){var he=U.readUInt();if(he===1195456820){var ae=U.readUByte();if(ae===3){for(var xe=U.readUByte(),ge=U.readUByte(),oe=31&xe,se=[xe,ge],te=0;te16){for(var be=[],ee=0;ee<16;ee++)be.push(U.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&be.push("-");for(var ie=H-16,Ee=new Uint8Array(ie),ne=0;ne=0){var U={data:C.subarray(W,L-E-1),type:z};k.push(U)}else{var P=this.getLastNalUnit();if(P&&(T&&L<=4-T&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-T))),G=L-E-1,G>0)){var H=new Uint8Array(P.data.byteLength+G);H.set(P.data,0),H.set(C.subarray(0,G),P.data.byteLength),P.data=H,P.state=0}}L=0&&E>=0){var V={data:C.subarray(W,g),type:z,state:E};k.push(V)}if(k.length===0){var q=this.getLastNalUnit();if(q){var Z=new Uint8Array(q.data.byteLength+C.byteLength);Z.set(q.data,0),Z.set(C,q.data.byteLength),q.data=Z}}return x.naluState=E,k},h.parseAACPES=function(C){var g=0,x=this._audioTrack,E=this.aacOverFlow,T=C.data;if(E){this.aacOverFlow=null;var k=E.sample.unit.byteLength,L=Math.min(E.missing,k),A=k-L;E.sample.unit.set(T.subarray(0,L),A),x.samples.push(E.sample),g=E.missing}var G,K;for(G=g,K=T.length;G1;){var k=new Uint8Array(T[0].length+T[1].length);k.set(T[0]),k.set(T[1],T[0].length),T[0]=k,T.splice(1,1)}R=T[0];var L=(R[0]<<16)+(R[1]<<8)+R[2];if(L===1){if(C=(R[4]<<8)+R[5],C&&C>_.size-6)return null;var A=R[7];A&192&&(x=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,A&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,x-E>60*9e4&&(t.logger.warn(Math.round((x-E)/9e4)+"s delta between PTS and DTS, align them"),x=E)):E=x),g=R[8];var G=g+9;if(_.size<=G)return null;_.size-=G;for(var K=new Uint8Array(_.size),W=0,z=T.length;WU){G-=U;continue}else R=R.subarray(G),U-=G,G=0;K.set(R,h),h+=U}return C&&(C-=g+3),{data:K,pts:x,dts:E,len:C}}return null}function c(_,h){if(_.units.length&&_.frame){if(_.pts===void 0){var R=h.samples,C=R.length;if(C){var g=R[C-1];_.pts=g.pts,_.dts=g.dts}else{h.dropped++;return}}h.samples.push(_)}_.debug.length&&t.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function f(_,h){var R=_.length;if(R>0){if(h.pts>=_[R-1].pts)_.push(h);else for(var C=R-1;C>=0;C--)if(h.pts<_[C].pts){_.splice(C,0,h);break}}else _.push(h)}function w(_){for(var h=_.byteLength,R=[],C=1;Cx)return T;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,x=this.autoLevelCapping,E;return x===-1&&g&&g.length?E=g.length-1:E=x,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var x=this.audioTrackController;x&&(x.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return c.ErrorTypes}},{key:"ErrorDetails",get:function(){return c.ErrorDetails}},{key:"DefaultConfig",get:function(){return h.defaultConfig?h.defaultConfig:o.hlsDefaultConfig},set:function(g){h.defaultConfig=g}}]),h}();_.defaultConfig=void 0},"./src/is-supported.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isSupported",function(){return m}),O.d(v,"changeTypeSupported",function(){return S});var M=O("./src/utils/mediasource-helper.ts");function y(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var b=Object(M.getMediaSource)();if(!b)return!1;var p=y(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),t=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!d&&!!t}function S(){var b,p=y();return typeof(p==null||((b=p.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i}),O.d(v,"LoadError",function(){return s});var M=O("./src/polyfills/number.ts"),y=O("./src/errors.ts");function m(u,a){u.prototype=Object.create(a.prototype),u.prototype.constructor=u,t(u,a)}function S(u){var a=typeof Map=="function"?new Map:void 0;return S=function(f){if(f===null||!d(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(f))return a.get(f);a.set(f,w)}function w(){return b(f,arguments,l(this).constructor)}return w.prototype=Object.create(f.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),t(w,f)},S(u)}function b(u,a,c){return p()?b=Reflect.construct:b=function(w,_,h){var R=[null];R.push.apply(R,_);var C=Function.bind.apply(w,R),g=new C;return h&&t(g,h.prototype),g},b.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function d(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function t(u,a){return t=Object.setPrototypeOf||function(f,w){return f.__proto__=w,f},t(u,a)}function l(u){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},l(u)}var r=Math.pow(2,17),i=function(){function u(c){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=c}var a=u.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(f,w){var _=this,h=f.url;if(!h)return Promise.reject(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(h?"part list":"url")));this.abort();var R=this.config,C=R.fLoader,g=R.loader;return new Promise(function(x,E){_.loader&&_.loader.destroy();var T=_.loader=f.loader=C?new C(R):new g(R),k=o(f),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};f.stats=T.stats,T.load(k,L,{onSuccess:function(G,K,W,z){_.resetLoader(f,T),x({frag:f,part:null,payload:G.data,networkDetails:z})},onError:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:G,networkDetails:W}))},onAbort:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:W}))},onTimeout:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:W}))},onProgress:function(G,K,W,z){w&&w({frag:f,part:null,payload:W,networkDetails:z})}})})},a.loadPart=function(f,w,_){var h=this;this.abort();var R=this.config,C=R.fLoader,g=R.loader;return new Promise(function(x,E){h.loader&&h.loader.destroy();var T=h.loader=f.loader=C?new C(R):new g(R),k=o(f,w),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};w.stats=T.stats,T.load(k,L,{onSuccess:function(G,K,W,z){h.resetLoader(f,T),h.updateStatsFromPart(f,w);var U={frag:f,part:w,payload:G.data,networkDetails:z};_(U),x(U)},onError:function(G,K,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:w,response:G,networkDetails:W}))},onAbort:function(G,K,W){f.stats.aborted=w.stats.aborted,h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:w,networkDetails:W}))},onTimeout:function(G,K,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:w,networkDetails:W}))}})})},a.updateStatsFromPart=function(f,w){var _=f.stats,h=w.stats,R=h.total;if(_.loaded+=h.loaded,R){var C=Math.round(f.duration/w.duration),g=Math.min(Math.round(_.loaded/R),C),x=C-g,E=x*Math.round(_.loaded/g);_.total=_.loaded+E}else _.total=Math.max(_.loaded,_.total);var T=_.loading,k=h.loading;T.start?T.first+=k.first-k.start:(T.start=k.start,T.first=k.first),T.end=k.end},a.resetLoader=function(f,w){f.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},u}();function o(u,a){a===void 0&&(a=null);var c=a||u,f={frag:u,part:a,responseType:"arraybuffer",url:c.url,headers:{},rangeStart:0,rangeEnd:0},w=c.byteRangeStartOffset,_=c.byteRangeEndOffset;return Object(M.isFiniteNumber)(w)&&Object(M.isFiniteNumber)(_)&&(f.rangeStart=w,f.rangeEnd=_),f}var s=function(u){m(a,u);function a(c){for(var f,w=arguments.length,_=new Array(w>1?w-1:0),h=1;h>8*(15-R)&255;return h},f.setDecryptDataFromLevelKey=function(_,h){var R=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(R=b.LevelKey.fromURI(_.uri),R.method=_.method,R.iv=this.createInitializationVector(h),R.keyFormat="identity"),R},f.setElementaryStreamInfo=function(_,h,R,C,g,x){x===void 0&&(x=!1);var E=this.elementaryStreams,T=E[_];if(!T){E[_]={startPTS:h,endPTS:R,startDTS:C,endDTS:g,partial:x};return}T.startPTS=Math.min(T.startPTS,h),T.endPTS=Math.max(T.endPTS,R),T.startDTS=Math.min(T.startDTS,C),T.endDTS=Math.max(T.endDTS,g)},f.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[i.AUDIO]=null,_[i.VIDEO]=null,_[i.AUDIOVIDEO]=null},r(c,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(M.isFiniteNumber)(this.programDateTime))return null;var _=Object(M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),c}(o),u=function(a){d(c,a);function c(f,w,_,h,R){var C;C=a.call(this,_)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new p.LoadStats,C.duration=f.decimalFloatingPoint("DURATION"),C.gap=f.bool("GAP"),C.independent=f.bool("INDEPENDENT"),C.relurl=f.enumeratedString("URI"),C.fragment=w,C.index=h;var g=f.enumeratedString("BYTERANGE");return g&&C.setByteRange(g,R),R&&(C.fragOffset=R.fragOffset+R.duration),C}return r(c,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),c}(o)},"./src/loader/key-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return S});var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/utils/logger.ts"),S=function(){function b(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var p=b.prototype;return p._registerListeners=function(){this.hls.on(M.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(M.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var t in this.loaders){var l=this.loaders[t];l&&l.destroy()}this.loaders={}},p.onKeyLoading=function(t,l){var r=l.frag,i=r.type,o=this.loaders[i];if(!r.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var s=r.decryptdata.uri;if(s!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(o&&(m.logger.warn("abort previous key loader for type:"+i),o.abort()),!s){m.logger.warn("key uri is falsy");return}var a=u.loader,c=r.loader=this.loaders[i]=new a(u);this.decrypturl=s,this.decryptkey=null;var f={url:s,frag:r,responseType:"arraybuffer"},w={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.load(f,w,_)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(M.Events.KEY_LOADED,{frag:r}))},p.loadsuccess=function(t,l,r){var i=r.frag;if(!i.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(M.Events.KEY_LOADED,{frag:i})},p.loaderror=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},p.loadtimeout=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},b}()},"./src/loader/level-details.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"LevelDetails",function(){return b});var M=O("./src/polyfills/number.ts");function y(p,d){for(var t=0;tl.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},m(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(M.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"LevelKey",function(){return b});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),y=O.n(M);function m(p,d){for(var t=0;t2){var E=x.shift()+".";return E+=parseInt(x.shift()).toString(16),E+=("000"+parseInt(x.shift()).toString(16)).substr(-4),E}return g},R.resolve=function(g,x){return y.buildAbsoluteURL(x,g,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(g,x){var E=[],T={},k=!1;r.lastIndex=0;for(var L;(L=r.exec(g))!=null;)if(L[1]){var A=new d.AttrList(L[1]),G={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:R.resolve(L[2],x)},K=A.decimalResolution("RESOLUTION");K&&(G.width=K.width,G.height=K.height),f((A.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=R.convertAVC1ToAVCOTI(G.videoCodec)),E.push(G)}else if(L[3]){var W=new d.AttrList(L[3]);W["DATA-ID"]&&(k=!0,T[W["DATA-ID"]]=W)}return{levels:E,sessionData:k?T:null}},R.parseMasterPlaylistMedia=function(g,x,E,T){T===void 0&&(T=[]);var k,L=[],A=0;for(i.lastIndex=0;(k=i.exec(g))!==null;){var G=new d.AttrList(k[1]);if(G.TYPE===E){var K={attrs:G,bitrate:0,id:A++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:E,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?R.resolve(G.URI,x):""};if(T.length){var W=R.findGroup(T,K.groupId)||T[0];w(K,W,"audioCodec"),w(K,W,"textCodec")}L.push(K)}}return L},R.parseLevelPlaylist=function(g,x,E,T,k){var L=new b.LevelDetails(x),A=L.fragments,G=null,K=0,W=0,z=0,U=0,P=null,H=new S.Fragment(T,x),V,q,Z,ce=-1,he=!1;for(o.lastIndex=0,L.m3u8=g;(V=o.exec(g))!==null;){he&&(he=!1,H=new S.Fragment(T,x),H.start=z,H.sn=K,H.cc=U,H.level=E,G&&(H.initSegment=G,H.rawProgramDateTime=G.rawProgramDateTime));var ae=V[1];if(ae){H.duration=parseFloat(ae);var xe=(" "+V[2]).slice(1);H.title=xe||null,H.tagList.push(xe?["INF",ae,xe]:["INF",ae])}else if(V[3])Object(M.isFiniteNumber)(H.duration)&&(H.start=z,Z&&(H.levelkey=Z),H.sn=K,H.level=E,H.cc=U,H.urlId=k,A.push(H),H.relurl=(" "+V[3]).slice(1),h(H,P),P=H,z+=H.duration,K++,W=0,he=!0);else if(V[4]){var ge=(" "+V[4]).slice(1);P?H.setByteRange(ge,P):H.setByteRange(ge)}else if(V[5])H.rawProgramDateTime=(" "+V[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),ce===-1&&(ce=A.length);else{if(V=V[0].match(s),!V){t.logger.warn("No matches on slow regex match for level playlist!");continue}for(q=1;q-1){t.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(Z=p.LevelKey.fromURL(x,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(Z.method=X,Z.keyFormat=ze,Te&&(Z.keyID=Te),fe&&(Z.keyFormatVersions=fe),Z.iv=me));break}case"START":{var qe=new d.AttrList(se),Xe=qe.decimalFloatingPoint("TIME-OFFSET");Object(M.isFiniteNumber)(Xe)&&(L.startTimeOffset=Xe);break}case"MAP":{var et=new d.AttrList(se);H.relurl=et.URI,et.BYTERANGE&&H.setByteRange(et.BYTERANGE),H.level=E,H.sn="initSegment",Z&&(H.levelkey=Z),H.initSegment=null,G=H,he=!0;break}case"SERVER-CONTROL":{var rt=new d.AttrList(se);L.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),L.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),L.canSkipDateRanges=L.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),L.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),L.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Le=new d.AttrList(se);L.partTarget=Le.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Oe=L.partList;Oe||(Oe=L.partList=[]);var Ve=W>0?Oe[Oe.length-1]:void 0,Ze=W++,Ne=new S.Part(new d.AttrList(se),H,x,Ze,Ve);Oe.push(Ne),H.duration+=Ne.duration;break}case"PRELOAD-HINT":{var Ge=new d.AttrList(se);L.preloadHint=Ge;break}case"RENDITION-REPORT":{var De=new d.AttrList(se);L.renditionReports=L.renditionReports||[],L.renditionReports.push(De);break}default:t.logger.warn("line parsed but not handled: "+V);break}}}P&&!P.relurl?(A.pop(),z-=P.duration,L.partList&&(L.fragmentHint=P)):L.partList&&(h(H,P),H.cc=U,L.fragmentHint=H);var we=A.length,Ae=A[0],de=A[we-1];if(z+=L.skippedSegments*L.targetduration,z>0&&we&&de){L.averagetargetduration=z/we;var _e=de.sn;L.endSN=_e!=="initSegment"?_e:0,Ae&&(L.startCC=Ae.cc,Ae.initSegment||L.fragments.every(function(Se){return Se.relurl&&a(Se.relurl)})&&(t.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new S.Fragment(T,x),H.relurl=de.relurl,H.level=E,H.sn="initSegment",Ae.initSegment=H,L.needSidxRanges=!0))}else L.endSN=0,L.startCC=0;return L.fragmentHint&&(z+=L.fragmentHint.duration),L.totalduration=z,L.endCC=U,ce>0&&_(A,ce),L},R}();function f(R,C){["video","audio","text"].forEach(function(g){var x=R.filter(function(T){return Object(l.isCodecType)(T,g)});if(x.length){var E=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});C[g+"Codec"]=E.length>0?E[0]:x[0],R=R.filter(function(T){return x.indexOf(T)===-1})}}),C.unknownCodecs=R}function w(R,C,g){var x=C[g];x&&(R[g]=x)}function _(R,C){for(var g=R[C],x=C;x--;){var E=R[x];if(!E)return;E.programDateTime=g.programDateTime-E.duration*1e3,g=E}}function h(R,C){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):C!=null&&C.programDateTime&&(R.programDateTime=C.endProgramDateTime),Object(M.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/polyfills/number.ts"),y=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/loader/m3u8-parser.ts"),d=O("./src/types/loader.ts"),t=O("./src/utils/attr-list.ts");function l(o){var s=o.type;switch(s){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function r(o,s){var u=o.url;return(u===void 0||u.indexOf("data:")===0)&&(u=s.url),u}var i=function(){function o(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var s=o.prototype;return s.registerListeners=function(){var a=this.hls;a.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.createInternalLoader=function(a){var c=this.hls.config,f=c.pLoader,w=c.loader,_=f||w,h=new _(c);return a.loader=h,this.loaders[a.type]=h,h},s.getInternalLoader=function(a){return this.loaders[a.type]},s.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},s.destroyInternalLoaders=function(){for(var a in this.loaders){var c=this.loaders[a];c&&c.destroy(),this.resetInternalLoader(a)}},s.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},s.onManifestLoading=function(a,c){var f=c.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},s.onLevelLoading=function(a,c){var f=c.id,w=c.level,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:null,level:w,responseType:"text",type:d.PlaylistContextType.LEVEL,url:_,deliveryDirectives:h})},s.onAudioTrackLoading=function(a,c){var f=c.id,w=c.groupId,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:h})},s.onSubtitleTrackLoading=function(a,c){var f=c.id,w=c.groupId,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:h})},s.load=function(a){var c,f=this.hls.config,w=this.getInternalLoader(a);if(w){var _=w.context;if(_&&_.url===a.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),w.abort()}var h,R,C,g;switch(a.type){case d.PlaylistContextType.MANIFEST:h=f.manifestLoadingMaxRetry,R=f.manifestLoadingTimeOut,C=f.manifestLoadingRetryDelay,g=f.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:h=0,R=f.levelLoadingTimeOut;break;default:h=f.levelLoadingMaxRetry,R=f.levelLoadingTimeOut,C=f.levelLoadingRetryDelay,g=f.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(a),(c=a.deliveryDirectives)!==null&&c!==void 0&&c.part){var x;if(a.type===d.PlaylistContextType.LEVEL&&a.level!==null?x=this.hls.levels[a.level].details:a.type===d.PlaylistContextType.AUDIO_TRACK&&a.id!==null?x=this.hls.audioTracks[a.id].details:a.type===d.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(x=this.hls.subtitleTracks[a.id].details),x){var E=x.partTarget,T=x.targetduration;E&&T&&(R=Math.min(Math.max(E*3,T*.8)*1e3,R))}}var k={timeout:R,maxRetry:h,retryDelay:C,maxRetryDelay:g,highWaterMark:0},L={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(a,k,L)},s.loadsuccess=function(a,c,f,w){if(w===void 0&&(w=null),f.isSidxRequest){this.handleSidxRequest(a,f),this.handlePlaylistLoaded(a,c,f,w);return}this.resetInternalLoader(f.type);var _=a.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,f,"no EXTM3U delimiter",w);return}c.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,c,f,w):this.handleMasterPlaylist(a,c,f,w)},s.loaderror=function(a,c,f){f===void 0&&(f=null),this.handleNetworkError(c,f,!1,a)},s.loadtimeout=function(a,c,f){f===void 0&&(f=null),this.handleNetworkError(c,f,!0)},s.handleMasterPlaylist=function(a,c,f,w){var _=this.hls,h=a.data,R=r(a,f),C=p.default.parseMasterPlaylist(h,R),g=C.levels,x=C.sessionData;if(!g.length){this.handleManifestParsingError(a,f,"no level found in manifest",w);return}var E=g.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),T=g.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),k=p.default.parseMasterPlaylistMedia(h,R,"AUDIO",E),L=p.default.parseMasterPlaylistMedia(h,R,"SUBTITLES",T),A=p.default.parseMasterPlaylistMedia(h,R,"CLOSED-CAPTIONS");if(k.length){var G=k.some(function(K){return!K.url});!G&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new t.AttrList({}),bitrate:0,url:""}))}_.trigger(y.Events.MANIFEST_LOADED,{levels:g,audioTracks:k,subtitles:L,captions:A,url:R,stats:c,networkDetails:w,sessionData:x})},s.handleTrackOrLevelPlaylist=function(a,c,f,w){var _=this.hls,h=f.id,R=f.level,C=f.type,g=r(a,f),x=Object(M.isFiniteNumber)(h)?h:0,E=Object(M.isFiniteNumber)(R)?R:x,T=l(f),k=p.default.parseLevelPlaylist(a.data,g,E,T,x);if(!k.fragments.length){_.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(C===d.PlaylistContextType.MANIFEST){var L={attrs:new t.AttrList({}),bitrate:0,details:k,name:"",url:g};_.trigger(y.Events.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:g,stats:c,networkDetails:w,sessionData:null})}if(c.parsing.end=performance.now(),k.needSidxRanges){var A,G=(A=k.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:G,isSidxRequest:!0,type:C,level:R,levelDetails:k,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=k,this.handlePlaylistLoaded(a,c,f,w)},s.handleSidxRequest=function(a,c){var f=Object(b.parseSegmentIndex)(new Uint8Array(a.data));if(!f)return;var w=f.references,_=c.levelDetails;w.forEach(function(h,R){var C=h.info,g=_.fragments[R];g.byteRange.length===0&&g.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),g.initSegment&&g.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},s.handleManifestParsingError=function(a,c,f,w){this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:c.type===d.PlaylistContextType.MANIFEST,url:a.url,reason:f,response:a,context:c,networkDetails:w})},s.handleNetworkError=function(a,c,f,w){f===void 0&&(f=!1),S.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var _=m.ErrorDetails.UNKNOWN,h=!1,R=this.getInternalLoader(a);switch(a.type){case d.PlaylistContextType.MANIFEST:_=f?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,h=!0;break;case d.PlaylistContextType.LEVEL:_=f?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.AUDIO_TRACK:_=f?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:_=f?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,h=!1;break}R&&this.resetInternalLoader(a.type);var C={type:m.ErrorTypes.NETWORK_ERROR,details:_,fatal:h,url:a.url,loader:R,context:a,networkDetails:c};w&&(C.response=w),this.hls.trigger(y.Events.ERROR,C)},s.handlePlaylistLoaded=function(a,c,f,w){var _=f.type,h=f.level,R=f.id,C=f.groupId,g=f.loader,x=f.levelDetails,E=f.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(a,f,"invalid target duration",w);return}if(!g)return;x.live&&(g.getCacheAge&&(x.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(_){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(y.Events.LEVEL_LOADED,{details:x,level:h||0,id:R||0,stats:c,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(y.Events.AUDIO_TRACK_LOADED,{details:x,id:R||0,groupId:C||"",stats:c,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADED,{details:x,id:R||0,groupId:C||"",stats:c,networkDetails:w,deliveryDirectives:E});break}},o}();v.default=i},"./src/polyfills/number.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isFiniteNumber",function(){return M}),O.d(v,"MAX_SAFE_INTEGER",function(){return y});var M=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},y=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,v,O){"use strict";O.r(v);var M=function(){function y(){}return y.getSilentFrame=function(S,b){switch(S){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===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(b===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(b===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(b===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(b===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},y}();v.default=M},"./src/remux/mp4-generator.ts":function(N,v,O){"use strict";O.r(v);var M=Math.pow(2,32)-1,y=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var b;for(b in m.types)m.types.hasOwnProperty(b)&&(m.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var p=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]),d=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);m.HDLR_TYPES={video:p,audio:d};var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=l,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,r,o,r,i),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,t))},m.box=function(b){for(var p=8,d=arguments.length,t=new Array(d>1?d-1:0),l=1;l>24&255,o[1]=p>>16&255,o[2]=p>>8&255,o[3]=p&255,o.set(b,4),r=0,p=8;r>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&255,85,196,0,0]))},m.mdia=function(b){return m.box(m.types.mdia,m.mdhd(b.timescale,b.duration),m.hdlr(b.type),m.minf(b))},m.mfhd=function(b){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},m.minf=function(b){return b.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(b)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(b))},m.moof=function(b,p,d){return m.box(m.types.moof,m.mfhd(b),m.traf(d,p))},m.moov=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trak(b[p]);return m.box.apply(null,[m.types.moov,m.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(m.mvex(b)))},m.mvex=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trex(b[p]);return m.box.apply(null,[m.types.mvex].concat(d))},m.mvhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),t=Math.floor(p%(M+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return m.box(m.types.mvhd,l)},m.sdtp=function(b){var p=b.samples||[],d=new Uint8Array(4+p.length),t,l;for(t=0;t>>8&255),p.push(r&255),p=p.concat(Array.prototype.slice.call(l));for(t=0;t>>8&255),d.push(r&255),d=d.concat(Array.prototype.slice.call(l));var i=m.box(m.types.avcC,new Uint8Array([1,p[3],p[4],p[5],252|3,224|b.sps.length].concat(p).concat([b.pps.length]).concat(d))),o=b.width,s=b.height,u=b.pixelRatio[0],a=b.pixelRatio[1];return m.box(m.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,o&255,s>>8&255,s&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]),i,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,a>>24,a>>16&255,a>>8&255,a&255])))},m.esds=function(b){var p=b.config.length;return new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(b.config).concat([6,1,2]))},m.mp4a=function(b){var p=b.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]),m.box(m.types.esds,m.esds(b)))},m.mp3=function(b){var p=b.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]))},m.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(b)):m.box(m.types.stsd,m.STSD,m.mp4a(b)):m.box(m.types.stsd,m.STSD,m.avc1(b))},m.tkhd=function(b){var p=b.id,d=b.duration*b.timescale,t=b.width,l=b.height,r=Math.floor(d/(M+1)),i=Math.floor(d%(M+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&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,t>>8&255,t&255,0,0,l>>8&255,l&255,0,0]))},m.traf=function(b,p){var d=m.sdtp(b),t=b.id,l=Math.floor(p/(M+1)),r=Math.floor(p%(M+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),m.trun(b,d.length+16+20+8+16+8+8),d)},m.trak=function(b){return b.duration=b.duration||4294967295,m.box(m.types.trak,m.tkhd(b),m.mdia(b))},m.trex=function(b){var p=b.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(b,p){var d=b.samples||[],t=d.length,l=12+16*t,r=new Uint8Array(l),i,o,s,u,a,c;for(p+=8+l,r.set([0,0,15,1,t>>>24&255,t>>>16&255,t>>>8&255,t&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),i=0;i>>24&255,s>>>16&255,s>>>8&255,s&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,c>>>24&255,c>>>16&255,c>>>8&255,c&255],12+16*i);return m.box(m.types.trun,r)},m.initSegment=function(b){m.types||m.init();var p=m.moov(b),d=new Uint8Array(m.FTYP.byteLength+p.byteLength);return d.set(m.FTYP),d.set(p,m.FTYP.byteLength),d},m}();y.types=void 0,y.HDLR_TYPES=void 0,y.STTS=void 0,y.STSC=void 0,y.STCO=void 0,y.STSZ=void 0,y.VMHD=void 0,y.SMHD=void 0,y.STSD=void 0,y.FTYP=void 0,y.DINF=void 0,v.default=y},"./src/remux/mp4-remuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return c}),O.d(v,"normalizePts",function(){return f});var M=O("./src/polyfills/number.ts"),y=O("./src/remux/aac-helper.ts"),m=O("./src/remux/mp4-generator.ts"),S=O("./src/events.ts"),b=O("./src/errors.ts"),p=O("./src/utils/logger.ts"),d=O("./src/types/loader.ts"),t=O("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(R){for(var C=1;C0?k:L.pts},x[0].pts);return E&&p.logger.debug("PTS rollover detected"),T},C.remux=function(x,E,T,k,L,A,G,K){var W,z,U,P,H,V,q=L,Z=L,ce=x.pid>-1,he=E.pid>-1,ae=E.samples.length,xe=x.samples.length>0,ge=ae>1,oe=(!ce||xe)&&(!he||ge)||this.ISGenerated||G;if(oe){this.ISGenerated||(U=this.generateIS(x,E,L));var se=this.isVideoContiguous,te=-1;if(ge&&(te=w(E.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if(V=!0,te>0){p.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+ae+" video samples due to a missing keyframe");var be=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(te),E.dropped+=te,Z+=(E.samples[0].pts-be)/(E.timescale||9e4)}else te===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+ae+" video samples"),V=!1);if(this.ISGenerated){if(xe&&ge){var ee=this.getVideoStartPts(E.samples),ie=f(x.samples[0].pts,ee)-ee,Ee=ie/E.inputTimeScale;q+=Math.max(0,Ee),Z+=Math.max(0,-Ee)}if(xe){if(x.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,E,L)),z=this.remuxAudio(x,q,this.isAudioContiguous,A,he||ge||K===d.PlaylistLevelType.AUDIO?Z:void 0),ge){var ne=z?z.endPTS-z.startPTS:0;E.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,E,L)),W=this.remuxVideo(E,Z,se,ne)}}else ge&&(W=this.remuxVideo(E,Z,se,0));W&&(W.firstKeyFrame=te,W.independent=te!==-1)}}return this.ISGenerated&&(T.samples.length&&(H=this.remuxID3(T,L)),k.samples.length&&(P=this.remuxText(k,L))),{audio:z,video:W,initSegment:U,independent:V,text:P,id3:H}},C.generateIS=function(x,E,T){var k=x.samples,L=E.samples,A=this.typeSupported,G={},K=!Object(M.isFiniteNumber)(this._initPTS),W="audio/mp4",z,U,P;if(K&&(z=U=Infinity),x.config&&k.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(W="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),G.audio={id:"audio",container:W,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},K&&(P=x.inputTimeScale,z=U=k[0].pts-Math.round(P*T))),E.sps&&E.pps&&L.length&&(E.timescale=E.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:m.default.initSegment([E]),metadata:{width:E.width,height:E.height}},K)){P=E.inputTimeScale;var H=this.getVideoStartPts(L),V=Math.round(P*T);U=Math.min(U,f(L[0].dts,H)-V),z=Math.min(z,H-V)}if(Object.keys(G).length)return this.ISGenerated=!0,K&&(this._initPTS=z,this._initDTS=U),{tracks:G,initPTS:z,timescale:P}},C.remuxVideo=function(x,E,T,k){var L=x.inputTimeScale,A=x.samples,G=[],K=A.length,W=this._initPTS,z=this.nextAvcDts,U=8,P,H,V,q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,ce=0,he=!1;if(!T||z===null){var ae=E*L,xe=A[0].pts-f(A[0].dts,A[0].pts);z=ae-xe}for(var ge=0;geoe.pts){var se=9e4*.2;ce=Math.max(Math.min(ce,oe.pts-oe.dts),-1*se)}oe.dts0?ge-1:ge].dts&&(he=!0)}he&&A.sort(function(Ct,bt){var ft=Ct.dts-bt.dts,jt=Ct.pts-bt.pts;return ft||jt}),H=A[0].dts,V=A[A.length-1].dts;var te=Math.round((V-H)/(K-1));if(ce<0){if(cete,J=Ee<-1;if(ne||J){ne?p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(Ee,!0)+" ms ("+Ee+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(-Ee,!0)+" ms ("+Ee+"dts) overlapping between fragments detected"),H=z;var X=A[0].pts-Ee;A[0].dts=H,A[0].pts=X,p.logger.log("Video: First PTS/DTS adjusted: "+Object(t.toMsFromMpegTsClock)(X,!0)+"/"+Object(t.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(t.toMsFromMpegTsClock)(Ee,!0)+" ms")}}a&&(H=Math.max(0,H));for(var Q=0,me=0,fe=0;fe0?Oe-1:Oe].dts;if(_e.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ie=Math.floor(_e.maxBufferHole*L),ke=(k?q+k*L:this.nextAudioPts)-Ve.pts;ke>Ie?(P=ke-Se,P<0&&(P=Se),p.logger.log("[mp4-remuxer]: It is approximately "+ke/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=Se}else P=Se}var Ye=Math.round(Ve.pts-Ve.dts);G.push(new _(Ve.key,P,Ne,Ye))}if(G.length&&s&&s<70){var nt=G[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=V+P,this.isVideoContiguous=!0;var lt=m.default.moof(x.sequenceNumber++,H,l({},x,{samples:G})),at="video",ot={data1:lt,data2:rt,startPTS:q/L,endPTS:(Z+P)/L,startDTS:H/L,endDTS:z/L,type:at,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),ot},C.remuxAudio=function(x,E,T,k,L){var A=x.inputTimeScale,G=x.samplerate?x.samplerate:A,K=A/G,W=x.isAAC?i:o,z=W*K,U=this._initPTS,P=!x.isAAC&&this.typeSupported.mpeg,H=[],V=x.samples,q=P?0:8,Z=this.nextAudioPts||-1,ce=E*A;if(this.isAudioContiguous=T=T||V.length&&Z>0&&(k&&Math.abs(ce-Z)<9e3||Math.abs(f(V[0].pts-U,ce)-Z)<20*z),V.forEach(function(Ae){Ae.pts=f(Ae.pts-U,ce)}),!T||Z<0){if(V=V.filter(function(Ae){return Ae.pts>=0}),!V.length)return;L===0?Z=0:k?Z=Math.max(0,ce):Z=V[0].pts}if(x.isAAC)for(var he=L!==void 0,ae=this.config.maxAudioFramesDrift,xe=0,ge=Z;xe=ae*z&&be0){me+=q;try{Q=new Uint8Array(me)}catch(Ae){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!P){var rt=new DataView(Q.buffer);rt.setUint32(0,me),Q.set(m.default.types.mdat,4)}}else return;Q.set(qe,q);var Le=qe.byteLength;q+=Le,H.push(new _(!0,W,Le,0)),X=Xe}var Oe=H.length;if(!Oe)return;var Ve=H[H.length-1];this.nextAudioPts=Z=X+K*Ve.duration;var Ze=P?new Uint8Array(0):m.default.moof(x.sequenceNumber++,J/K,l({},x,{samples:H}));x.samples=[];var Ne=J/A,Ge=Z/A,De="audio",we={data1:Ze,data2:Q,startPTS:Ne,endPTS:Ge,startDTS:Ne,endDTS:Ge,type:De,hasAudio:!0,hasVideo:!1,nb:Oe};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),we},C.remuxEmptyAudio=function(x,E,T,k){var L=x.inputTimeScale,A=x.samplerate?x.samplerate:L,G=L/A,K=this.nextAudioPts,W=(K!==null?K:k.startDTS*L)+this._initDTS,z=k.endDTS*L+this._initDTS,U=G*i,P=Math.ceil((z-W)/U),H=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var V=[],q=0;q4294967296;)R+=g;return R}function w(R){for(var C=0;C0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,T=!!R.video,k="";E&&(k+="audio"),T&&(k+="video");var L={data1:_,startPTS:g,startDTS:g,endPTS:x,endDTS:x,type:k,hasAudio:E,hasVideo:T,nb:1,dropped:0};return w.audio=L.type==="audio"?L:void 0,w.video=L.type!=="audio"?L:void 0,w.text=u,w.id3=s,w.initSegment=h,w},t}(),p=function(l,r,i){return Object(y.getStartDTS)(l,r)-i};function d(t,l){var r=t==null?void 0:t.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=b},"./src/task-loop.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function y(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=y.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},y}()},"./src/types/cmcd.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"CMCDVersion",function(){return M}),O.d(v,"CMCDObjectType",function(){return y}),O.d(v,"CMCDStreamingFormat",function(){return m}),O.d(v,"CMCDStreamType",function(){return S});var M=1,y;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(y||(y={}));var m;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(m||(m={}));var S;(function(b){b.VOD="v",b.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"HlsSkip",function(){return m}),O.d(v,"getSkipValue",function(){return S}),O.d(v,"HlsUrlParameters",function(){return b}),O.d(v,"Level",function(){return p});function M(d,t){for(var l=0;lNumber.MAX_SAFE_INTEGER?Infinity:t},b.hexadecimalInteger=function(d){if(this[d]){var t=(this[d]||"0x").slice(2);t=(t.length&1?"0":"")+t;for(var l=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?Infinity:t},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,t){var l=this[d];return l?parseFloat(l):t},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var t=M.exec(this[d]);return t===null?void 0:{width:parseInt(t[1],10),height:parseInt(t[2],10)}},S.parseAttrList=function(d){var t,l={},r='"';for(y.lastIndex=0;(t=y.exec(d))!==null;){var i=t[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[t[1]]=i}return l},S}()},"./src/utils/binary-search.ts":function(N,v,O){"use strict";O.r(v);var M={search:function(m,S){for(var b=0,p=m.length-1,d=null,t=null;b<=p;){d=(b+p)/2|0,t=m[d];var l=S(t);if(l>0)b=d+1;else if(l<0)p=d-1;else return t}return null}};v.default=M},"./src/utils/buffer-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"BufferHelper",function(){return m});var M=O("./src/utils/logger.ts"),y={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function S(){}return S.isBuffered=function(p,d){try{if(p){for(var t=S.getBuffered(p),l=0;l=t.start(l)&&d<=t.end(l))return!0}}catch(r){}return!1},S.bufferInfo=function(p,d,t){try{if(p){var l=S.getBuffered(p),r=[],i;for(i=0;io&&(l[i-1].end=p[r].end):l.push(p[r])}else l.push(p[r])}else l=p;for(var s=0,u,a=d,c=d,f=0;f=w&&d<_)a=w,c=_,s=c-d;else if(d+t=T&&M.logger.log(this.time+" ["+T+"] "+k)},g}(),s=function(x){for(var E=[],T=0;Tb&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(T){var k=this.pos+T;if(T>1)for(var L=this.pos+1;L=144&&this.backSpace();var k=m(T);if(this.pos>=b){this.logger.log(i.ERROR,"Cannot insert "+T.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var k;for(k=T;k0&&(T?L="["+k.join(" | ")+"]":L=k.join(` `)),L},x.getTextAndFormat=function(){return this.rows},g}(),w=function(){function g(E,T,k){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=E,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new f(k),this.nonDisplayedMemory=new f(k),this.lastOutputScreen=new f(k),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}var x=g.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(i.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},x.insertChars=function(T){for(var k=0;k=46,k.italics)k.foreground="white";else{var L=Math.floor(T/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=A[L]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},x.outputDataUpdate=function(T){T===void 0&&(T=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},g}(),_=function(){function g(E,T,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var L=new o;this.channels=[null,new w(E,T,L),new w(E+1,k,L)],this.cmdHistory=C(),this.logger=L}var x=g.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,k){this.channels[T].setHandler(k)},x.addData=function(T,k){var L,A,G,K=!1;this.logger.time=T;for(var W=0;W ("+s([A,G])+")"),L=this.parseCmd(A,G),L||(L=this.parseMidrow(A,G)),L||(L=this.parsePAC(A,G)),L||(L=this.parseBackgroundAttributes(A,G)),!L&&(K=this.parseChars(A,G),K)){var z=this.currentChannel;if(z&&z>0){var U=this.channels[z];U.insertChars(K)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!L&&!K&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+s([A,G])+" orig: "+s([k[W],k[W+1]]))}},x.parseCmd=function(T,k){var L=this.cmdHistory,A=(T===20||T===28||T===21||T===29)&&k>=32&&k<=47,G=(T===23||T===31)&&k>=33&&k<=35;if(!(A||G))return!1;if(R(T,k,L))return h(null,null,L),this.logger.log(i.DEBUG,"Repeated command ("+s([T,k])+") is dropped"),!0;var K=T===20||T===21||T===23?1:2,W=this.channels[K];return T===20||T===21||T===28||T===29?k===32?W.ccRCL():k===33?W.ccBS():k===34?W.ccAOF():k===35?W.ccAON():k===36?W.ccDER():k===37?W.ccRU(2):k===38?W.ccRU(3):k===39?W.ccRU(4):k===40?W.ccFON():k===41?W.ccRDC():k===42?W.ccTR():k===43?W.ccRTD():k===44?W.ccEDM():k===45?W.ccCR():k===46?W.ccENM():k===47&&W.ccEOC():W.ccTO(k-32),h(T,k,L),this.currentChannel=K,!0},x.parseMidrow=function(T,k){var L=0;if((T===17||T===25)&&k>=32&&k<=47){if(T===17?L=1:L=2,L!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[L];return A?(A.ccMIDROW(k),this.logger.log(i.DEBUG,"MIDROW ("+s([T,k])+")"),!0):!1}return!1},x.parsePAC=function(T,k){var L,A=this.cmdHistory,G=(T>=17&&T<=23||T>=25&&T<=31)&&k>=64&&k<=127,K=(T===16||T===24)&&k>=64&&k<=95;if(!(G||K))return!1;if(R(T,k,A))return h(null,null,A),!0;var W=T<=23?1:2;k>=64&&k<=95?L=W===1?p[T]:t[T]:L=W===1?d[T]:l[T];var z=this.channels[W];return z?(z.setPAC(this.interpretPAC(L,k)),h(T,k,A),this.currentChannel=W,!0):!1},x.interpretPAC=function(T,k){var L,A={color:null,italics:!1,indent:null,underline:!1,row:T};return k>95?L=k-96:L=k-64,A.underline=(L&1)===1,L<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(L/2)]:L<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((L-16)/2)*4,A},x.parseChars=function(T,k){var L,A=null,G=null;if(T>=25?(L=2,G=T-8):(L=1,G=T),G>=17&&G<=19){var K;G===17?K=k+80:G===18?K=k+112:K=k+144,this.logger.log(i.INFO,"Special char '"+m(K)+"' in channel "+L),A=[K]}else T>=32&&T<=127&&(A=k===0?[T]:[T,k]);if(A){var W=s(A);this.logger.log(i.DEBUG,"Char codes = "+W.join(",")),h(T,k,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(T,k){var L=(T===16||T===24)&&k>=32&&k<=47,A=(T===23||T===31)&&k>=45&&k<=47;if(!(L||A))return!1;var G,K={};T===16||T===24?(G=Math.floor((k-32)/2),K.background=r[G],k%2===1&&(K.background=K.background+"_semi")):k===45?K.background="transparent":(K.foreground="black",k===47&&(K.underline=!0));var W=T<=23?1:2,z=this.channels[W];return z.setBkgData(K),h(T,k,this.cmdHistory),!0},x.reset=function(){for(var T=0;T=16?a--:a++;var h=Object(M.fixLineBreaks)(c.trim()),R=Object(y.generateCueId)(t,l,h);(!d||!d.cues||!d.cues.getCueById(R))&&(s=new f(t,l,h),s.id=R,s.line=w+1,s.align="left",s.position=10+Math.min(80,Math.floor(a*8/32)*10),i.push(s))}return d&&i.length&&(i.sort(function(C,g){return C.line==="auto"||g.line==="auto"?0:C.line>8&&g.line>8?g.line-C.line:C.line-g.line}),i.forEach(function(C){return Object(m.addCueToTrack)(d,C)})),i}};v.default=b},"./src/utils/discontinuities.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"findFirstFragWithCC",function(){return S}),O.d(v,"shouldAlignOnDiscontinuities",function(){return b}),O.d(v,"findDiscontinuousReferenceFrag",function(){return p}),O.d(v,"adjustSlidingStart",function(){return t}),O.d(v,"alignStream",function(){return l}),O.d(v,"alignPDT",function(){return i}),O.d(v,"alignFragmentByPDTDelta",function(){return o}),O.d(v,"alignMediaPlaylistByPDT",function(){return s});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/logger.ts"),m=O("./src/controller/level-helper.ts");function S(u,a){for(var c=null,f=0,w=u.length;fc.startCC||u&&u.cc=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},m}();v.default=y},"./src/utils/ewma.ts":function(N,v,O){"use strict";O.r(v);var M=function(){function y(S,b,p){b===void 0&&(b=0),p===void 0&&(p=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=b,this.totalWeight_=p}var m=y.prototype;return m.sample=function(b,p){var d=Math.pow(this.alpha_,b);this.estimate_=p*(1-d)+d*this.estimate_,this.totalWeight_+=b},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},y}();v.default=M},"./src/utils/fetch-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"fetchSupported",function(){return o});var M=O("./src/polyfills/number.ts"),y=O("./src/loader/load-stats.ts"),m=O("./src/demux/chunk-cache.ts");function S(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,l(f,w)}function b(f){var w=typeof Map=="function"?new Map:void 0;return b=function(h){if(h===null||!t(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(h))return w.get(h);w.set(h,R)}function R(){return p(h,arguments,r(this).constructor)}return R.prototype=Object.create(h.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),l(R,h)},b(f)}function p(f,w,_){return d()?p=Reflect.construct:p=function(R,C,g){var x=[null];x.push.apply(x,C);var E=Function.bind.apply(R,x),T=new E;return g&&l(T,g.prototype),T},p.apply(null,arguments)}function d(){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(f){return!1}}function t(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function l(f,w){return l=Object.setPrototypeOf||function(h,R){return h.__proto__=R,h},l(f,w)}function r(f){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},r(f)}function i(){return i=Object.assign||function(f){for(var w=1;w=g&&x(R,C,E.flush(),h)):x(R,C,G,h),L()}).catch(function(){return Promise.reject()})};return k()},f}();function u(f,w){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(i({},f.headers))};return f.rangeEnd&&_.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),_}function a(f,w){return new self.Request(f.url,w)}var c=function(f){S(w,f);function w(_,h,R){var C;return C=f.call(this,_)||this,C.code=void 0,C.details=void 0,C.code=h,C.details=R,C}return w}(b(Error));v.default=s},"./src/utils/imsc1-ttml-parser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"IMSC1_CODEC",function(){return t}),O.d(v,"parseIMSC1",function(){return o});var M=O("./src/utils/mp4-tools.ts"),y=O("./src/utils/vttparser.ts"),m=O("./src/utils/vttcue.ts"),S=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),p=O("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(g){for(var x=1;x"):M}function b(t){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i>24,w[_+1]=h>>16&255,w[_+2]=h>>8&255,w[_+3]=h&255}function l(w,_){var h=[];if(!_.length)return h;var R,C,g;"data"in w?(R=w.data,C=w.start,g=w.end):(R=w,C=0,g=R.byteLength);for(var x=C;x1?x+E:g;if(T===_[0])if(_.length===1)h.push({data:R,start:x+8,end:k});else{var L=l({data:R,start:x+8,end:k},_.slice(1));L.length&&S.apply(h,L)}x=k}return h}function r(w){var _=l(w,["moov"]),h=_[0],R=h?h.end:null,C=l(w,["sidx"]);if(!C||!C[0])return null;var g=[],x=C[0],E=x.data[0],T=E===0?8:16,k=d(x,T);T+=4;var L=0,A=0;E===0?T+=8:T+=16,T+=2;var G=x.end+A,K=p(x,T);T+=2;for(var W=0;W>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var V=d(x,z);z+=4,g.push({referenceSize:P,subsegmentDuration:V,info:{duration:V/k,start:G,end:G+P-1}}),G+=P,z+=4,T=z}return{earliestPresentationTime:L,timescale:k,version:E,referencesCount:K,references:g,moovEndOffset:R}}function i(w){for(var _=[],h=l(w,["moov","trak"]),R=0;Rb)&&(this.startTime=b),this.endTime=p,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},y}()},"./src/utils/texttrack-utils.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"sendAddTrackEvent",function(){return y}),O.d(v,"addCueToTrack",function(){return m}),O.d(v,"clearCurrentCues",function(){return S}),O.d(v,"removeCuesInRange",function(){return b}),O.d(v,"getCuesInRange",function(){return d});var M=O("./src/utils/logger.ts");function y(t,l){var r;try{r=new Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,l.dispatchEvent(r)}function m(t,l){var r=t.mode;if(r==="disabled"&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(l.id))try{if(t.addCue(l),!t.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(o){M.logger.debug("[texttrack-utils]: "+o);var i=new self.TextTrackCue(l.startTime,l.endTime,l.text);i.id=l.id,t.addCue(i)}r==="disabled"&&(t.mode=r)}function S(t){var l=t.mode;if(l==="disabled"&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);l==="disabled"&&(t.mode=l)}function b(t,l,r){var i=t.mode;if(i==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var o=d(t.cues,l,r),s=0;st[r].endTime)return-1;for(var i=0,o=r;i<=o;){var s=Math.floor((o+i)/2);if(lt[s].startTime&&i-1)for(var s=o,u=t.length;s=l&&a.endTime<=r)i.push(a);else if(a.startTime>r)return i}return i}},"./src/utils/time-ranges.ts":function(N,v,O){"use strict";O.r(v);var M={toString:function(m){for(var S="",b=m.length,p=0;p1?l-1:0),i=1;i100)throw new Error("Position must be between 0 and 100.");g=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",p({},o,{get:function(){return x},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",p({},o,{get:function(){return E},set:function(L){if(L<0||L>100)throw new Error("Size must be between 0 and 100.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",p({},o,{get:function(){return T},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");T=A,this.hasBeenReset=!0}})),i.displayState=void 0}return d.prototype.getCueAsHTML=function(){var t=self.WebVTT;return t.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"parseTimeStamp",function(){return m}),O.d(v,"fixLineBreaks",function(){return l}),O.d(v,"VTTParser",function(){return r});var M=O("./src/utils/vttcue.ts"),y=function(){function i(){}var o=i.prototype;return o.decode=function(u,a){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},i}();function m(i){function o(u,a,c,f){return(u|0)*3600+(a|0)*60+(c|0)+parseFloat(f||0)}var s=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?o(s[2],s[3],0,s[4]):o(s[1],s[2],s[3],s[4]):null}var S=function(){function i(){this.values=Object.create(null)}var o=i.prototype;return o.set=function(u,a){!this.get(u)&&a!==""&&(this.values[u]=a)},o.get=function(u,a,c){return c?this.has(u)?this.values[u]:a[c]:this.has(u)?this.values[u]:a},o.has=function(u){return u in this.values},o.alt=function(u,a,c){for(var f=0;f=0&&c<=100)return this.set(u,c),!0}return!1},i}();function b(i,o,s,u){var a=u?i.split(u):[i];for(var c in a){if(typeof a[c]!="string")continue;var f=a[c].split(s);if(f.length!==2)continue;var w=f[0],_=f[1];o(w,_)}}var p=new M.default(0,0,""),d=p.align==="middle"?"middle":"center";function t(i,o,s){var u=i;function a(){var w=m(i);if(w===null)throw new Error("Malformed timestamp: "+u);return i=i.replace(/^[^\sa-zA-Z-]+/,""),w}function c(w,_){var h=new S;b(w,function(g,x){var E;switch(g){case"region":for(var T=s.length-1;T>=0;T--)if(s[T].id===x){h.set(g,s[T].region);break}break;case"vertical":h.alt(g,x,["rl","lr"]);break;case"line":E=x.split(","),h.integer(g,E[0]),h.percent(g,E[0])&&h.set("snapToLines",!1),h.alt(g,E[0],["auto"]),E.length===2&&h.alt("lineAlign",E[1],["start",d,"end"]);break;case"position":E=x.split(","),h.percent(g,E[0]),E.length===2&&h.alt("positionAlign",E[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":h.percent(g,x);break;case"align":h.alt(g,x,["start",d,"end","left","right"]);break}},/:/,/\s/),_.region=h.get("region",null),_.vertical=h.get("vertical","");var R=h.get("line","auto");R==="auto"&&p.line===-1&&(R=-1),_.line=R,_.lineAlign=h.get("lineAlign","start"),_.snapToLines=h.get("snapToLines",!0),_.size=h.get("size",100),_.align=h.get("align",d);var C=h.get("position","auto");C==="auto"&&p.position===50&&(C=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=C}function f(){i=i.replace(/^\s+/,"")}if(f(),o.startTime=a(),f(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);i=i.substr(3),f(),o.endTime=a(),f(),c(i,o)}function l(i){return i.replace(//gi,` `)}var r=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new y,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=i.prototype;return o.parse=function(u){var a=this;u&&(a.buffer+=a.decoder.decode(u,{stream:!0}));function c(){var C=a.buffer,g=0;for(C=l(C);g")===-1){a.cue.id=w;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{t(w,a.cue,a.regionList)}catch(C){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var R=w.indexOf("-->")!==-1;if(!w||R&&(h=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=` `),a.cue.text+=w}continue;case"BADCUE":w||(a.state="ID")}}}catch(C){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=` `,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){u.onparsingerror&&u.onparsingerror(a)}return u.onflush&&u.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"generateCueId",function(){return r}),O.d(v,"parseWebVTT",function(){return o});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/vttparser.ts"),m=O("./src/demux/id3.ts"),S=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,d=function(u,a,c){return c===void 0&&(c=0),u.substr(c,a.length)===a},t=function(u){var a=parseInt(u.substr(-3)),c=parseInt(u.substr(-6,2)),f=parseInt(u.substr(-9,2)),w=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(M.isFiniteNumber)(a)||!Object(M.isFiniteNumber)(c)||!Object(M.isFiniteNumber)(f)||!Object(M.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return a+=1e3*c,a+=60*1e3*f,a+=60*60*1e3*w,a},l=function(u){for(var a=5381,c=u.length;c;)a=a*33^u.charCodeAt(--c);return(a>>>0).toString()};function r(s,u,a){return l(s.toString())+l(u.toString())+l(a)}var i=function(u,a,c){var f=u[a],w=u[f.prevCC];if(!w||!w.new&&f.new){u.ccOffset=u.presentationOffset=f.start,f.new=!1;return}for(;(_=w)!==null&&_!==void 0&&_.new;){var _;u.ccOffset+=f.start-w.start,f.new=!1,f=w,w=u[f.prevCC]}u.presentationOffset=c};function o(s,u,a,c,f,w,_,h){var R=new y.VTTParser,C=Object(m.utf8ArrayToStr)(new Uint8Array(s)).trim().replace(p,` `).split(` `),g=[],x=Object(S.toMpegTsClockFromTimescale)(u,a),E="00:00.000",T=0,k=0,L,A=!0,G=!1;R.oncue=function(K){var W=c[f],z=c.ccOffset,U=(T-x)/9e4;if(W!=null&&W.new&&(k!==void 0?z=c.ccOffset=W.start:i(c,f,U)),U&&(z=U-c.presentationOffset),G){var P=K.endTime-K.startTime,H=Object(b.normalizePts)((K.startTime+z-k)*9e4,w*9e4)/9e4;K.startTime=H,K.endTime=H+P}var V=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(V)),K.id||(K.id=r(K.startTime,K.endTime,V)),K.endTime>0&&g.push(K)},R.onparsingerror=function(K){L=K},R.onflush=function(){if(L){h(L);return}_(g)},C.forEach(function(K){if(A)if(d(K,"X-TIMESTAMP-MAP=")){A=!1,G=!0,K.substr(16).split(",").forEach(function(W){d(W,"LOCAL:")?E=W.substr(6):d(W,"MPEGTS:")&&(T=parseInt(W.substr(7)))});try{k=t(E)/1e3}catch(W){G=!1,L=W}return}else K===""&&(A=!1);R.parse(K+` `)}),R.flush()}},"./src/utils/xhr-loader.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/logger.ts"),y=O("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,S=function(){function b(d){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=d?d.xhrSetup:null,this.stats=new y.LoadStats,this.retryDelay=0}var p=b.prototype;return p.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},p.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,t.readyState!==4&&(this.stats.aborted=!0,t.abort()))},p.abort=function(){var t;this.abortInternal(),(t=this.callbacks)!==null&&t!==void 0&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(t,l,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=l,this.callbacks=r,this.retryDelay=l.retryDelay,this.loadInternal()},p.loadInternal=function(){var t=this.config,l=this.context;if(!t)return;var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,l.url)}catch(a){r.open("GET",l.url,!0),o(r,l.url)}r.readyState||r.open("GET",l.url,!0);var s=this.context.headers;if(s)for(var u in s)r.setRequestHeader(u,s[u])}catch(a){this.callbacks.onError({code:r.status,text:a.message},l,r);return}l.rangeEnd&&r.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()},p.readystatechange=function(){var t=this.context,l=this.loader,r=this.stats;if(!t||!l)return;var i=l.readyState,o=this.config;if(r.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),i===4){l.onreadystatechange=null,l.onprogress=null;var s=l.status;if(s>=200&&s<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var u,a;if(t.responseType==="arraybuffer"?(u=l.response,a=u.byteLength):(u=l.responseText,a=u.length),r.loaded=r.total=a,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,u,l),!this.callbacks)return;var f={url:l.responseURL,data:u};this.callbacks.onSuccess(f,r,t,l)}else r.retry>=o.maxRetry||s>=400&&s<499?(M.logger.error(s+" while loading "+t.url),this.callbacks.onError({code:s,text:l.statusText},t,l)):(M.logger.warn(s+" while loading "+t.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,o.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},p.loadtimeout=function(){M.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(t){var l=this.stats;l.loaded=t.loaded,t.lengthComputable&&(l.total=t.total)},p.getCacheAge=function(){var t=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");t=l?parseFloat(l):null}return t},b}();v.default=S}}).default})},vHTk:function(F,$,j){F.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=y.RC4=M.extend({_doReset:function(){for(var p=this._key,d=p.words,t=p.sigBytes,l=this._S=[],r=0;r<256;r++)l[r]=r;for(var r=0,i=0;r<256;r++){var o=r%t,s=d[o>>>2]>>>24-o%4*8&255;i=(i+l[r]+s)%256;var u=l[r];l[r]=l[i],l[i]=u}this._i=this._j=0},_doProcessBlock:function(p,d){p[d]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var p=this._S,d=this._i,t=this._j,l=0,r=0;r<4;r++){d=(d+1)%256,t=(t+p[d])%256;var i=p[d];p[d]=p[t],p[t]=i,l|=p[(p[d]+p[t])%256]<<24-r*8}return this._i=d,this._j=t,l}v.RC4=M._createHelper(m);var b=y.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)S.call(this)}});v.RC4Drop=M._createHelper(b)}(),N.RC4})},wCXF:function(F,$,j){"use strict";j.d($,"a",function(){return qe});var N=j("rePB"),v=j("VTBJ"),O=j("KQm4"),M=j("U8pU"),y=j("ODXe"),m=j("cDcd"),S=j("TSYQ"),b=j.n(S),p=j("Gytx"),d=j.n(p),t=j("Kwbf"),l=j("t23M"),r=j("qx4F"),i=j("6eGT"),o=j("IBYe"),s=j("Ff2n"),u=j("c+Xe"),a=j("fyJ8"),c=j("biw7");function f(Le,Oe,Ve,Ze,Ne){var Ge=Ve[Le]||{},De=Ve[Oe]||{},we,Ae;Ge.fixed==="left"?we=Ze.left[Le]:De.fixed==="right"&&(Ae=Ze.right[Oe]);var de=!1,_e=!1,Se=!1,Ie=!1,ke=Ve[Oe+1],Ye=Ve[Le-1];if(Ne==="rtl"){if(we!==void 0){var nt=Ye&&Ye.fixed==="left";Ie=!nt}else if(Ae!==void 0){var lt=ke&&ke.fixed==="right";Se=!lt}}else if(we!==void 0){var at=ke&&ke.fixed==="left";de=!at}else if(Ae!==void 0){var ot=Ye&&Ye.fixed==="right";_e=!ot}return{fixLeft:we,fixRight:Ae,lastFixLeft:de,firstFixRight:_e,lastFixRight:Se,firstFixLeft:Ie,isSticky:Ze.isSticky}}var w=j("sR1s");function _(Le){var Oe=Le.cells,Ve=Le.stickyOffsets,Ze=Le.flattenColumns,Ne=Le.rowComponent,Ge=Le.cellComponent,De=Le.onHeaderRow,we=Le.index,Ae=m.useContext(c.a),de=Ae.prefixCls,_e=Ae.direction,Se;De&&(Se=De(Oe.map(function(ke){return ke.column}),we));var Ie=Object(w.a)(Oe.map(function(ke){return ke.column}));return m.createElement(Ne,Object.assign({},Se),Oe.map(function(ke,Ye){var nt=ke.column,lt=f(ke.colStart,ke.colEnd,Ze,Ve,_e),at;return nt&&nt.onHeaderCell&&(at=ke.column.onHeaderCell(nt)),m.createElement(a.a,Object.assign({},ke,{ellipsis:nt.ellipsis,align:nt.align,component:Ge,prefixCls:de,key:Ie[Ye]},lt,{additionalProps:at,rowType:"header"}))}))}_.displayName="HeaderRow";var h=_;function R(Le){var Oe=[];function Ve(De,we){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Oe[Ae]=Oe[Ae]||[];var de=we,_e=De.filter(Boolean).map(function(Se){var Ie={key:Se.key,className:Se.className||"",children:Se.title,column:Se,colStart:de},ke=1,Ye=Se.children;return Ye&&Ye.length>0&&(ke=Ve(Ye,de,Ae+1).reduce(function(nt,lt){return nt+lt},0),Ie.hasSubColumns=!0),"colSpan"in Se&&(ke=Se.colSpan),"rowSpan"in Se&&(Ie.rowSpan=Se.rowSpan),Ie.colSpan=ke,Ie.colEnd=Ie.colStart+ke-1,Oe[Ae].push(Ie),de+=ke,ke});return _e}Ve(Le,0);for(var Ze=Oe.length,Ne=function(we){Oe[we].forEach(function(Ae){!("rowSpan"in Ae)&&!Ae.hasSubColumns&&(Ae.rowSpan=Ze-we)})},Ge=0;Ge=0;we-=1){var Ae=Oe[we],de=Ve&&Ve[we],_e=de&&de[x.a];(Ae||_e||De)&&(Ne.unshift(m.createElement("col",Object.assign({key:we,style:{width:Ae,minWidth:Ae}},_e))),De=!0)}return m.createElement("colgroup",null,Ne)}var T=E;function k(Le,Oe){return Object(m.useMemo)(function(){for(var Ve=[],Ze=0;Ze1?ct-1:0),mr=1;mr=Se&&(rr=Se-Ie),De({scrollLeft:rr/Se*(_e+2)}),ot.current.x=pt.pageX},kt=function(){var pt=Object(Q.b)(Ge.current).top,dt=pt+Ge.current.offsetHeight,At=document.documentElement.scrollTop+window.innerHeight;dt-Object(r.a)()<=At||pt>=At-we?at(function(Mt){return Object(v.a)(Object(v.a)({},Mt),{},{isHiddenScrollBar:!0})}):at(function(Mt){return Object(v.a)(Object(v.a)({},Mt),{},{isHiddenScrollBar:!1})})},Et=function(pt){at(function(dt){return Object(v.a)(Object(v.a)({},dt),{},{scrollLeft:pt/_e*Se||0})})};return m.useImperativeHandle(Ve,function(){return{setScrollLeft:Et}}),m.useEffect(function(){var Vt=Object(X.a)(document.body,"mouseup",Pt,!1),pt=Object(X.a)(document.body,"mousemove",Qt,!1);return kt(),function(){Vt.remove(),pt.remove()}},[Ie,ft]),m.useEffect(function(){var Vt=Object(X.a)(window,"scroll",kt,!1),pt=Object(X.a)(window,"resize",kt,!1);return function(){Vt.remove(),pt.remove()}},[]),m.useEffect(function(){lt.isHiddenScrollBar||at(function(Vt){var pt,dt;return Object(v.a)(Object(v.a)({},Vt),{},{scrollLeft:Ge.current.scrollLeft/((pt=Ge.current)===null||pt===void 0?void 0:pt.scrollWidth)*((dt=Ge.current)===null||dt===void 0?void 0:dt.clientWidth)})})},[lt.isHiddenScrollBar]),_e<=Se||!Ie||lt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(r.a)(),width:Se,bottom:we},className:"".concat(de,"-sticky-scroll")},m.createElement("div",{onMouseDown:Xt,ref:ke,className:b()("".concat(de,"-sticky-scroll-bar"),Object(N.a)({},"".concat(de,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(Ie,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},fe=m.forwardRef(me);function Te(Le,Oe){return m.useMemo(function(){var Ve=!!Le;return{isSticky:Ve,stickyClassName:Ve?"".concat(Oe,"-sticky-header"):"",offsetHeader:Object(M.a)(Le)==="object"&&Le.offsetHeader||0,offsetScroll:Object(M.a)(Le)==="object"&&Le.offsetScroll||0}},[Le,Oe])}var ze=[],Je={},qe="rc-table-internal-hook",Xe=m.memo(function(Le){var Oe=Le.children;return Oe},function(Le,Oe){return d()(Le.props,Oe.props)?Le.pingLeft!==Oe.pingLeft||Le.pingRight!==Oe.pingRight:!1});function et(Le){var Oe,Ve=Le.prefixCls,Ze=Le.className,Ne=Le.rowClassName,Ge=Le.style,De=Le.data,we=Le.rowKey,Ae=Le.scroll,de=Le.tableLayout,_e=Le.direction,Se=Le.title,Ie=Le.footer,ke=Le.summary,Ye=Le.id,nt=Le.showHeader,lt=Le.components,at=Le.emptyText,ot=Le.onRow,Ct=Le.onHeaderRow,bt=Le.internalHooks,ft=Le.transformColumns,jt=Le.internalRefs,Pt=Le.sticky,Xt=De||ze,Qt=!!Xt.length,kt=m.useState(0),Et=Object(y.a)(kt,2),Vt=Et[0],pt=Et[1];m.useEffect(function(){pt(Object(r.a)())});var dt=m.useMemo(function(){return Object(w.c)(lt,{})},[lt]),At=m.useCallback(function(Dr,_r){return Object(w.b)(dt,Dr)||_r},[dt]),Mt=m.useMemo(function(){return typeof we=="function"?we:function(Dr){var _r=Dr&&Dr[we];return _r}},[we]),rr=Object(x.c)(Le),Fn=rr.expandIcon,yt=rr.expandedRowKeys,St=rr.defaultExpandedRowKeys,vt=rr.defaultExpandAllRows,yr=rr.expandedRowRender,Tr=rr.onExpand,Bt=rr.onExpandedRowsChange,Rt=rr.expandRowByClick,br=rr.rowExpandable,$r=rr.expandIconColumnIndex,Cr=rr.expandedRowClassName,ut=rr.childrenColumnName,It=rr.indentSize,Br=Fn||ne,Vr=ut||"children",An=m.useMemo(function(){return yr?"row":Le.expandable&&bt===qe&&Le.expandable.__PARENT_RENDER_ICON__||Xt.some(function(Dr){return Dr&&Object(M.a)(Dr)==="object"&&Dr[Vr]})?"nest":!1},[!!yr,Xt]),fn=m.useState(function(){return St||(vt?J(Xt,Mt,Vr):[])}),zr=Object(y.a)(fn,2),Dt=zr[0],dn=zr[1],ct=m.useMemo(function(){return new Set(yt||Dt||[])},[yt,Dt]),kr=m.useCallback(function(Dr){var _r=Mt(Dr,Xt.indexOf(Dr)),fr,ai=ct.has(_r);ai?(ct.delete(_r),fr=Object(O.a)(ct)):fr=[].concat(Object(O.a)(ct),[_r]),dn(fr),Tr&&Tr(!ai,Dr),Bt&&Bt(fr)},[Mt,ct,Xt,Tr,Bt]),mr=m.useState(0),ei=Object(y.a)(mr,2),Tn=ei[0],bn=ei[1],di=Object(ae.b)(Object(v.a)(Object(v.a)(Object(v.a)({},Le),rr),{},{expandable:!!yr,expandedKeys:ct,getRowKey:Mt,onTriggerExpand:kr,expandIcon:Br,expandIconColumnIndex:$r,direction:_e}),bt===qe?ft:null),ti=Object(y.a)(di,2),sn=ti[0],Hr=ti[1],fi=m.useMemo(function(){return{columns:sn,flattenColumns:Hr}},[sn,Hr]),hn=m.useRef(),Wr=m.useRef(),lr=m.useRef(),nn=m.useState(!1),qt=Object(y.a)(nn,2),Kt=qt[0],er=qt[1],Sr=m.useState(!1),jr=Object(y.a)(Sr,2),Gr=jr[0],_n=jr[1],la=oe(new Map),Yi=Object(y.a)(la,2),$i=Yi[0],Oi=Yi[1],pn=Object(w.a)(Hr),Ki=pn.map(function(Dr){return $i.get(Dr)}),Zr=m.useMemo(function(){return Ki},[Ki.join("_")]),ri=be(Zr,Hr.length,_e),Mn=Ae&&Object(w.d)(Ae.y),ln=Ae&&Object(w.d)(Ae.x),Sn=ln&&Hr.some(function(Dr){var _r=Dr.fixed;return _r}),hi=m.useRef(),Kn=Te(Pt,Ve),zn=Kn.isSticky,Li=Kn.offsetHeader,Mi=Kn.offsetScroll,Gn=Kn.stickyClassName,Ni,pi,mi;Mn&&(pi={overflowY:"scroll",maxHeight:Ae.y}),ln&&(Ni={overflowX:"auto"},Mn||(pi={overflowY:"hidden"}),mi={width:Ae.x===!0?"auto":Ae.x,minWidth:"100%"});var Xn=m.useCallback(function(Dr,_r){Oi(function(fr){var ai=new Map(fr);return ai.set(Dr,_r),ai})},[]),Vn=se(null),ki=Object(y.a)(Vn,2),ni=ki[0],gi=ki[1];function ji(Dr,_r){if(!_r)return;typeof _r=="function"?_r(Dr):_r.scrollLeft!==Dr&&(_r.scrollLeft=Dr)}var ii=function(_r){var fr=_r.currentTarget,ai=_r.scrollLeft,zi=typeof ai=="number"?ai:fr.scrollLeft,Gi=fr||Je;if(!gi()||gi()===Gi){var $t;ni(Gi),ji(zi,Wr.current),ji(zi,lr.current),ji(zi,($t=hi.current)===null||$t===void 0?void 0:$t.setScrollLeft)}if(fr){var Ot=fr.scrollWidth,tr=fr.clientWidth;er(zi>0),_n(zi0?[].concat(Object(v.a)(s),Object(v.a)(t(f).map(function(w){return Object(O.a)({fixed:c},w)}))):[].concat(Object(v.a)(s),[Object(O.a)(Object(O.a)({},u),{},{fixed:c})])},[])}function l(o){for(var s=!0,u=0;u=0;f-=1){var w=o[f];if(c&&w.fixed!=="right")c=!1;else if(!c&&w.fixed==="right"){Object(S.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function r(o){return o.map(function(s){var u=s.fixed,a=Object(M.a)(s,["fixed"]),c=u;return u==="left"?c="right":u==="right"&&(c="left"),Object(O.a)({fixed:c},a)})}function i(o,s){var u=o.prefixCls,a=o.columns,c=o.children,f=o.expandable,w=o.expandedKeys,_=o.getRowKey,h=o.onTriggerExpand,R=o.expandIcon,C=o.rowExpandable,g=o.expandIconColumnIndex,x=o.direction,E=o.expandRowByClick,T=y.useMemo(function(){return a||d(c)},[a,c]),k=y.useMemo(function(){if(f){var G,K=g||0,W=T[K],z=(G={},Object(N.a)(G,p.a,{className:"".concat(u,"-expand-icon-col")}),Object(N.a)(G,"title",""),Object(N.a)(G,"fixed",W?W.fixed:null),Object(N.a)(G,"className","".concat(u,"-row-expand-icon-cell")),Object(N.a)(G,"render",function(H,V,q){var Z=_(V,q),ce=w.has(Z),he=C?C(V):!0,ae=R({prefixCls:u,expanded:ce,expandable:he,record:V,onExpand:h});return E?y.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},ae):ae}),G),U=T.slice();return K>=0&&U.splice(K,0,z),U}return T},[f,T,_,w,R,x]),L=y.useMemo(function(){var G=k;return s&&(G=s(G)),G.length||(G=[{render:function(){return null}}]),G},[s,k,x]),A=y.useMemo(function(){return x==="rtl"?r(t(L)):t(L)},[L,x]);return[L,A]}$.b=i},wZgz:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.BlockCipher,y=v.algo,m=[],S=[],b=[],p=[],d=[],t=[],l=[],r=[],i=[],o=[];(function(){for(var a=[],c=0;c<256;c++)c<128?a[c]=c<<1:a[c]=c<<1^283;for(var f=0,w=0,c=0;c<256;c++){var _=w^w<<1^w<<2^w<<3^w<<4;_=_>>>8^_&255^99,m[f]=_,S[_]=f;var h=a[f],R=a[h],C=a[R],g=a[_]*257^_*16843008;b[f]=g<<24|g>>>8,p[f]=g<<16|g>>>16,d[f]=g<<8|g>>>24,t[f]=g;var g=C*16843009^R*65537^h*257^f*16843008;l[_]=g<<24|g>>>8,r[_]=g<<16|g>>>16,i[_]=g<<8|g>>>24,o[_]=g,f?(f=h^a[a[a[C^h]]],w^=a[a[w]]):f=w=1}})();var s=[0,1,2,4,8,16,32,64,128,27,54],u=y.AES=M.extend({_doReset:function(){var a;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var c=this._keyPriorReset=this._key,f=c.words,w=c.sigBytes/4,_=this._nRounds=w+6,h=(_+1)*4,R=this._keySchedule=[],C=0;C6&&C%w==4&&(a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255]):(a=a<<8|a>>>24,a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255],a^=s[C/w|0]<<24),R[C]=R[C-w]^a);for(var g=this._invKeySchedule=[],x=0;x>>24]]^r[m[a>>>16&255]]^i[m[a>>>8&255]]^o[m[a&255]]}},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._keySchedule,b,p,d,t,m)},decryptBlock:function(a,c){var f=a[c+1];a[c+1]=a[c+3],a[c+3]=f,this._doCryptBlock(a,c,this._invKeySchedule,l,r,i,o,S);var f=a[c+1];a[c+1]=a[c+3],a[c+3]=f},_doCryptBlock:function(a,c,f,w,_,h,R,C){for(var g=this._nRounds,x=a[c]^f[0],E=a[c+1]^f[1],T=a[c+2]^f[2],k=a[c+3]^f[3],L=4,A=1;A>>24]^_[E>>>16&255]^h[T>>>8&255]^R[k&255]^f[L++],K=w[E>>>24]^_[T>>>16&255]^h[k>>>8&255]^R[x&255]^f[L++],W=w[T>>>24]^_[k>>>16&255]^h[x>>>8&255]^R[E&255]^f[L++],z=w[k>>>24]^_[x>>>16&255]^h[E>>>8&255]^R[T&255]^f[L++];x=G,E=K,T=W,k=z}var G=(C[x>>>24]<<24|C[E>>>16&255]<<16|C[T>>>8&255]<<8|C[k&255])^f[L++],K=(C[E>>>24]<<24|C[T>>>16&255]<<16|C[k>>>8&255]<<8|C[x&255])^f[L++],W=(C[T>>>24]<<24|C[k>>>16&255]<<16|C[x>>>8&255]<<8|C[E&255])^f[L++],z=(C[k>>>24]<<24|C[x>>>16&255]<<16|C[E>>>8&255]<<8|C[T&255])^f[L++];a[c]=G,a[c+1]=K,a[c+2]=W,a[c+3]=z},keySize:256/32});v.AES=M._createHelper(u)}(),N.AES})},wbyO:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Base64url={stringify:function(b,p=!0){var d=b.words,t=b.sigBytes,l=p?this._safe_map:this._map;b.clamp();for(var r=[],i=0;i>>2]>>>24-i%4*8&255,s=d[i+1>>>2]>>>24-(i+1)%4*8&255,u=d[i+2>>>2]>>>24-(i+2)%4*8&255,a=o<<16|s<<8|u,c=0;c<4&&i+c*.75>>6*(3-c)&63));var f=l.charAt(64);if(f)for(;r.length%4;)r.push(f);return r.join("")},parse:function(b,p=!0){var d=b.length,t=p?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var r=0;r>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return M.create(t,l)}}(),N.enc.Base64url})},"y0+3":function(F,$,j){"use strict";j.d($,"a",function(){return t}),j.d($,"b",function(){return r});var N=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function M(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function y(i,o,s){if(o=o.toLowerCase(),s==="auto"){if(o==="height")return i.offsetHeight;if(o==="width")return i.offsetWidth}return o in v||(v[o]=N.test(o)),v[o]?parseFloat(s)||0:s}function m(i,o){var s=arguments.length,u=M(i);return o=O[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,s===1?u:y(i,o,u[o]||i.style[o])}function S(i,o,s){var u=arguments.length;if(o=O[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,u===3)return typeof s=="number"&&N.test(o)&&(s="".concat(s,"px")),i.style[o]=s,s;for(var a in o)o.hasOwnProperty(a)&&S(i,a,o[a]);return M(i)}function b(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function p(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function d(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:o}}function t(){var i=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:o}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(i){var o=i.getBoundingClientRect(),s=document.documentElement;return{left:o.left+(window.pageXOffset||s.scrollLeft)-(s.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||s.scrollTop)-(s.clientTop||document.body.clientTop||0)}}},ynwM:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldFF-globalStorage",read:M,write:y,each:m,remove:S,clearAll:b};var O=v.globalStorage;function M(p){return O[p]}function y(p,d){O[p]=d}function m(p){for(var d=O.length-1;d>=0;d--){var t=O.key(d);p(O[t],t)}}function S(p){return O.removeItem(p)}function b(){m(function(p,d){delete O[p]})}}}]);